Maven的部署:部署文件未发现由于版本/时间戳追加到罐子 [英] Maven deploy:deploy-file not found due to version/timestamp appended to jar

查看:630
本文介绍了Maven的部署:部署文件未发现由于版本/时间戳追加到罐子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用有问题部署:部署文件与快照我想请上一些意见

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

我有2个项目; 1)蚂蚁基础; 2)其他的Maven 基于它通过消耗其他项目的罐子 Archiva

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.

问题是Maven项目无法找到他们,因为依赖关系的名字有附加像这样一个时间戳

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

下面是Ant目标:

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

我有一个版本的类似Ant目标,这工作得很好。

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

它通过部署snapshosts其他纯粹的Maven项目 MVN部署做工精细。

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

有谁知道我错了?

感谢您

更新

想通了答案,请看下面。

Figured out the answer, see below.

推荐答案

想通了答案。

在我的Ant目标,我作为部署就可以看到文件。我也那么做了同样的事情,但随着-tests罐子。

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.

这导致Archiva,而不是通常的1有,如果你没有MVN部署你所期望的。

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

因此​​,非test依赖找不到,因为最新的快照是-test罐子。

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.

看<一个href=\"http://stackoverflow.com/questions/2606554/deploying-non-maven-based-module-src-and-tests-jar-to-archiva-in-a-single-transac\">http://stackoverflow.com/questions/2606554/deploying-non-maven-based-module-src-and-tests-jar-to-archiva-in-a-single-transac

这篇关于Maven的部署:部署文件未发现由于版本/时间戳追加到罐子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