Skip to content

Commit

Permalink
Maven Build: Packages
Browse files Browse the repository at this point in the history
- only publish to Nexus Reporistory Manager (sonatype) when ossrh profile is enabled
  (publish to GitHub otherwise)
  • Loading branch information
tomas-muller committed Apr 13, 2022
1 parent 8cee838 commit dbdacf6
Showing 1 changed file with 51 additions and 11 deletions.
62 changes: 51 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -348,25 +348,65 @@
</plugins>
</build>
</profile>
<profile>
<id>ossrh</id>
<properties>
<gpg.executable>gpg</gpg.executable>
</properties>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<name>Central Repository OSSRH</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>

<!--
<distributionManagement>
<repository>
<id>cpsolver.org</id>
<name>CPSolver Release Repository</name>
<url>ftp://maven.cpsolver.org</url>
<id>github</id>
<name>GitHub CPSolver Apache Maven Packages</name>
<url>https://maven.pkg.github.com/UniTime/cpsolver</url>
</repository>
</distributionManagement>
-->
</project>

0 comments on commit dbdacf6

Please sign in to comment.