...
Step 5: Make sure your project is a Maven project or follow the migration process.
Step 6: Make sure coordinates are correct (rename packages if necessary).
...
Step 13: Publish the GPG key pair and distribute your key to GPG servers:
gpg - -list-keys
gpg –keyserver gpg - -keyserver [KEY_SERVER] –send- -send-key [KEY_ID]
Some of the key servers are:
...
First of all, please do the same steps as above until step 14 except step5.
Step 15: Add the Maven Ant Tasks to the lib directory.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?> <project name="com.junichi11.netbeans.modules.rainbow.bracesyour-code-name-base" default="netbeans" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant"> <description>Builds, tests, and runs the project .</description> <import file="nbproject/build-impl.xml"/> <path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.1.3.jar" /> <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant" classpathref="maven-ant-tasks.classpath" /> <!-- define Maven coordinates --> <property name="build" value="build" /> <property name="groupId" value="your-group-id" /> <property name="artifactId" value="your-artifact-id" /> <!-- don't forget change the versions of pom.xml and manifest.mf --> <property name="version" value="your-version" /> <!-- defined maven snapshots and staging repository id and url --> <property name="ossrh-snapshots-repository-url" value="https://oss.sonatype.org/content/repositories/snapshots/" /> <property name="ossrh-staging-repository-url" value="https://oss.sonatype.org/service/local/staging/deploy/maven2/" /> <!-- there server id in the Maven settings.xml --> <property name="ossrh-server-id" value="ossrh" /> <property name="code-name-base" value="your-code-name-base(changed dots to hyphens)" /> <property name="nbm-path" value="${build}/${artifactId}-${version}" /> <!-- Need close and release on https://oss.sonatype.org after the nbm is uploaded --> <target name="deploy" depends="clean,nbm" description="deploy release version to Maven repository"> <move file="${build}/${code-name-base}.nbm" toFile="${nbm-path}.nbm"/> <artifact:mvn> <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file" /> <arg value="-Durl=${ossrh-staging-repository-url}" /> <arg value="-DrepositoryId=${ossrh-server-id}" /> <arg value="-DpomFile=pom.xml" /> <arg value="-Dfile=${nbm-path}.nbm" /> <arg value="-Pgpg" /> </artifact:mvn> </target> </project> |
...