openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] OpenJPA > Publishing Serp to Maven Central Repository
Date Tue, 04 Sep 2012 21:27:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/5/_/styles/combined.css?spaceKey=openjpa&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/openjpa/Publishing+Serp+to+Maven+Central+Repository">Publishing
Serp to Maven Central Repository</a></h2>
    <h4>Page  <b>added</b> by             <a href="https://cwiki.apache.org/confluence/display/~kwsutter@gmail.com">Kevin
Sutter</a>
    </h4>
         <br/>
    <div class="notificationGreySide">
         <h1><a name="PublishingSerptoMavenCentralRepository-PublishingSerptoMavenCentralRepository"></a>Publishing
Serp to Maven Central Repository</h1>
<h2><a name="PublishingSerptoMavenCentralRepository-SerpProject"></a>Serp
Project</h2>
<p>Serp is used by OpenJPA for the bytecode enhancement processing.  It is maintained
as a <a href="http://sourceforge.net/projects/serp" class="external-link" rel="nofollow">SourceForge
project</a>.  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
(<a href="http://issues.apache.org/jira/browse/OPENJPA-2240" class="external-link" rel="nofollow">JIRA
OPENJPA-2240</a>) 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.</p>

<p>SourceForge Serp:  <a href="https://sourceforge.net/projects/serp/" class="external-link"
rel="nofollow">https://sourceforge.net/projects/serp/</a><br/>
Serp homepage:  <a href="http://serp.sourceforge.net" class="external-link" rel="nofollow">http://serp.sourceforge.net</a><br/>
Serp sourcecode:  <a href="http://serp.cvs.sourceforge.net/serp" class="external-link"
rel="nofollow">http://serp.cvs.sourceforge.net/serp</a></p>


<h2><a name="PublishingSerptoMavenCentralRepository-MavenInstructions"></a>Maven
Instructions</h2>
<p>The easiest way to get the updated artifacts for Serp 1.14.1 into Maven Central was
to follow the instructions on this page:  <a href="https://docs.sonatype.org/display/Repository/Uploading+3rd-party+Artifacts+to+The+Central+Repository"
class="external-link" rel="nofollow">https://docs.sonatype.org/display/Repository/Uploading+3rd-party+Artifacts+to+The+Central+Repository</a>.
 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).</p>

<p>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:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&gt; gpg -ab serp-1.14.1-javadoc.jar
&gt; gpg -ab serp-1.14.1.jar
&gt; gpg -ab serp-1.14.1-sources.jar
&gt; gpg -ab serp-1.14.1.pom
</pre>
</div></div>

<p>And, then I created a bundle:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&gt; jar -cvf serp-1.14.1-bundle.jar serp-*
</pre>
</div></div>

<p>The bundle contained:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
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
</pre>
</div></div>

<p>This bundle is what I uploaded to the Sonatype Staging repository as outlined on
that <a href="https://docs.sonatype.org/display/Repository/Uploading+3rd-party+Artifacts+to+The+Central+Repository"
class="external-link" rel="nofollow">wiki page</a>.</p>

<h2><a name="PublishingSerptoMavenCentralRepository-SerpCodeUpdates"></a>Serp
Code Updates</h2>
<p>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:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
      &lt;plugin&gt;
          &lt;artifactId&gt;maven-source-plugin&lt;/artifactId&gt;
          &lt;executions&gt;
            &lt;execution&gt;
                &lt;id&gt;attach-sources&lt;/id&gt;
                &lt;goals&gt;
                    &lt;goal&gt;jar&lt;/goal&gt;
                &lt;/goals&gt;
            &lt;/execution&gt;
         &lt;/executions&gt;
      &lt;/plugin&gt;
      &lt;plugin&gt;
          &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
          &lt;executions&gt;
            &lt;execution&gt;
                &lt;id&gt;attach-javadoc&lt;/id&gt;
                &lt;goals&gt;
                    &lt;goal&gt;jar&lt;/goal&gt;
                &lt;/goals&gt;
            &lt;/execution&gt;
         &lt;/executions&gt;
      &lt;/plugin&gt;
</pre>
</div></div>

<p>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.</p>

<p>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.</p>
    </div>
    <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>
       <a href="https://cwiki.apache.org/confluence/display/openjpa/Publishing+Serp+to+Maven+Central+Repository">View
Online</a>
              |
       <a href="https://cwiki.apache.org/confluence/display/openjpa/Publishing+Serp+to+Maven+Central+Repository?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
           </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message