使用NPanday和Jenkins发布多模块.Net项目时的依赖性错误

时间:2012-05-18 09:13:36

标签: .net maven jenkins

尝试使用NPanday和Jenkins发布.Net项目时遇到了一些问题。

我的项目结构如下:

net_test (parent, with 2 modules)
  net_test_1
  net_test_2 (dependent of net_test_1)

当我尝试使用带有第一个

的常规maven命令行释放它们时
mvn release:prepare

然后

mvn release:perform
一切正常。但是当我尝试使用jenkins释放项目时,net_test_2模块说它无法解析我试图发布的版本中的net_test_1。这当然是这种情况,因为它还没有建成,但由于它在反应堆中,它将被建造并且依赖性不应该被解决。

错误信息如下

[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Building net_test_2
[INFO] [INFO]    task-segment: [clean, verify]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] [clean:clean {execution: default-clean}]
[INFO] [INFO] [compile:initialize {execution: default-initialize}]
[INFO] 2012-maj-18 10:48:44 npanday.PathUtil getDotNetArtifact
[INFO] VARNING: 
[INFO] NPANDAY-1005-0001: Error copying dependency com.apptus.dag:net_test_1:dotnet-library:1.0.1:compile File C:\.m2\repository\com\apptus\dag\net_test_1\1.0.1\net_test_1-1.0.1.dll does not exist
[INFO] Downloading: http://repo.apptus.local/content/repositories/releases//com/apptus/dag/net_test_1/1.0.1/net_test_1-1.0.1.dll
[INFO] [INFO] Unable to find resource 'com.apptus.dag:net_test_1:dotnet-library:1.0.1' in repository releases (http://repo.apptus.local/content/repositories/releases/)
[INFO] 2012-maj-18 10:48:48 npanday.dao.impl.ProjectDaoImpl storeProjectAndResolveDependencies
[INFO] VARNING: NPANDAY-181-121:  Problem in resolving assembly: com.apptus.dag:net_test_1:dotnet-library:1.0.1:compile, Message = Unable to download the artifact from any repository
[INFO] 
[INFO] Try downloading the file manually from the project website.
[INFO] 
[INFO] Then, install it using the command: 
[INFO]     mvn install:install-file -DgroupId=com.apptus.dag -DartifactId=net_test_1 -Dversion=1.0.1 -Dpackaging=dotnet-library -Dfile=/path/to/file
[INFO] 
[INFO] Alternatively, if you host your own repository you can deploy the file there: 
[INFO]     mvn deploy:deploy-file -DgroupId=com.apptus.dag -DartifactId=net_test_1 -Dversion=1.0.1 -Dpackaging=dotnet-library -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[INFO] 
[INFO] 
[INFO]   com.apptus.dag:net_test_1:dotnet-library:1.0.1

我不知道这是否是NPanday的问题,这是jenkins的M2版本插件或其他东西。

1 个答案:

答案 0 :(得分:1)

IIRC,准备目标必须至少设置为“安装”。但这将在1.5中修复(仍未发布)。