You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michele Lorenzini (JIRA)" <ji...@codehaus.org> on 2007/08/02 08:56:13 UTC

[jira] Created: (MINSTALL-40) install with classifier with no target/classes fails

install with classifier with no target/classes fails
----------------------------------------------------

                 Key: MINSTALL-40
                 URL: http://jira.codehaus.org/browse/MINSTALL-40
             Project: Maven 2.x Install Plugin
          Issue Type: Bug
    Affects Versions: 2.2, 2.1
         Environment: Maven version: 2.0.5, Winx XP pro
            Reporter: Michele Lorenzini
            Priority: Minor
         Attachments: sample-war.zip

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


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MINSTALL-40) install with classifier with no target/classes fails

Posted by "Michele Lorenzini (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MINSTALL-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michele Lorenzini updated MINSTALL-40:
--------------------------------------

    Attachment: clean-install.log

Hi,
I've unzipped the sample project, tried a clean install using maven 2.0.7 and version 2.2 of maven-install plugin,
and it does NOT install.
Attached in clean-install.log the complete log (-X) showing what goes wrong for me.
Maybe can be related to some other plugin for which I have some different version?

> install with classifier with no target/classes fails
> ----------------------------------------------------
>
>                 Key: MINSTALL-40
>                 URL: http://jira.codehaus.org/browse/MINSTALL-40
>             Project: Maven 2.x Install Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1, 2.2
>         Environment: Maven version: 2.0.5, Winx XP pro
>            Reporter: Michele Lorenzini
>            Priority: Minor
>         Attachments: clean-install.log, sample-war.zip
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MINSTALL-40) install with classifier with no target/classes fails

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MINSTALL-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_125811 ] 

Dennis Lundberg commented on MINSTALL-40:
-----------------------------------------

I have tried your sample project using Maven 2.0.5 on Windows XP Pro.
It works fine with version 2.0, 2.1 and 2.2 of the install plugin. No error message is shown and the artifact is installed into the local repository.

> install with classifier with no target/classes fails
> ----------------------------------------------------
>
>                 Key: MINSTALL-40
>                 URL: http://jira.codehaus.org/browse/MINSTALL-40
>             Project: Maven 2.x Install Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1, 2.2
>         Environment: Maven version: 2.0.5, Winx XP pro
>            Reporter: Michele Lorenzini
>            Priority: Minor
>         Attachments: sample-war.zip
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MINSTALL-40) install with classifier with no target/classes fails

Posted by "Michele Lorenzini (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MINSTALL-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_126016 ] 

Michele Lorenzini commented on MINSTALL-40:
-------------------------------------------

I've tried to comment the classifier in the second (jar) sample, and it installs with no problem (also without a target/classes directory).
And it says:
[INFO] Installing C:\Temp\MINSTALL-40-2\target\foo-jar-1.0.jar to C:\Documents and Settings\xxx\.m2\repository\foo\bar\foo-jar\1.0\foo-jar-1.0.jar

If I restore the classifier, the install goal fails with this:

[INFO] Installing C:\Temp\MINSTALL-40-2\target\classes to C:\Documents and Settings\xxx\.m2\repository\foo\bar\foo-jar\1.0\foo-jar-1.0.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error installing artifact: File C:\Temp\MINSTALL-40-2\target\classes does not exist

This trace is done in the DefaultArtifactInstaller, when the InstallMojo calls:
installer.install( file, artifact, localRepository );

The DefaultArtifactInstaller tries here to copy "file" on the destination (repository) with:
FileUtils.copyFile( source, destination );

thats the line that raises the Exception, if I'm right, because there is no C:\Temp\MINSTALL-40-2\target\classes directory.

So the question is: why the artifact metadata, in the case of a "classified" artifact, gives "C:\Temp\MINSTALL-40-2\target\classes"
as the file path, and not "C:\Temp\MINSTALL-40-2\target\foo-jar-1.0-xxx.jar" as it should be?
Hope it helps


> install with classifier with no target/classes fails
> ----------------------------------------------------
>
>                 Key: MINSTALL-40
>                 URL: http://jira.codehaus.org/browse/MINSTALL-40
>             Project: Maven 2.x Install Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1, 2.2
>         Environment: Maven version: 2.0.5, Winx XP pro
>            Reporter: Michele Lorenzini
>            Priority: Minor
>         Attachments: clean-install-with-war-2.0.2.log, clean-install.log, MINSTALL40-sample2.zip, sample-war.zip
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MINSTALL-40) install with classifier with no target/classes fails

Posted by "Heiko (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MINSTALL-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=185860#action_185860 ] 

Heiko commented on MINSTALL-40:
-------------------------------

For the records: It requires the deploy plugin v 2.4

> install with classifier with no target/classes fails
> ----------------------------------------------------
>
>                 Key: MINSTALL-40
>                 URL: http://jira.codehaus.org/browse/MINSTALL-40
>             Project: Maven 2.x Install Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1, 2.2
>         Environment: Maven version: 2.0.5, Winx XP pro
>            Reporter: Michele Lorenzini
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>         Attachments: clean-install-with-war-2.0.2.log, clean-install.log, MINSTALL-40-fixed.zip, MINSTALL40-sample2.zip, sample-war.zip
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MINSTALL-40) install with classifier with no target/classes fails

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MINSTALL-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MINSTALL-40:
--------------------------------------

    Attachment: MINSTALL-40-fixed.zip

MINSTALL-40-fixed.zip is an updated version of the example provided by Michele. This version locks down the version for the maven-install-plugin to 2.3 and shows this issue is fixed in version 2.3.

