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

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.

Answers


Figured out the answer.

In my Ant target I was deploying the file as you can see. I also then did the same thing but with the -tests jar.

This resulted in 2 snapshots in Archiva, not the usual 1 has you'd expect if you did mvn deploy.

Therefore the non test dependency could not be found because the latest snapshot was the -test jar.

Would be great to know how to solve this problem.

see Deploying non Maven based module src and tests jar to Archiva in a single transaction


Need Your Help

Use java in matlab

java matlab classpath

I encountered a problem when I tried to use java from matlab. I read through the tutorials from MathWork.com several times, also I re-installed the JDK1.6, in order to be compatible with matlab. Ho...

Python composition

python oop composition

Just trying to improve my OO use in Python and am curious about composition.