Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHougaard committed Dec 3, 2024
1 parent 39c1d41 commit 4271cb0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
# -DskipTests

- name: Publish package
run: mvn --batch-mode clean deploy -P central-deploy -DskipTests=true
run: mvn --batch-mode clean deploy -P release -DskipTests=true
env:
MAVEN_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
MAVEN_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
Expand Down
38 changes: 13 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,15 @@
</dependency>
</dependencies>



<!-- Profiles -->
<profiles>
<!-- Release profile for deploying to Maven Central -->
<profile>
<id>release</id>
<activation>
<!-- Only activate if it's a release build -->
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -166,7 +170,7 @@
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
<passphrase>${env.MAVEN_GPG_PASSPHRASE}</passphrase>
<passphrase>${env.MAVEN_GPG_PASSPHRASE}</passphrase> <!-- GPG passphrase from environment -->
</configuration>
</execution>
</executions>
Expand All @@ -176,8 +180,10 @@
</profile>
</profiles>

<!-- Build section -->
<build>
<plugins>
<!-- Compiler Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand All @@ -195,6 +201,7 @@
</configuration>
</plugin>

<!-- Nexus Staging Plugin (for deploying to Sonatype) -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
Expand All @@ -206,6 +213,8 @@
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>

<!-- Attach Sources and Javadocs -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand All @@ -232,28 +241,7 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
<passphrase>${env.MAVEN_GPG_PASSPHRASE}</passphrase>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</build>

</project>

0 comments on commit 4271cb0

Please sign in to comment.