So Jesse, be sure to use version 2.3 of the maven-install-plugin. If the issue really persists for, you will need to provide an example project to reproduce it for further analysis.

> install with classifier with no target/classes fails
> ----------------------------------------------------
>
>                 Key: MINSTALL-40
>                 URL: http://jira.codehaus.org/browse/MINSTALL-40
>             Project: Maven 2.x Install Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1, 2.2
>         Environment: Maven version: 2.0.5, Winx XP pro
>            Reporter: Michele Lorenzini
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>         Attachments: clean-install-with-war-2.0.2.log, clean-install.log, MINSTALL-40-fixed.zip, MINSTALL40-sample2.zip, sample-war.zip
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MINSTALL-40) install with classifier with no target/classes fails

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MINSTALL-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MINSTALL-40.
-------------------------------------

      Assignee: Benjamin Bentmann
    Resolution: Duplicate

> install with classifier with no target/classes fails
> ----------------------------------------------------
>
>                 Key: MINSTALL-40
>                 URL: http://jira.codehaus.org/browse/MINSTALL-40
>             Project: Maven 2.x Install Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1, 2.2
>         Environment: Maven version: 2.0.5, Winx XP pro
>            Reporter: Michele Lorenzini
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>         Attachments: clean-install-with-war-2.0.2.log, clean-install.log, MINSTALL40-sample2.zip, sample-war.zip
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MINSTALL-40) install with classifier with no target/classes fails

Posted by "jesse crossley (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MINSTALL-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=182308#action_182308 ] 

jesse crossley commented on MINSTALL-40:
----------------------------------------

This problem still occurs with mvn 2.0.10 and war plugins 2.1-alpha-2 and 2.1-beta-1.
I've employed the work around using an empty /src/main/resources/placeHolder.txt, but that's not a very satisfying solution.  
Is there any fix forthcoming? I see that the duplicate issue <a href="http://jira.codehaus.org/browse/MINSTALL-18">MINSTALL-18</a> has been closed, but this version of the issue is ongoing.

> install with classifier with no target/classes fails
> ----------------------------------------------------
>
>                 Key: MINSTALL-40
>                 URL: http://jira.codehaus.org/browse/MINSTALL-40
>             Project: Maven 2.x Install Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1, 2.2
>         Environment: Maven version: 2.0.5, Winx XP pro
>            Reporter: Michele Lorenzini
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>         Attachments: clean-install-with-war-2.0.2.log, clean-install.log, MINSTALL40-sample2.zip, sample-war.zip
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MINSTALL-40) install with classifier with no target/classes fails

Posted by "Michele Lorenzini (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MINSTALL-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michele Lorenzini updated MINSTALL-40:
--------------------------------------

    Attachment: MINSTALL40-sample2.zip

This is another example: a jar project (with no src content), packaged as a secondary artifact (with classifier).
It has no sense in the real life, but it shows the same error if trying to install (see log included):
File C:\Temp\MINSTALL-40-2\target\classes does not exist
As I mentioned before, having a jar project with no output in target/classes has probably no sense, 
but maybe it can help to understand if the problem is in INSTALL plugin and not in the WAR plugin (where the empty target/classes can have sense in some environment).
Hope it helps

> install with classifier with no target/classes fails
> ----------------------------------------------------
>
>                 Key: MINSTALL-40
>                 URL: http://jira.codehaus.org/browse/MINSTALL-40
>             Project: Maven 2.x Install Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1, 2.2
>         Environment: Maven version: 2.0.5, Winx XP pro
>            Reporter: Michele Lorenzini
>            Priority: Minor
>         Attachments: clean-install-with-war-2.0.2.log, clean-install.log, MINSTALL40-sample2.zip, sample-war.zip
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MINSTALL-40) install with classifier with no target/classes fails

Posted by "Michele Lorenzini (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MINSTALL-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michele Lorenzini updated MINSTALL-40:
--------------------------------------

    Attachment: clean-install-with-war-2.0.2.log

I've tried forcing use of 2.0.2 war plugin (adding <version>2.0.2</version> in the build section of the pom),
 but still I have the error as in clean-install-with-war-2.0.2.log.
Will see in next comment that the same applies with a jar project.

> install with classifier with no target/classes fails
> ----------------------------------------------------
>
>                 Key: MINSTALL-40
>                 URL: http://jira.codehaus.org/browse/MINSTALL-40
>             Project: Maven 2.x Install Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1, 2.2
>         Environment: Maven version: 2.0.5, Winx XP pro
>            Reporter: Michele Lorenzini
>            Priority: Minor
>         Attachments: clean-install-with-war-2.0.2.log, clean-install.log, sample-war.zip
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MINSTALL-40) install with classifier with no target/classes fails

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MINSTALL-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_125974 ] 

Dennis Lundberg commented on MINSTALL-40:
-----------------------------------------

I ran the same command that you did and compared the logs. It turns out that the war plugin that is different. Here's mine:

[DEBUG] maven-war-plugin: resolved to version 2.0-beta-2 from repository central

My log also shows that your version of the war plugin tries to delete more stuff during clean, than mine does. So perhaps this issue should be moved to MWAR? When I specify version 2.0 of the war plugin I get the same error as you do.

Can you confirm that it works for you if you use maven-war-plugin 2.0-beta-2?

> install with classifier with no target/classes fails
> ----------------------------------------------------
>
>                 Key: MINSTALL-40
>                 URL: http://jira.codehaus.org/browse/MINSTALL-40
>             Project: Maven 2.x Install Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1, 2.2
>         Environment: Maven version: 2.0.5, Winx XP pro
>            Reporter: Michele Lorenzini
>            Priority: Minor
>         Attachments: clean-install.log, sample-war.zip
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira