0
votes

We're trying to use the Artifactory release process in Jenkins to publish a jar file created by a Gradle build into a Maven repo in our Artifactory server.

It nearly all works, the only issue is that the pom file isn't being copied into the Artifactory repo.

The Gradle build includes the Gradle Maven plugin and running gradlew install locally results in both the jar and the pom inserted into the local Maven repo.

I've added a task in the Gradle build that generates the pom file in the same directory as the jar file and changed the Jenkins build to run that task too.

When the build has completed I can see both the jar and the pom file in the workspace.

Any ideas on what I need to do to get the pom file published along with the jar?

We're using:

  • Jenkins 2.10
  • Artifactory plugin 2.4.4
  • Gradle 2.14

The Gradle build file does not inlcude the Gradle Artifactory plugin.

Cheers, Andy

The Jenkins project is configured to use the Gradle-Artifactory integration (rather than the Generic-Artifactory integration).

1
Do you have any screenshots of the Artifactory upload section of your job? Might give some more insight - Dakota Brown
I realised that in addition to having the artifactory integration enabled, I also had the Maven 3 integration box ticked... Unticking maven3 means that everything now works as expected. - user2926169
Post as an answer and accept it :) Glad it's working - Dakota Brown

1 Answers

0
votes

As suggested by Dakota Brown I'm answering my own question, the solution to my problem was to un-tick the maven3 integration option. With that option unslected, everything works as expected.