Skip to content
Francis ANDRE edited this page Apr 11, 2021 · 1 revision

Welcome to the javacc-8 wiki!

How-to: Releasing a JavaCC-8 module

This chapter explains the prerequirments and the steps for releasing a JavaCC-8 module, be either core, java, cpp, csharp, js or javacc.

First of all, one needs to define a PGP keys as described there: https://central.sonatype.org/publish/requirements/gpg/. The Maven Central store is requiring that all published artifacts be signed with PGP. So, that's a mandatory step and your PGP public key must be deployed on a standard PGP server before anything.

Once done, one should add to the personnal settings.xml the following elements

<settings>
  <serves>
    <server>
      <id>ossrh</id>
      <username>your-jira-id</username>
      <password>your-jira-pwd</password>
    </server>
  </servers>
</settings>

as well as adding those profiles

<profiles>
	<profile>
		<id>ossrh</id>
		<activation>
			<activeByDefault>true</activeByDefault>
		</activation>
		<properties>
			<gpg.executable>gpg</gpg.executable>
			<gpg.passphrase>your-passphrase</gpg.passphrase>
		</properties>
	</profile>
	<profile>
		<id>release</id>
		<properties>
			<gpg.executable>gpg</gpg.executable>
			<gpg.passphrase>your-passphrase</gpg.passphrase>
 		</properties>
	</profile>
</profiles>

All detailled information can be found there: https://central.sonatype.org/publish/

Once done, one can release a module using the maven-release-plugin

  1. start the ssh agent on Windows: start-ssh-agent on linux: ???
  2. cd <the module directory>
  3. mvn -P release release:prepare
  4. mvn -P release release:perform

In case of some errors happen on step 3 or 4, run: mvn -P release release:rollback, correct the errors and restart at step 3

Useful links: maven-release-plugin

Good luck!

Clone this wiki locally