File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed
Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,11 @@ pipeline {
3434 stages {
3535 stage(' Publish Snapshot to Maven Central' ) {
3636 steps {
37- script {
38- sh " ./mvnw clean deploy"
37+ withCredentials([file(credentialsId : ' secret-subkeys.asc' , variable : ' KEYRING' )]) {
38+ sh ' gpg --batch --import "${KEYRING}"'
39+ sh ' for fpr in $(gpg --list-keys --with-colons | awk -F: \' /fpr:/ {print $10}\' | sort -u); do echo -e "5\n y\n " | gpg --batch --command-fd 0 --expert --edit-key ${fpr} trust; done'
40+
41+ sh " ./mvnw clean deploy -Poss-release -Psnapshots -DskipTests=true"
3942 }
4043 }
4144 }
Original file line number Diff line number Diff line change 282282 <execution >
283283 <id >attach-sources</id >
284284 <goals >
285- <goal >jar</goal >
285+ <goal >jar-no-fork </goal >
286286 </goals >
287287 </execution >
288288 </executions >
@@ -401,6 +401,25 @@ Use is subject to <a href="{@docRoot}/doc-files/speclicense.html" target="_top">
401401 <enforcer .skip>true</enforcer .skip>
402402 </properties >
403403 </profile >
404+ <profile >
405+ <id >oss-release</id >
406+ <build >
407+ <plugins >
408+ <plugin >
409+ <groupId >org.sonatype.central</groupId >
410+ <artifactId >central-publishing-maven-plugin</artifactId >
411+ <extensions >true</extensions >
412+ <configuration >
413+ <autoPublish >${autoPublish} </autoPublish >
414+ <deploymentName >Jakarta Validation ${project.version} -${maven.build.timestamp} </deploymentName >
415+ <publishingServerId >central</publishingServerId >
416+ <waitUntil >published</waitUntil >
417+ <centralSnapshotsUrl >https://central.sonatype.com/repository/maven-snapshots/</centralSnapshotsUrl >
418+ </configuration >
419+ </plugin >
420+ </plugins >
421+ </build >
422+ </profile >
404423 </profiles >
405424
406425</project >
You can’t perform that action at this time.
0 commit comments