Skip to content

Instantly share code, notes, and snippets.

View fkleedorfer's full-sized avatar

Florian Kleedorfer fkleedorfer

View GitHub Profile
@sualeh
sualeh / how_to_sign_and_release_to_the_central_repository_with_github_actions.md
Last active April 5, 2024 05:55
How to Sign and Release to The Central Repository with GitHub Actions

How to Sign and Release to The Central Repository with GitHub Actions

GitHub allows automated builds using GitHub Actions. A commonly asked question is how to release artifacts (packaged Java jars) built by Maven and Gradle to The Central Repository. The GitHub Actions documentation provides only part of the answer.

So, first, configure your Maven project for staging artifacts to The Central Repository, by reading through Configuring Your Project for Deployment and following those steps. Please make sure that the maven-gpg-plugin is configured to prevent gpg from using PIN entry programs, as follows:

<configuration>
  <gpgArguments>
      <arg>--pinentry-mode</arg>
 loopback
@ansell
ansell / gist:1141550
Created August 12, 2011 06:06
Maven: Compiling and installing test jar without running them
mvn -DskipTests test-compile jar:test-jar install
the similar command below, will not compile or package the jar file (if you are using the surefire plugin) so, don't use it if you want to distribute the test jar file without running the tests
mvn -Dmaven.test.skip test-compile jar:test-jar install