User Documentation
__________________
This module is a Maven plugin which supports the creation of a zip format SCA contribution from
the contents of a Maven project. An SCA contribution can be deployed to the Tuscany SCA runtime
and run as an application.
One of the main uses for an SCA zip contribution is that the SCA zip contribution can contain
Java jar files within the zip and those jar files are available to the Java classloader of the
contribution. This enables the packaging of application Java classes along with any other Jar files
which they depend on in one contribution file. As a result the single zip file can hold everything
that's needed for the SCA application other than the Tuscany runtime itself - in one neat package.
The zip Maven plugin is used by adding a section into portion of the pom.xml of the Maven
project which relates to the maven zip plugin. It is also necessary for the packaging of the output
of the project to be declared as "zip". Then run Maven in the project.
This zip plugin builds the output of the project as an SCA zip archive and it includes any
jar files from dependencies declared by the project, where those dependency jar files are placed
into the zip archive in a folder with the name "lib".
An example pom.xml including the zip plugin statements:
...
zip
...
...
...
org.apache.tuscany.maven.pluginsmaven-zip-plugintrue
...
(It is probably a good idea to now give an example of a complete POM containing one this stuff so that
users get the full context - I've attached one here, but it isn't the best example)
4.0.0tuscany-scaorg.apache.tuscany.sca2.0-SNAPSHOTorg.inglenook.test1mikestestzip1.0-SNAPSHOTquickstartorg.apache.tuscany.scatuscany-sca-api${tuscany.version}providedcommons-iocommons-io1.4junitjunit3.8.2testinstall${artifactId}src/main/resourcessrc/main/java****/*.javasrc/test/java****/*.javatrueorg.apache.maven.pluginsmaven-compiler-plugin1.5truetrueorg.apache.maven.pluginsmaven-eclipse-plugintrueorg.apache.tuscany.maven.pluginsmaven-zip-plugintrueorg.apache.tuscany.maven.pluginsmaven-tuscany-plugin2.0-SNAPSHOT
TODOs:
- make the "lib/" folder where the dependent jars go configurable
- make which dependencies get included configurable
(currently its those with compile or runtime scope)
---------------------------------
Building and releasing the plugin
---------------------------------
From the top maven-zip-plugin directory run maven:
mvn
or once all the dependencies have been downloaded and a succesful build run use:
mvn clean install -o
So as to avoid the Tuscany SCA project using SNAPSHOT dependencies any changes
to this maven-zip-plugin module should be released and the Tuscany SCA
project updated to use the newly released version.
To release this module:
mvn release:prepare
followed by:
mvn release:perform
That will automatically create an SVN tag from the release, update the version
numbers in the pom.xml files in the trunk and tag, and deploy the artifacts to the
staging repository defined by the in your Maven settings.xml.
While running it will prompt you for the names for the tag, release version etc.
In your maven settings.xml file you must have a server defined named "apache.releases",
and a profile named "release". For example:
...
apache.releasesantelder\ant\id_dsaxxx775664
...
release...apache.releases::default::scp://people.apache.org/home/antelder/public_html/tuscany/maven-zip-plugin-1.0
Call a vote to release the module, eg: http://apache.markmail.org/message/6jnlfxbx7uklt5nv
After a successfule vote copy the staging artifacts to the live repository, eg:
cp -p -v -R maven-zip-plugin-alpha1/org/apache/tuscany/maven/plugins/ /x1/www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/tuscany/maven/plugins
-----------------------------------------------------------------------------
This Tuscany module includes much code copied from the Maven WAR plugin 2.0.2
written by the Apache Maven team.
-----------------------------------------------------------------------------