Wednesday, July 1, 2015

How to upload your Java artifact to Maven Central

https://blog.idrsolutions.com/2015/06/how-to-upload-your-java-artifact-to-maven-central/

Steps

To host an artifact on Maven Central there are a few things to adhere in order for your artifact to be hosted.
  • Create a SonaType JIRA Ticket
  • Your pom.xml needs to meet a minimum requirement
  • You must supply the source code and javadoc
  • You must sign your artifact with GPG/PGP


Sunday, May 2, 2010

Find the classpath

1) ProtectionDomain protectionDomain = Test.class.getProtectionDomain();
URL location = protectionDomain.getCodeSource().getLocation();
System.out.println(location);

OR

2) System.out.println(Test.class.getResource("Test.class"));