2

在尝试使用 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 发布插件或其他东西的问题。

4

1 回答 1

1

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

于 2012-08-07T13:47:20.007 回答