[
https://jira.codehaus.org/browse/MDEP-438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=343413#comment-343413
]
Chris Schmidt edited comment on MDEP-438 at 3/21/14 1:24 PM:
-------------------------------------------------------------
Our workaround for this issue is to run the install goal on the artifact we
need to copy locally prior to running the build for this project whenever it
fails due to this issue.
For completeness - here is the portion of the pom that is copying the file
{code:xml}
<execution>
<id>copy-war</id>
<phase>prepare-package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.mycompany</groupId>
<artifactId>artifact</artifactId>
<version>${artifact.version}</version>
<type>war</type>
<overWrite>true</overWrite>
<outputDirectory>target/artifact</outputDirectory>
<destFileName>artifact.war</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
{code}
was (Author: caschmidt):
For completeness - here is the portion of the pom that is copying the file
{code:xml}
<execution>
<id>copy-war</id>
<phase>prepare-package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.mycompany</groupId>
<artifactId>artifact</artifactId>
<version>${artifact.version}</version>
<type>war</type>
<overWrite>true</overWrite>
<outputDirectory>target/artifact</outputDirectory>
<destFileName>artifact.war</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
{code}
> When classifier and main jar are on different SNAPSHOT builds, the wrong
> build is retrieved
> -------------------------------------------------------------------------------------------
>
> Key: MDEP-438
> URL: https://jira.codehaus.org/browse/MDEP-438
> Project: Maven Dependency Plugin
> Issue Type: Bug
> Components: copy
> Affects Versions: 2.8
> Reporter: Chris Schmidt
>
> In our repository we have 3 versions of an artifact being deployed at
> different intervals differentiated by a classifier -
> artifact.war
> artifact-classifier.war
> artifact-classes.jar
> In our pom file we are attempting to copy the main war but a classifier war
> has been deployed after the last deploy of the main war, so the
> maven-metadata.xml file looks similar to this:
> {code:xml}
> <metadata modelVersion="1.1.0">
> <groupId>com.mycompany</groupId>
> <artifactId>artifact</artifactId>
> <version>1.0.0-SNAPSHOT</version>
> <versioning>
> <snapshot>
> <timestamp>20140321.173622</timestamp>
> <buildNumber>100</buildNumber>
> </snapshot>
> <lastUpdated>20140321173622</lastUpdated>
> <snapshotVersions>
> <snapshotVersion>
> <extension>pom</extension>
> <value>1.0.0-20140321.173622-100</value>
> <updated>20140321173622</updated>
> </snapshotVersion>
> <snapshotVersion>
> <extension>war</extension>
> <value>1.0.0-20140321.173040-99</value>
> <updated>20140321173040</updated>
> </snapshotVersion>
> <snapshotVersion>
> <classifier>classes</classifier>
> <extension>jar</extension>
> <value>1.0.0-20140321.173622-100</value>
> <updated>20140321173622</updated>
> </snapshotVersion>
> <snapshotVersion>
> <classifier>classifier</classifier>
> <extension>war</extension>
> <value>1.0.0-20140321.173622-100</value>
> <updated>20140321173622</updated>
> </snapshotVersion>
> </snapshotVersions>
> </versioning>
> </metadata>
> {code}
> So the main war is on build 99, while the classifier and classes builds are
> on build 100.
> It appears the dependency plugin is ignoring the <snapshotVersions> elements
> and using the value in the <snapshot> element regardless of classifier.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)