Maven deploy:deploy-file not found due to version/timestamp appended to jar

Posted by JamesC on Stack Overflow See other posts from Stack Overflow or by JamesC
Published on 2010-04-09T08:55:23Z Indexed on 2010/04/09 9:43 UTC
Read the original article Hit count: 690

Filed under:
|
|

I'm having a problem using deploy:deploy-file with snapshots I'd like some advice on please.

I have 2 projects; 1) Ant based and 2) the other Maven based that consumes the jars of the other project via Archiva.

I've added a target to the Ant project to deploy snapshots on every successful build during our iteration.

The problem is the Maven project cannot find them because the name of the dependency has a timestamp appended like so:

someJar-1.0-20100407.171211-1.jar

Here is the Ant target:

<exec executable="${maven.bin}" dir="../lib">
  <arg value="deploy:deploy-file" />
  <arg value="-DgroupId=com.my.package" /><arg value="-DartifactId=${ant.project.name}" />
  <arg value="-Dversion=${manifest.implementation.version}-SNAPSHOT" />
  <arg value="-Dpackaging=jar" />
  <arg value="-Dfile=../lib/${ant.project.name}-${manifest.implementation.version}-SNAPSHOT.jar" />
  <arg value="-Durl=http://archiva.xxx.com/archiva/repository/snapshots" />
  <arg value="-DrepositoryId=snapshots" />
</exec> 

I have a similar Ant target for releases and this works fine.

Other pure Maven projects which deploy snapshosts via mvn deploy work fine.

Does anyone know where I am going wrong?

Thank You

Update

Figured out the answer, see below.

© Stack Overflow or respective owner

Related posts about maven

Related posts about archiva