[ 
http://jira.codehaus.org/browse/MSOURCES-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_92473
 ] 

Peter Lynch commented on MSOURCES-10:
-------------------------------------

I think this patch highlights a nasty side effect. Of course since classifier 
use is loosely defined, these leads to all sorts of bad plugin behavior when it 
comes to using classifiers.

To be more percise, how about building a war file with classifiers of dev, qa 
and prod.

With this patch there is no way to distinguish between dev,qa and prod sources, 
yet the final war file name can be deployed as 

myproject-1.0.0-dev.war

Where 'dev' is the war plugin classifier. When sources get deployed for prod,qa 
and dev, they will override each other in the repo

myproject-1.0.0-sources.war

So you'll never know what sources you got by the filename.

The only work around I see is to avoid the use of classifier all together and 
make the version something like

<version>1.0.0-dev</version>

which means SNAPSHOT version has to be

<version>1.0.0-dev-SNAPSHOT</version>

because "-SNAPSHOT" needs to be at the end of the version string.  And to 
depend on this in another pom becomes (notice no classifier)

<dependency>
  <artifactId>myproject</artifactId>
  <groupId>myproject</groupId>
  <version>1.0.0-dev</version>
</dependency>

-Peter

> Attached source artifact should not be added for artifacts with classifier
> --------------------------------------------------------------------------
>
>                 Key: MSOURCES-10
>                 URL: http://jira.codehaus.org/browse/MSOURCES-10
>             Project: Maven 2.x Sources Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>            Reporter: Vincent Massol
>            Assignee: Vincent Massol
>             Fix For: 2.0.2
>
>
> If the main artifact has a classifier then we shouldn't attach a source 
> artifact to it as Maven2 only allows one classifier. Doing the attachment 
> leads to errors such as:
> {noformat}
> [INFO] Installing 
> C:\dev\maven\trunks\plugins\maven-clover-plugin\src\it\usertest\target\clover\maven-clover-plugin-sample-usertest-1.0-SNAPSHOT-clover.jar
>  to C:\Documents and 
> Settings\vmassol\.m2\repository\org\apache\maven\plugins\maven-clover-plugin-sample-usertest\1.0-SNAPSHOT\maven-clover-plugin-sample-usertest-1.0-SNAPSHOT-clover.jar
> [INFO] Installing 
> C:\dev\maven\trunks\plugins\maven-clover-plugin\src\it\usertest\target\maven-clover-plugin-sample-usertest-1.0-SNAPSHOT-sources.jar
>  to C:\Documents and 
> Settings\vmassol\.m2\repository\org\apache\maven\plugins\maven-clover-plugin-sample-usertest\1.0-SNAPSHOT\maven-clover-plugin-sample-usertest-1.0-SNAPSHOT-sources.jar
> [INFO] Installing 
> C:\dev\maven\trunks\plugins\maven-clover-plugin\src\it\usertest\target\clover\maven-clover-plugin-sample-usertest-1.0-SNAPSHOT-clover-sources.jar
>  to C:\Documents and 
> Settings\vmassol\.m2\repository\org\apache\maven\plugins\maven-clover-plugin-sample-usertest\1.0-SNAPSHOT\maven-clover-plugin-sample-usertest-1.0-SNAPSHOT-sources.jar
> {noformat}
> In the last line, notice the double classifier "-clover-sources" and the 
> wrong destination "-sources".

-- 
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

        

Reply via email to