My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
DeveloperMavenNotes  
How to setup an environment to build this project with maven
Featured, Phase-Implementation
Updated Aug 6, 2010 by sebastien.andre.288@gmail.com

Maven Repository considerations

Since version 1.0.2, this project is hosted on Nexus OSS Repository that receive staged artifacts. After a while theses artifacts can be promoted to release artifacts and synced with the Maven Central Repository hourly

Maven project integration

  • Add in your pom.xml a dependency into JBusyComponent artifact:
  • <dependency>
        <groupId>org.divxdede</groupId>
        <artifactId>jbusycomponent</artifactId>
        <version>1.0.2</version>
    </dependency> 

The Maven Central Repository contains released versions and requires no additionnal configuration.

If you want use snapshot versions, refer to the Nexus OSS Repository with this configuration:

    <repositories>
        <repository>
            <id>sonatype.oss.snapshots</id>
            <name>Sonatype OSS Snapshot Repository</name>
            <url>http://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
              <enabled>false</enabled>
            </releases>
            <snapshots>
              <enabled>true</enabled>
            </snapshots>
        </repository> 
    </repositories>

Be careful, the older release 1.0.0 is deployed into the com.google.code groupId instead of org.divxdede

Building this project

This project is build on top of maven and need some tools for achieve a complete deployement process. Keep in mind that this process require some private stuff like

  1. Deployement access to the OSS Nexus Repository
  2. PGP Secret Key for sign artifacts.
  3. Google Code Subversion access for commiters (that can be provided on demand)
  4. Google code authorization for setting new manual downloads
That's why, The following guide can help you to build or participate to this project but not really deploy yourself artifacts.

Required stuff

3 tools are needed:

  1. Subversion that can be found http://www.open.collab.net/downloads/subversion/ for checkout or commiters

In order to be synced into the Maven Central Repository, JBusyComponent artifacts are signed. the public key 100D95E6 can be found at http://pgp.mit.edu/ for authentification control. You don't need a sign it for a simple build. This steps is only required when deploying.

You need to do some pre-configurations of theses tools:

  • %MAVEN_HOME%/conf/settings.xml for configure repository access (required for deploy)
  • GnuPG ring keys required for sign artifacts (and $GNUPGHOME environment variable)

The settings.xml must refer repository access like it:

<settings>
    <servers>
        <server>
            <id>sonatype-nexus-staging</id>
            <username>your_sonatype_login</username>
            <password>your_sonatype_passwd</password>
        </server>
        <server>
            <id>sonatype-nexus-snapshots</id>
            <username>your_sonatype_login</username>
            <password>your_sonatype_passwd</password>
        </server>
    </servers>
</settings>

After what, you can build this project following theses commands:

  • Build the project: mvn clean package
  • Install the artifact in local repository: mvn install

Create a release tag in subversion

For this step you require a write access over https on googlecode subversion. You can be promote to contributors on demand but you need a googlecode account.

  1. mvn clean release:prepare -Dusername=XXXXXX -Dpassword=XXXXXXX
  2. mvn release:perform -Dusername=XXXXXX -Dpassword=XXXXXXX
  3. mvn release:clean

For this step, you should require to run you cmd windows shell in Administrator Mode for Windows Vista / Windows 7

For deploying apidocs inside googlecode, we commit this docs under svn and browse it directly. The counter-part of this method is that ìt requires svn:mime-type for all files in order to be correctly rendered.

You must configure your svn config file under %USER%/AppData/Roaming/Subversion on windows like it:

[miscellany]
enable-auto-props = yes

[auto-props]
*.html = svn:mime-type=text/html
*.css = svn:mime-type=text/css
*.txt = svn:mime-type=text/plain
*.jpg = svn:mime-type=image/jpeg
*.gif = svn:mime-type=image/gif
*.png = svn:mime-type=image/png
*.jar = svn:mime-type=application/java-archive
*.jnlp = svn:mime-type=application/x-java-jnlp-file

Be careful, this auto mime-types must be configured in other place to order to work under Netbeans. The netbeans placeholder is like %USER%\.netbeans\6.9\config\svn\config

Deploying staged artifacts

  • mvn clean deploy -Dgpg.passphrase=yourpassphrase
  • You should use after the OSS Nexus repository interface to promote an artifact

Creating an account on Sonatype OSS repository

See the Sonatype Repository hosting guide

Your pom.xml's project must describe sonatype repositories:

        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>http://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
  • On sonatype, you must promote this staged artifact to release

Maven documentations resources


Sign in to add a comment
Powered by Google Project Hosting