Uploaded image for project: 'Maven Install Plugin'
  1. Maven Install Plugin
  2. MINSTALL-40

install with classifier with no target/classes fails

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.1, 2.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Maven version: 2.0.5, Winx XP pro

      Description

      The install plugin fails with the following error:
      Error installing artifact: File C:\TEMP\sample-war\target\classes does not exist
      in a project where there is no class or classpath resource generation (so the target/classes folder is not generated in the compile phase).
      Suppose for example a war application with no java source code (maybe only jar dependencies) and no classpath resource.
      Installing the project as a primary artifact works fine.
      Installing the project as a secondary artifact (so with "classifier" option) with classes or resources works fine.
      Installing the project as a secondary artifact without classes or resources gives the error below.
      Attached is a simple project with packaging WAR composed only by a web.xml file.
      Running "mvn install" on this project should give the error above. Commenting the classifier tag will result in a successful install.
      Also if I put a simple java file (or a resource) the compile goal will create target/classes folder and the install works fine.
      In fact I am using this kind of workaround for the moment (include a dummy resource in the war build).
      The same is with a similar jar project (although it may be less useful to have an "empty" jar artifact).
      Verified with both maven-install-plugin 2.1 and 2.2

        Attachments

        1. sample-war.zip
          0.9 kB
          mork
        2. clean-install.log
          45 kB
          mork
        3. clean-install-with-war-2.0.2.log
          45 kB
          mork
        4. MINSTALL40-sample2.zip
          1 kB
          mork
        5. MINSTALL-40-fixed.zip
          1 kB
          Benjamin Bentmann

          Issue Links

            Activity

              People

              • Assignee:
                bentmann Benjamin Bentmann
                Reporter:
                mork mork
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: