Artifactory maven 插件部署失败
Artifactory maven plugin fails to deploy
我正在尝试使用 artifactory-maven-plugin
将 Maven 构建上传到我的人工制品服务器。使用 jfrog cli 上传有效,所以这似乎不是权限问题。
这是我的 pom.xml:
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>2.6.1</version>
<inherited>false</inherited>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>publish</goal>
</goals>
<configuration>
<deployProperties>
<gradle>awesome</gradle>
<review.team>qa</review.team>
</deployProperties>
<contextUrl>http://vserver1.craftwater.de:8081/artifactory</contextUrl>
<username>myUser</username>
<password>mySecret</password>
<excludePatterns>*-tests.jar</excludePatterns>
<repoKey>libs-release-local</repoKey>
<snapshotRepoKey>libs-snapshot-local</snapshotRepoKey>
</configuration>
</execution>
</executions>
</plugin>
mvn deploy
的结果是一个 IllegalArgutementException:
Caused by: java.lang.IllegalArgumentException: Target repository cannot be empty
at org.jfrog.build.client.DeployDetails$Builder.build(DeployDetails.java:119)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.addDeployableArtifact(BuildInfoRecorder.java:604)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.addArtifactsToCurrentModule(BuildInfoRecorder.java:533)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.addFilesToCurrentModule(BuildInfoRecorder.java:477)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.finalizeAndAddModule(BuildInfoRecorder.java:464)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.finalizeModule(BuildInfoRecorder.java:392)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.projectSucceeded(BuildInfoRecorder.java:210)
at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:74)
at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:91)
... 16 more
这是一个错误还是我做错了什么?
Artifactory 版本:Artifactory OSS 4.11.1 rev 40241
我认为您的插件配置缺少发布者标签。您可以使用 Maven Artifactory 插件参考指南以及此示例项目:
https://github.com/JFrogDev/project-examples/tree/master/artifactory-maven-plugin-example
希望对您有所帮助。
我正在尝试使用 artifactory-maven-plugin
将 Maven 构建上传到我的人工制品服务器。使用 jfrog cli 上传有效,所以这似乎不是权限问题。
这是我的 pom.xml:
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>2.6.1</version>
<inherited>false</inherited>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>publish</goal>
</goals>
<configuration>
<deployProperties>
<gradle>awesome</gradle>
<review.team>qa</review.team>
</deployProperties>
<contextUrl>http://vserver1.craftwater.de:8081/artifactory</contextUrl>
<username>myUser</username>
<password>mySecret</password>
<excludePatterns>*-tests.jar</excludePatterns>
<repoKey>libs-release-local</repoKey>
<snapshotRepoKey>libs-snapshot-local</snapshotRepoKey>
</configuration>
</execution>
</executions>
</plugin>
mvn deploy
的结果是一个 IllegalArgutementException:
Caused by: java.lang.IllegalArgumentException: Target repository cannot be empty
at org.jfrog.build.client.DeployDetails$Builder.build(DeployDetails.java:119)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.addDeployableArtifact(BuildInfoRecorder.java:604)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.addArtifactsToCurrentModule(BuildInfoRecorder.java:533)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.addFilesToCurrentModule(BuildInfoRecorder.java:477)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.finalizeAndAddModule(BuildInfoRecorder.java:464)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.finalizeModule(BuildInfoRecorder.java:392)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.projectSucceeded(BuildInfoRecorder.java:210)
at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:74)
at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:91)
... 16 more
这是一个错误还是我做错了什么?
Artifactory 版本:Artifactory OSS 4.11.1 rev 40241
我认为您的插件配置缺少发布者标签。您可以使用 Maven Artifactory 插件参考指南以及此示例项目:
https://github.com/JFrogDev/project-examples/tree/master/artifactory-maven-plugin-example
希望对您有所帮助。