Skip to content

Commit 510638e

Browse files
authored
Jenkins jobs - promotion fix (#698)
This is fix for GPG signing used during promotion. There was incorrect Maven version used by maven-ant-task plugin during gpg sign and deploy. Signed-off-by: Radek Felcman <[email protected]>
1 parent 8fcfa30 commit 510638e

File tree

1 file changed

+9
-26
lines changed

1 file changed

+9
-26
lines changed

uploadToNexus.xml

+9-26
Original file line numberDiff line numberDiff line change
@@ -596,38 +596,21 @@
596596
<!-- Staging targets -->
597597
<target name="ua-staging" if="sign">
598598
<!-- sign and deploy the main artifact -->
599-
<artifact:mvn>
600-
<arg value="org.apache.maven.plugins:maven-gpg-plugin:${gpg.plugin.version}:sign-and-deploy-file"/>
601-
<arg value="-Durl=${stagingURL}"/>
602-
<arg value="-DrepositoryId=${stagingId}"/>
603-
<arg value="-DpomFile=${maven.build.location}/pom.xml"/>
604-
<arg value="-Dfile=${artifact}"/>
605-
<arg value="-Pgpg"/>
606-
</artifact:mvn>
599+
<exec dir="${maven.build.location}" executable="sh">
600+
<arg line="-c '${M2_HOME}/bin/mvn clean gpg:sign-and-deploy-file -Dfile=${artifact} -DpomFile=${maven.build.location}/pom.xml -Durl=${stagingURL} -DrepositoryId=${stagingId} -Poss-release'" />
601+
</exec>
607602
</target>
608603
<target name="us-staging" if="sign">
609604
<!-- sign and deploy the sources artifact -->
610-
<artifact:mvn>
611-
<arg value="org.apache.maven.plugins:maven-gpg-plugin:${gpg.plugin.version}:sign-and-deploy-file"/>
612-
<arg value="-Durl=${stagingURL}"/>
613-
<arg value="-DrepositoryId=${stagingId}"/>
614-
<arg value="-DpomFile=${maven.build.location}/pom.xml"/>
615-
<arg value="-Dfile=${artifactSrc}"/>
616-
<arg value="-Dclassifier=sources"/>
617-
<arg value="-Pgpg"/>
618-
</artifact:mvn>
605+
<exec dir="${maven.build.location}" executable="sh">
606+
<arg line="-c '${M2_HOME}/bin/mvn clean gpg:sign-and-deploy-file -Dfile=${artifactSrc} -DpomFile=${maven.build.location}/pom.xml -Durl=${stagingURL} -DrepositoryId=${stagingId} -Dclassifier=sources -Poss-release'" />
607+
</exec>
619608
</target>
620609
<target name="uj-staging" if="sign">
621610
<!-- sign and deploy the javadoc artifact -->
622-
<artifact:mvn>
623-
<arg value="org.apache.maven.plugins:maven-gpg-plugin:${gpg.plugin.version}:sign-and-deploy-file"/>
624-
<arg value="-Durl=${stagingURL}"/>
625-
<arg value="-DrepositoryId=${stagingId}"/>
626-
<arg value="-DpomFile=${maven.build.location}/pom.xml"/>
627-
<arg value="-Dfile=${artifactJavadoc}"/>
628-
<arg value="-Dclassifier=javadoc"/>
629-
<arg value="-Pgpg"/>
630-
</artifact:mvn>
611+
<exec dir="${maven.build.location}" executable="sh">
612+
<arg line="-c '${M2_HOME}/bin/mvn clean gpg:sign-and-deploy-file -Dfile=${artifactJavadoc} -DpomFile=${maven.build.location}/pom.xml -Durl=${stagingURL} -DrepositoryId=${stagingId} -Dclassifier=javadoc -Poss-release'" />
613+
</exec>
631614
</target>
632615

633616
<!-- ************************************* NOT USED **************************************** -->

0 commit comments

Comments
 (0)