|
Publishing Serp to Maven Central Repository¶Serp Project¶Serp is used by OpenJPA for the bytecode enhancement processing. It is maintained as a SourceForge project . Serp has been a very solid third-party dependent software project. OpenJPA has had a dependency on Serp v1.13.1 for a long time. Recently, a problem was discovered JIRA OPENJPA-2240 which required an update to Serp. Eventually, it was determined that this problem was resolved in the 1.14.1 version of Serp. Unfortunately, the last version of Serp that was published to Maven Central was version 1.13.1. This page discusses how to get an updated Serp release into the Maven Central repository. SourceForge Serp: https://sourceforge.net/projects/serp/ Maven Instructions¶The easiest way to get the updated artifacts for Serp 1.14.1 into Maven Central was to follow the instructions on this page. You will need a GPG utility and signature (instructions on that page). You will also need a login for Sonatype's Nexus server (instructions also on that page).
Since this exercise shouldn't be a common occurrence, I just went the manual route and signed each of the artifacts that were built into my local repository: > gpg -ab serp-1.14.1-javadoc.jar > gpg -ab serp-1.14.1.jar > gpg -ab serp-1.14.1-sources.jar > gpg -ab serp-1.14.1.pom And, then I created a bundle: > jar -cvf serp-1.14.1-bundle.jar serp-* The bundle contained: Archive: serp-1.14.1-bundle.jar Length Date Time Name -------- ---- ---- ---- 0 09-04-12 15:23 META-INF/ 62 09-04-12 15:23 META-INF/MANIFEST.MF 962397 09-04-12 15:21 serp-1.14.1-javadoc.jar 499 09-04-12 15:22 serp-1.14.1-javadoc.jar.asc 140576 09-04-12 15:21 serp-1.14.1-sources.jar 499 09-04-12 15:21 serp-1.14.1-sources.jar.asc 206638 09-04-12 15:21 serp-1.14.1.jar 499 09-04-12 15:22 serp-1.14.1.jar.asc 5508 09-04-12 15:21 serp-1.14.1.pom 499 09-04-12 15:23 serp-1.14.1.pom.asc -------- ------- 1317177 10 files This bundle is what I uploaded to the Sonatype Staging repository as outlined on that original wiki page .
Serp Code Updates¶In order to create the -javadoc and -sources jar files, I had to make a couple of minor updates to the existing pom file for serp 1.14.1. I committed these changes to HEAD (1.14.2 snapshot) for future reference: <plugin> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <id>attach-sources</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-javadoc-plugin</artifactId> <executions> <execution> <id>attach-javadoc</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> If we continue to require changes to Serp, we may want to do more extensive changes in the maven processing to make it easier to deploy the artifacts. Several of the deployment locations in the pom.xml no longer exist. I made a couple of updates, but the permissions don't show up right, so the deployment step is still manual. Another idea would be to consume Serp into OpenJPA as an Apache sub-project... That might be the best long-term solution. But, I will leave that for another day. |