Maven repository

Maven repository

After years finally we’ve made the step to offer a private Maven repository for DidiSoft OpenPGP Library for Java.

The traditional way of downloading new versions from our customers’ section will remain as well but for development teams that rely on Maven as build tool, switching to a newer version of the library will be just changing the version number in their pom.xml

That’s why we’ve released version 3.1.2.1 which is just mavenized 3.1.1.10. If you wish to swith to the Maven integration described below you have to start from the new version 3.1.2.1.

Maven Integration how-to

In your ~/.m2/settings.xml you have to specify your login credentials (the same email used for accessing our customers’ section)

<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
                          https://maven.apache.org/xsd/settings-1.0.0.xsd">
...						  
      <servers>
	<server>
            <id>didisoft-repository</id>
            <username>email address for accessing DidiSoft Customers section</username>
            <password>email address for accessing DidiSoft Customers section</password>
        </server>
      </servers>		
...	  
    </settings>

And in your project pom.xml you have to define the URL of our repository:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
	...
	<repositories>
		<repository>
		  <id>didisoft-repository</id>
		  <url>https://didisoft.com/repox/</url>
		</repository>
	 </repositories>
	 ...
</project>

The final step is to actually define the pgplib JAR file as dependency in your project pom.xml:

   <dependencies>
	<dependency>
	  <groupId>com.didisoft</groupId>
	  <artifactId>pgplib</artifactId>
	  <version>3.1.2.1</version>
	</dependency>
  </dependencies>

Specifying only the version of the pgplib JAR is enough, the dependent versions of our shaded BouncyCastle version will be downloaded.

Shaded BouncyCastle

The BouncyCastle JAR files that we use are a shaded version of the original BouncyCastle jars but with the org.bouncycastle package naming changed to lw.bouncycastle (this is in order to avoid class loading collisions).

Acknowledgements

A great part of this effort was made with the help of Mykel Alvis from Cotivity.