Last active
June 27, 2023 05:03
-
-
Save thombergs/6653895 to your computer and use it in GitHub Desktop.
Using Maven to deploy to Maven Central
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvn -s settings.xml clean javadoc:jar source:jar gpg:sign -Dgpg.passphrase=your_passphrase deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvn clean javadoc:jar source:jar gpg:sign -Dgpg.passphrase=your_passphrase install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<distributionManagement> | |
<repository> | |
<id>sonatype</id> | |
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url> | |
</repository> | |
</distributionManagement> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-javadoc-plugin</artifactId> | |
<executions> | |
<execution> | |
<id>attach-javadocs</id> | |
<goals> | |
<goal>jar</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<artifactId>maven-source-plugin</artifactId> | |
<executions> | |
<execution> | |
<id>attach-sources</id> | |
<goals> | |
<goal>jar</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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"> | |
<servers> | |
<server> | |
<id>sonatype</id> | |
<username>your_username</username> | |
<password>your_password</password> | |
</server> | |
</servers> | |
</settings> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment