Table of Contents
- Maven Central Repository
Project Preparation
- . I started reading to sign artifacts to verify their authenticity.
Install:
CODEbrew install gpg
Create a Key Pair:
CODEgpg --full-generate-key
Continue Setting Up pom.xml
After you've generated a pair of keys for gpg, we set up profile and specifying short version of key:
CODE<profiles>
<profile>
<id>ossrh</id>
<properties>
<gpg.executable>gpg</gpg.executable>
<gpg.keyname>8882786B85D55E84</gpg.keyname>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
</profiles>
Create settings.xml
After all the project preparations, you must create settings.xml inside of you
Maven Configuration Directory.
- For macOS/Linux the path is:
~/.m2/settings.xml
- For Windows:
C:\Program Files\Apache Software Foundation\maven\conf\settings.xml
The content of
settings.xmllooks like this:
CODE<settings>
<servers>
<server>
<id>ossrh</id>
<username><your-username></username>
<password><your-password></password>
</server>
</servers>
</settings>
and you should generate in , and will see that you deployment is verifying, after some time, if everything goes as expected, the button
Publishwill appear.
you check your product by artifactId, in my case it's
PolyglotCode. My project looks like this: Click me :D.
Note: There you will be able to find instructions on how to integrate your project into your project.
The Saddest Part
I wasn't able to find a way how to publish my tool as CLI tool, and was only able to publish it as a component for
Maven, which you integrate, and use as a class...
To create a CLI tool next time I would use JS, TS, Rust, etc...
Conclusion
I was so excited to share with you my first ever published work. Unfortunately, it did go as I wasn't expecting :c
↗ Original-Artikel auf dev.to lesenVollständiger Original-BerichtAusführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to. - For macOS/Linux the path is:
- . I started reading to sign artifacts to verify their authenticity.
SOCIAL SHARE CARD GENERATOR