 |
Woodstock integration in Maven2 repository
Abstract
This document describes some details about implementation of automated integration of Woodstock? deliverables into Maven2 repository on Java.Net. Woodstock? build delivers a few libraries used in Glassfish builds. Glassfish team decided to convert their build system (from Ant) to Maven. Maven build system is using very exact definitions of dependencies and is able to resolve all dependencies transitively. This introduces higher demand on proper marking of build deliverables and dependencies on third party libraries. This page will show some information about Woodstock library dependencies and a system how Woodstock components could be integrated in Maven2 repository on java.net, from where Glassfish team could take them.
Woodstock library dependencies
- webui-jsf.jar
- dataprovider.jar/1.0
- jhall.jar/2.0
- commons-fileupload.jar/1.0 (already exists as
commons-fileupload:commons-fileupload:1.0 in main Maven repository)
- webui-jsf-suntheme.jar
Note: if you update the dependency graph above, you should also update next paragraph to reflect it
Dependencies in detail
There are two things to resolve. Woodstock depends on third party libraries and delivers it's own artifacts.
Dependent libraries are
| Jarfile | Comment |
| dataprovider.jar | (originally probably from Rave project) |
| jhall.jar | !JavaHelp Search library version 2.0 (perhaps from the JavaHelp java.net project, perhaps not) |
The dependent libraries should be updated only with change of version number (or the library itself).
Woodstock artifacts are
| Jarfile | Comment |
| webui-jsf.jar | Main Woodstock components deliverable |
| webui-jsf-suntheme.jar | Default theme for Woodstock components library |
The Woodstock components can be deployed as much as Product team wants, i.e. bi-weekly QE-verified builds plus releases.
Localization
Woodstock localization jarfiles are "attached" to respective Woodstock deliverable. Nature of the infrastructure requires the list of L10N? jarfile attachments is hard-coded in script
Woodstock's Maven artifacts
Current trunk can produce following Maven artifacts
| Jarfile | Version | GroupId | ArtifactId | Comments |
| webui-jsf.jar | 4.2-SNAPSHOT | com.sun.woodstock | webui-jsf | Carries Localization jarfiles as well |
| webui-jsf-suntheme.jar | 4.2-SNAPSHOT | com.sun.woodstock | webui-jsf-suntheme | Carries Localization jarfiles as well |
| dataprovider.jar | 1.0 | com.sun.woodstock.dependlibs | dataprovider | Not clear about origin of this file and it's license status. |
| jhall.jar | 2.0 | com.sun.woodstock.dependlibs | jhall | Not sure if this particular file was already released under GPLv2 with classpath exception, or if it's older version under original Binary Code License. Rudolf was not able to find good Maven repository for Sun Java SDK provided libraries. There exists just a procedure, how to this best by installing that file locally. |
Based on the table, this implementation introduces two new GroupIds com.sun.woodstock and com.sun.woodstock.dependlibs.
How to test the implementation
Basic procedures
- Checkout Woodstock source code
- Run Woodstock build
- Run Maven integration
Detailed procedure
This procedure assumes, that you've got Ant 1.7.0 in your path and reasonable Java (i.e. 5 Update 6 and above).
$ cd /tmp
$ cvs -d :pserver:guest@cvs.dev.java.net:/cvs checkout woodstock
$ cd woodstock/master
$ ant
$ cd ../maven
$ ant
Sample of Maven2 repository is now available in directory /tmp/woodstock/maven/target/tmp/com/sun/woodstock/. In this directory you should see another three directories - dependlibs, webui-jsf, webui-jsf-suntheme.
Production deployment
The implementation displayed here is locally working sample with ability to become production code with just a few tweaks in configuration of respective production build host.
To upload artifacts to the production kit server
- define production kit server dir
$ cd /tmp/woodstock/maven
$ ant -Dupload.dir=DIRECTORY_NAME
To run in production mode (understand it as deployment to Maven2 java.net repository), you have to do two things.
Defining production repository
You can either uncomment repository identification (repository.id and repository.url properties) in "build.properties" file or define these two properties on Ant command line using the 'ant -Dproperty=value' approach
Integrate the production bits -->
$ cd /tmp/woodstock/maven
$ ant -Dbits.location=DIRECTORY_NAME -Drepository.id=java.net-m2-repository -Drepository.url=java-net:/maven2-repository/trunk/www/repository/
Integrate local bits -->
$ cd /tmp/woodstock/maven
$ ant -Drepository.id=java.net-m2-repository -Drepository.url=java-net:/maven2-repository/trunk/www/repository/
Configuring r/w access to maven2-repository
I've copied and shortened the procedure from maven2-repository project. Original procedure is always available from maven2-repository project on java.net.
- Request a "Maven Publisher" role so that you can get the write access to the repository.
- Follow this instruction and create your ~/.java.net file. This is used to authenticate yourself during the deployment.
Note: the ~/.java.net file contains java.net username and password in plain text form, consider using non-personal account on production build host.
-- Main.rjspellman - 06 Mar 2008
|