Skip to content

Commit

Permalink
feat: publish Kit snapshot to sonatype (#759)
Browse files Browse the repository at this point in the history
* publish Kit snapshot to sonatype

* publish parent pom and fixes for jrelease process

* use legacy server

* unneeded property
  • Loading branch information
jperedadnr authored Oct 22, 2024
1 parent 8cb8648 commit 0d5d6cb
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 31 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/early-access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,22 @@ jobs:
run: |
mvn -B -ntp -pl :parent -DartifactsDir=artifacts jreleaser:release
- name: Deploy parent pom and Kit to local staging
run: |
mvn -B -ntp deploy -pl :parent -Dmaven.test.skip=true
mvn -B -ntp deploy -fkit -Dmaven.test.skip=true
- name: Publish Kit with JReleaser
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_NEXUS2_USERNAME: ${{ secrets.JRELEASER_NEXUS2_USERNAME }}
JRELEASER_NEXUS2_PASSWORD: ${{ secrets.JRELEASER_NEXUS2_TOKEN }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
run: |
mvn -B -ntp -pl :parent jreleaser:deploy
- name: JReleaser output
if: always()
uses: actions/upload-artifact@v4
Expand Down
7 changes: 7 additions & 0 deletions gluon-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
<gluon.attach.version>4.0.21</gluon.attach.version>
</properties>

<repositories>
<repository>
<id>gluon-nexus</id>
<url>https://nexus.gluonhq.com/nexus/content/repositories/releases/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.gluonhq.scenebuilder</groupId>
Expand Down
48 changes: 41 additions & 7 deletions kit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>kit</artifactId>
<name>Scene Builder Kit</name>

<description>Scene Builder is a visual, drag n drop, layout tool for designing JavaFX application user interfaces</description>
<inceptionYear>2012</inceptionYear>
<url>https://github.com/gluonhq/scenebuilder</url>

<parent>
<groupId>com.gluonhq.scenebuilder</groupId>
<artifactId>parent</artifactId>
Expand Down Expand Up @@ -47,17 +50,48 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<version>3.4.2</version>
<configuration>
<finalName>scenebuilder-kit-${project.version}</finalName>
<outputDirectory>target/lib</outputDirectory>
<archive>
<manifestEntries>
<Automatic-Module-Name>com.gluonhq.scenebuilder.kit</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</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>
<configuration>
<attach>true</attach>
<doclint>none</doclint>
<jarOutputDirectory>${project.build.directory}/lib</jarOutputDirectory>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</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</goal>
</goals>
<configuration>
<attach>true</attach>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
52 changes: 28 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,10 @@
<project.github.repository>gluonhq/scenebuilder</project.github.repository>
<repository.url>github.com:${project.github.repository}</repository.url>
<jreleaser.files.active>RELEASE</jreleaser.files.active>
<altDeploymentRepository>local::file:./target/staging-deploy</altDeploymentRepository>
<main.class.name/>
</properties>

<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
<repository>
<id>gluon-nexus</id>
<url>https://nexus.gluonhq.com/nexus/content/repositories/releases/</url>
</repository>
</repositories>

<dependencyManagement>
<dependencies>
<dependency>
Expand Down Expand Up @@ -102,23 +92,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.13.0</version>
<configuration>
<useIncrementalCompilation>false</useIncrementalCompilation>
</configuration>
</plugin>

<!-- Deploy to Maven Central -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
<configuration>
<skip>true</skip>
</configuration>
<inherited>false</inherited>
</plugin>

<!-- Enforce code formatting and style -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -146,6 +125,12 @@
<version>3.2.0</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.3</version>
</plugin>

<!-- Ensure that available tests are executed -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -203,7 +188,7 @@
<plugin>
<groupId>org.jreleaser</groupId>
<artifactId>jreleaser-maven-plugin</artifactId>
<version>1.5.1</version>
<version>1.14.0</version>
<inherited>false</inherited>
<configuration>
<jreleaser>
Expand Down Expand Up @@ -356,6 +341,25 @@
</artifact>
</artifacts>
</files>
<signing>
<active>ALWAYS</active>
<armored>true</armored>
</signing>
<deploy>
<maven>
<nexus2>
<maven-central>
<active>ALWAYS</active>
<url>https://oss.sonatype.org/service/local</url>
<snapshotSupported>true</snapshotSupported>
<snapshotUrl>https://oss.sonatype.org/content/repositories/snapshots</snapshotUrl>
<closeRepository>true</closeRepository>
<releaseRepository>false</releaseRepository>
<stagingRepositories>target/staging-deploy</stagingRepositories>
</maven-central>
</nexus2>
</maven>
</deploy>
</jreleaser>
</configuration>
</plugin>
Expand Down

0 comments on commit 0d5d6cb

Please sign in to comment.