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.sca tuscany-zip-plugin true ... (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.0 tuscany-sca org.apache.tuscany.sca 2.0-SNAPSHOT org.inglenook.test1 mikestest zip 1.0-SNAPSHOT quickstart org.apache.tuscany.sca tuscany-sca-api ${tuscany.version} provided commons-io commons-io 1.4 junit junit 3.8.2 test install ${artifactId} src/main/resources src/main/java ** **/*.java src/test/java ** **/*.java true org.apache.maven.plugins maven-compiler-plugin 1.5 1.5 true true org.apache.maven.plugins maven-eclipse-plugin true org.apache.tuscany.sca tuscany-zip-plugin true org.apache.tuscany.sca tuscany-maven-plugin 2.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 tuscany-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 tuscany-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.releases antelder \ant\id_dsa xxx 775 664 ... release ... apache.releases::default::scp://people.apache.org/home/antelder/public_html/tuscany/tuscany-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 tuscany-zip-plugin-alpha3/org/apache/tuscany/sca/ /x1/www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/tuscany/sca ----------------------------------------------------------------------------- This Tuscany module includes much code copied from the Maven WAR plugin 2.0.2 written by the Apache Maven team. -----------------------------------------------------------------------------