Automatically Publish Build Artifacts with BuildHive

Sorry to disappoint those looking for a how-to, but unfortunately this has to be a call to action instead.

BuildHive is a Jenkins-based continuous integration service offered by CloudBees.  It allows any project with a public GitHub repository to benefit from automated build and test actions for every code change.  Setup of BuildHive takes all of logging in with your existing GitHub account, and clicking on a single button.  Best of all, it’s free.  It’s a boon for smaller open source projects.

So how could anyone complain about BuildHive?  Well, leave it to an open source developer to find fault in anything and everything that can’t be readily changed or forked.  One thing BuildHive lacks is a secure means of storing credentials, which you’ll need if you want to automatically publish the results of your build to say the SonaType OSS Repository Hosting Service.

If this sounds like a feature you would use then let your voice be heard!  You can do so in the comments of the BuildHive secure credentials storage feature requestUpdate: Whether intentionally or otherwise feature requests are apparently no longer publicly accessible.  Even when logged in I can’t see the request I previously commented on.  It seems the remaining option would be to create an account and file an individual feature request.

In the meantime—assuming you’re not partial to Jenkins—Travis CI offers a facility for encrypting sensitive data.  See Automatically Publish to Sonatype with Gradle and Travis CI for more.

Posted in Software Tagged with:

Apache Arrrchiva

Noting that today is International Talk Like a Pirate Day, have a look at the front page of my company’s local Apache Archiva installation (as captured this morning):

Apache Arrrchiva

There’s nothing like a good sense of humor.

Posted in Software

ECJ 3.7.2 Published to Maven Central

Today I’ve uploaded ECJ 3.7.2 (R-3.7.2-201202080800) to the Maven Central repository.  This version is for use with Apache Tomcat 7.0.28 and up.  Enjoy.

Posted in Software Tagged with: ,

ECJ 3.7.1 Published to Maven Central

In order to assist the Apache Tomcat project I’ve recently taken to publishing versions of the Eclipse JDT Core Batch Compiler (ECJ) to the Maven Central repository.  Tomcat is presently built with Ant, not Maven, and on occasion it’s published POM file for the Jasper JSP parser refers to ECJ dependencies that are not available in Maven Central.  Today I’ve uploaded ECJ 3.7.1 (R-3.7.1-201109091335).

The process is well documented in Uploading 3rd-party Artifacts to Maven Central, but hopefully the following example makes it that much more accessible to others.  I’ll assume you have Maven installed and are familiar with its basic usage.

  1. First one needs an OpenPGP key, with the public half published to an open key server.  I found the Ubuntu GnuPrivacyGuardHowto very helpful in this regard, specifically sections 2 & 3.  You’ll find my public key on Ubuntu’s key server.
  2. We’ll need some directories to work with:
    mkdir -p ~/Development/ecj/3.7.1/src/main/java
    cd ~/Development/ecj/3.7.1/
    mkdir -p target/classes
  3. Pull down the ECJ source and binaries from Eclipse.  (Finding the drops for a given version generally entails fishing around
  4. Next extract the downloads to the directories Maven expects:
    cd src/main/java/
    jar -xvf ~/Downloads/ecjsrc-3.7.1.jar org
    cd - ; cd target/classes
    jar -xvf ~/Downloads/ecj-3.7.1.jar org
    cd -
  5. Borrowing from those of prior versions, craft a suitable POM at the root of our working directory in a file named pom.xml.
  6. Create the artifact bundle with Maven:
    mvn source:jar javadoc:jar package gpg:sign repository:bundle-create

    Maven prompts for our OpenPGP private key’s password from step #1:

    [INFO] --- maven-gpg-plugin:1.3:sign (default-cli) @ ecj ---
    GPG Passphrase: ************************

    Note that the Java .class files will not be recreated because we extracted the binaries as they were built by Eclipse.  This avoids any Java compiler version or target issues:

    [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ ecj ---
    [INFO] Nothing to compile - all classes are up to date

    We’ll be prompted whether to exclude any files from the bundle, but we want them all so just enter ‘0’:

    0.) Done
    1.) ecj-3.7.1.jar
    2.) ecj-3.7.1.jar.asc
    3.) ecj-3.7.1.pom.asc
    4.) ecj-3.7.1-javadoc.jar
    5.) ecj-3.7.1-sources.jar
    6.) ecj-3.7.1-javadoc.jar.asc
    7.) ecj-3.7.1-sources.jar.asc
    Please select the number(s) for any files you wish to exclude, or '0' when you're done.
    Separate the numbers for multiple files with a comma (',').
    [INFO] Building jar: /Users/ibrandt/Development/ecj/3.7.1/target/ecj-3.7.1-bundle.jar
  7. Now all that’s left to do is upload the bundle archive to per the aforementioned guide.

For those wishing to see Eclipse artifacts regularly published to a Maven repository see, and place your votes here:

Posted in Software Tagged with: ,

Back in Black

After a 4 year hiatus my blog is back.   Stay tuned for news and thoughts related to my passion for creating software.

Posted in Meta

Post Categories