Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
run: cd java && mvn test
publish:
runs-on: ubuntu-latest
if: ${{ github.event.release.tag_name }}
steps:
- name: Checkout code
uses: actions/checkout@v6
Expand All @@ -47,8 +46,12 @@ jobs:
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Dry-run publish package
if: ${{ !github.event.release.tag_name }}
run: cd java && mvn verify -Prelease
- name: Publish package
run: cd java && mvn --batch-mode deploy
if: ${{ github.event.release.tag_name }}
run: cd java && mvn release:prepare release:perform
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_TOKEN }}
87 changes: 80 additions & 7 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>ahusson</id>
<name>Augustin Husson</name>
<organization>Perses</organization>
<organizationUrl>https://perses.dev</organizationUrl>
</developer>
</developers>

<properties>
<maven.compiler.source>21</maven.compiler.source>
Expand All @@ -44,18 +52,83 @@
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.10.0</version>
<extensions>true</extensions>
<!-- Fixing version & activating "release" profile for those who use release plugin -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
<autoVersionSubmodules>true</autoVersionSubmodules>

<!-- Forward compatibility: "release-profile" will be removed from super POM.
It's better to define javadocs, sources, signing, etc. in an independent "release" profile. -->
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.10.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.10.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down
Loading