SynBioDex / libSBOLj

Java Library for Synthetic Biology Open Language (SBOL)
Apache License 2.0
37 stars 24 forks source link

Add libSBOLj to Maven Central Repository #210

Closed cjmyers closed 8 years ago

cjmyers commented 8 years ago

This should not be done though until we are at stable 2.0. Here is what may be involved.

org.sbolstandard libSBOLj 2.0.0

I recently did this for another project and it wasn’t too arduous. I enclose the pom.xml as an example.

The key is specifying two repositories: one for snapshots, one for full releases:

ossrh https://oss.sonatype.org/content/repositories/snapshots ossrh https://oss.sonatype.org/service/local/staging/deploy/maven2/

The next was adding two plugins, the first for security reasons, signing and verifying the distributions, and the second for submitting to the repository:

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-gpg-plugin</artifactId>
    <version>1.5</version>
    <executions>
      <execution>
        <id>sign-artifacts</id>
        <phase>verify</phase>
        <goals>
          <goal>sign</goal>
        </goals>
      </execution>
    </executions>
  </plugin>
  <plugin>
    <groupId>org.sonatype.plugins</groupId>
    <artifactId>nexus-staging-maven-plugin</artifactId>
    <version>1.6.3</version>
    <extensions>true</extensions>
    <configuration>
      <serverId>ossrh</serverId>
      <nexusUrl>https://oss.sonatype.org/</nexusUrl>
      <autoReleaseAfterClose>true</autoReleaseAfterClose>
    </configuration>
  </plugin>

The gpg plugin (first one) requires that gpg is installed locally: https://www.gnupg.org/

