Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
cache-dependency-path: 'pom.xml'
- name: Build with Maven
run: |
./mvnw --no-transfer-progress --batch-mode clean verify
./mvnw --no-transfer-progress --batch-mode clean verify -Dgpg.skip
5 changes: 5 additions & 0 deletions .github/workflows/push-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
java-version: '25'
cache: 'maven'
cache-dependency-path: 'pom.xml'
server-id: ossrh
server-username: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
server-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
gpg-private-key: ${{ secrets.GPG_KEY }}
gpg-passphrase: ${{ secrets.GPG_KEY_PASSWORD }}
- name: Set up Git user
run: |
git config user.name github-actions[bot]
Expand Down
55 changes: 3 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ It is used to reduce runtime dependencies because the JavaFX FXML loader is not
<plugin>
<groupId>com.github.bsels</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>

<executions>
<execution>
Expand Down Expand Up @@ -228,7 +228,7 @@ binaries,logging configuration, optional ZIP packaging, etc.).
<plugin>
<groupId>com.github.bsels</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>

<executions>
<execution>
Expand Down Expand Up @@ -363,7 +363,7 @@ The goal executes during the `proces-classes` phase and requires **runtime** dep
<plugin>
<groupId>com.github.bsels</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>

<executions>
<execution>
Expand Down Expand Up @@ -446,52 +446,3 @@ java -Djava.util.logging.SimpleFormatter.format=%1$tF %1$tT %4$s %2$s - %5$s%6$s
-cp target/classes:... \
com.example.app.MainApp --mode demo --verbose
```

## 📦 Including This Library in Your Project

What you need to do:

1. Add the GitHub Packages registry to your Maven settings so Maven can resolve the artifact from GitHub’s Maven
Artifactory.
2. Update your pom.xml (or Gradle build) to point to the new coordinates once they’re published.
3. For a complete walkthrough—including how to generate a PAT and configure Maven/Gradle—see GitHub’s official
documentation: [🔗 Authenticating to GitHub Packages (Maven)](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-to-github-packages)

```xml

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">

<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>

<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/bsels/javafx-maven-plugin</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>github</id>
<username>YOUR-USERNAME</username>
<password>YOUR-PAT-TOKEN</password>
</server>
</servers>
</settings>
```
54 changes: 50 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@
<artifactId>javafx-maven-plugin</artifactId>
<version>1.0.2</version>
<packaging>maven-plugin</packaging>
<name>javafx-maven-plugin Maven Mojo</name>
<name>${project.groupId}:${project.artifactId}</name>
<description>
A lightweight Maven plugin based on the JavaFX Maven Plugin with three goals: fxml‑source generates type‑safe
Java classes from FXML at compile time; run launches the app for development; jlink builds a minimal
self‑contained runtime image. Requires Java 25+, a modular project, and provides config for packages, debugging,
logging, native binaries.
</description>
<url>https://github.com/bsels/javafx-maven-plugin</url>

<licenses>
<license>
Expand All @@ -21,9 +28,18 @@
<developers>
<developer>
<name>Boris Sels</name>
<email>boris.sels@gmail.com</email>
<organization>GitHub</organization>
<organizationUrl>https://github.com</organizationUrl>
</developer>
</developers>

<scm>
<connection>scm:git:git://github.com/bsels/javafx-maven-plugin.git</connection>
<developerConnection>scm:git:ssh://github.com:bsels/javafx-maven-plugin.git</developerConnection>
<url>http://github.com/bsels/javafx-maven-plugin/tree/master</url>
</scm>

<properties>
<java.version>24</java.version>
<!--region Plugin versions -->
Expand All @@ -33,6 +49,8 @@
<maven.compiler.plugin.version>3.14.1</maven.compiler.plugin.version>
<maven.surefire.plugin.version>3.5.4</maven.surefire.plugin.version>
<maven.plugin.plugin.version>3.15.2</maven.plugin.plugin.version>
<maven.gpg.plugin.version>1.5</maven.gpg.plugin.version>
<central.publishing.maven.plugin.version>0.9.0</central.publishing.maven.plugin.version>
<!--endregion-->
<!--region Dependency versions -->
<assertj.version>3.27.6</assertj.version>
Expand Down Expand Up @@ -112,6 +130,31 @@
<artifactId>maven-plugin-plugin</artifactId>
<version>${maven.plugin.plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven.gpg.plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>${central.publishing.maven.plugin.version}</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>ossrh</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
</plugins>
</build>

Expand Down Expand Up @@ -196,10 +239,13 @@
</dependencies>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>github</id>
<name>GitHub Maven Packages</name>
<url>https://maven.pkg.github.com/bsels/javafx-maven-plugin</url>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</project>