seba
seba

Reputation: 403

Migrating from Maven Ant Tasks to Maven Artifact Resolver Ant Tasks: Signing

Maven Ant Tasks has been retired in favor of Maven Artifact Resolver Ant Tasks. There is no official migration path and the documentation is, well, OK.

We used Maven Ant Tasks to stage our jars into Sonatype for publication in Maven Central. I've been able to almost completely replicate that behavior in Maven Artifact Resolver Ant Tasks, but I haven't been able to sign the jars.

Does anybody know how this should be performed? Previously, I'd add a

<arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file" />

in the <artifact:mvn> task. Now I have a <resolve:deploy> task

      <resolver:deploy>
         <pom file="pom.xml"/>
         <remoterepo id="${maven-staging-repository-id}" url ="${maven-staging-repository-url}"/>
         <artifact file="${maven-jar}" type="jar"/>
         <artifact file="${maven-sources-jar}" type="jar" classifier="sources"/>
         <artifact file="${maven-javadoc-jar}" type="jar" classifier="javadoc"/>
      </resolver:deploy>

and it works perfectly, but no signing.

Upvotes: 0

Views: 224

Answers (1)

TNorb
TNorb

Reputation: 61

I had the exact same issue. Only thing I found was to create a macrodef in my ant build which manually signs artifacts. Temp solution derived from here: https://apache.googlesource.com/pig/+/e22fcb2967489388f07307e3de689a7c9cc9b6f8/build.xml

Upvotes: 0

Related Questions