You’ll then need an account with Sonatype, and a “ticket” for the libSBOLj project (see Initial Setup here: http://central.sonatype.org/pages/ossrh-guide.html#releasing-to-central). Probably need an organisation SBOL account somehow, rather than a personal Ernst, Zach or Neil one. This is just to confirm to users that the distribution is trustworthy.

Finally, think you’ll need an update to your settings.xml file in your local .mvn directory to include the Sonatype account username and password (see enclosed file).

Then, I think it’s...

mvn clean deploy

…and you’re done.

cjmyers commented 8 years ago

Here's the Central Repository guide: https://maven.apache.org/guides/mini/guide-central-repository-upload.html I understand that cutting a release following these guidelines is pretty simple, though I haven't done it myself yet.

Thanks, -Jake

cjmyers commented 8 years ago

Begin forwarded message:

From: Neil Swainston neil.swainston@googlemail.com Date: 18 October 2015 at 08:52:29 BST To: Ernst Oberortner e.oberortner@gmail.com Cc: Zach Zundel zach.zundel@utah.edu, u0030884 myers@ece.utah.edu, libSBOL-team libsbol-team@googlegroups.com, Raik Grünberg raik.gruenberg@gmail.com, "James Mclaughlin (PGR)" j.a.mclaughlin@newcastle.ac.uk Subject: Re: HOWTO on clone, compile, and integrate libSBOLj v2.0

Hi Ernst,

I agree with Zach - the Central Maven Repository is the way to go. Think actually, when you sort it, users will only have to add the following to their pom.xml file, as the Central Repository is accessed by default:

org.sbolstandard libSBOLj 2.0.0

I recently did this for another project and it wasn’t too arduous. I enclose the pom.xml as an example.

The key is specifying two repositories: one for snapshots, one for full releases:

ossrh https://oss.sonatype.org/content/repositories/snapshots ossrh https://oss.sonatype.org/service/local/staging/deploy/maven2/

The next was adding two plugins, the first for security reasons, signing and verifying the distributions, and the second for submitting to the repository:

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-gpg-plugin</artifactId>
    <version>1.5</version>
    <executions>
      <execution>
        <id>sign-artifacts</id>
        <phase>verify</phase>
        <goals>
          <goal>sign</goal>
        </goals>
      </execution>
    </executions>
  </plugin>
  <plugin>
    <groupId>org.sonatype.plugins</groupId>
    <artifactId>nexus-staging-maven-plugin</artifactId>
    <version>1.6.3</version>
    <extensions>true</extensions>
    <configuration>
      <serverId>ossrh</serverId>
      <nexusUrl>https://oss.sonatype.org/</nexusUrl>
      <autoReleaseAfterClose>true</autoReleaseAfterClose>
    </configuration>
  </plugin>

The gpg plugin (first one) requires that gpg is installed locally: https://www.gnupg.org/

You’ll then need an account with Sonatype, and a “ticket” for the libSBOLj project (see Initial Setup here: http://central.sonatype.org/pages/ossrh-guide.html#releasing-to-central). Probably need an organisation SBOL account somehow, rather than a personal Ernst, Zach or Neil one. This is just to confirm to users that the distribution is trustworthy.

Finally, think you’ll need an update to your settings.xml file in your local .mvn directory to include the Sonatype account username and password (see enclosed file).

Then, I think it’s...

mvn clean deploy

…and you’re done.

As always, life is never that straightforward. Let me know if / when you have problems.

Cheers,

Neil.

Neil Swainston, PhD Senior Experimental Officer

Centre for Synthetic Biology of Fine and Speciality Chemicals (SYNBIOCHEM) Manchester Institute of Biotechnology University of Manchester Manchester M1 7DN United Kingdom

On 18 Oct 2015, at 01:48, Ernst Oberortner e.oberortner@gmail.com wrote:

That would be ideal IMO.

for version 1, we had the following solution: In the pom.xml file of your Java project, you had to specify: 1) a sonatype repository

Sonatype OSS Snapshot Repository https://oss.sonatype.org/content/repositories/snapshots/ 2) a dependency org.sbolstandard libSBOLj 0.7.0-SNAPSHOT That is, you don’t have to clone, compile, and install libSBOLj. As far as I can remember, this solution was setup by Hector Plahar (JBEI). I see him on Monday and will talk with him how he got it done. Adding libSBOLj to the Maven Central Repository would mean that you don’t have to specify a sonatype repository. Zach, could you try figuring out how to get this done, please? Thanks, Ernst On Oct 17, 2015, at 5:18 PM, Zach Zundel zach.zundel@utah.edu wrote: Will we be adding libSBOLj to the Maven Central Repository? Zach From: libsbol-team@googlegroups.com [mailto:libsbol-team@googlegroups.com] On Behalf Of Chris J. Myers Sent: Saturday, October 17, 2015 10:45 AM To: Ernst Oberortner e.oberortner@gmail.com Cc: libSBOL-team libsbol-team@googlegroups.com; Raik Grünberg raik.gruenberg@gmail.com; James Mclaughlin (PGR) j.a.mclaughlin@newcastle.ac.uk Subject: Re: HOWTO on clone, compile, and integrate libSBOLj v2.0 Hi Ernst, Thanks for doing this. Would you mind updating the README.md file on github once you are satisfied with these instructions? I’m attempting to create issues on github libSBOLj or Specification for the things discussed this week. Here is what I have so far: 1) Updated issue on ontology support to note that need to consider OWL too. 2) Updated issue on flatten to note that good error messages are required when it fails. 3) Added an issue to setup an online validator/converter to enable people to check/convert their files. 4) Added issue to update README.md with better instructions on how to integrate into a Maven project (assigned to Ernst). 5) Added issue to create a hello world project. 6) Added issue to create a better bridge document between specification and library (could people with comments on this, please use this issue to indicate what you think should go in this document). 7) Added issue to make use of continuous integration for both library AND software using SBOL. Note, here is our travis site for libSBOLj: https://travis-ci.org/SynBioDex/libSBOLj Note all is green :-). Jake: could you add comments to this issue on what you think is missing? 8) Added issue to specification to explore making participation on role required. This one is tricky then I originally thought, since it would make existing documents without participant roles invalid. While technically this is perhaps grounds to assign to 3.0, I wonder if we want to go ahead and add to 2.1 quickly. Since there is not yet a lot of SBOL 2.0 in the wild, we might be able to quickly sneak this in. Thoughts? 9) Added issue to specification to write a best practices section on interaction types and participation roles. At a minimum, I think we should create a table in the specification on this. If we do this, I would be happy to add warnings in libSBOLj when they are not followed. What have I missed? Chris On Oct 17, 2015, at 8:01 AM, Ernst Oberortner e.oberortner@gmail.com wrote: Hi all, I wrote a very simple HOWTO on setting up libSBOLj v2.0 and integrating it into a Maven project. Please, could anybody test and verify the steps? And, of course, we could definitely improve the HOWTO. Thanks, Ernst ## You received this message because you are subscribed to the Google Groups "libSBOL-team" group. To unsubscribe from this group and stop receiving emails from it, send an email to libsbol-team+unsubscribe@googlegroups.com. To post to this group, send email to libsbol-team@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/libsbol-team/195B59F2-E52F-4A20-A8A5-A7265B4A8452%40gmail.com. For more options, visit https://groups.google.com/d/optout. ## You received this message because you are subscribed to the Google Groups "libSBOL-team" group. To unsubscribe from this group and stop receiving emails from it, send an email to libsbol-team+unsubscribe@googlegroups.com. To post to this group, send email to libsbol-team@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/libsbol-team/195B59F2-E52F-4A20-A8A5-A7265B4A8452%40gmail.com. For more options, visit https://groups.google.com/d/optout. ## You received this message because you are subscribed to the Google Groups "libSBOL-team" group. To unsubscribe from this group and stop receiving emails from it, send an email to libsbol-team+unsubscribe@googlegroups.com. To post to this group, send email to libsbol-team@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/libsbol-team/BAB2024A-9A4A-4BE3-BEE1-50CE3DFEAF90%40ece.utah.edu. For more options, visit https://groups.google.com/d/optout. ## You received this message because you are subscribed to the Google Groups "libSBOL-team" group. To unsubscribe from this group and stop receiving emails from it, send an email to libsbol-team+unsubscribe@googlegroups.com. To post to this group, send email to libsbol-team@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/libsbol-team/DCB7373F-E776-4F38-928F-066938B921FA%40gmail.com. For more options, visit https://groups.google.com/d/optout. ## You received this message because you are subscribed to the Google Groups "libSBOL-team" group. To unsubscribe from this group and stop receiving emails from it, send an email to libsbol-team+unsubscribe@googlegroups.com. To post to this group, send email to libsbol-team@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/libsbol-team/C31E147F-0A81-4B5D-B8E9-5BD21B67D2DD%40manchester.ac.uk. For more options, visit https://groups.google.com/d/optout.
cjmyers commented 8 years ago

Done.