From: Eric G. <ri...@us...> - 2005-03-02 17:46:54
|
rikgig 05/03/02 09:46:46 Added: uberdist/xdocs changes.xml faq.fml goals.xml index.xml navigation.xml properties.xml tags.xml Log: First commit. Moved from uber-dist sf project. Revision Changes Path 1.1 maven-plugins/uberdist/xdocs/changes.xml Index: changes.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <!-- /* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ --> <document> <properties> <title>Uberdist plugin changes</title> <author email="ri...@us...">Eric Giguere</author> </properties> <body> <release version="1.0.10" date="2005-01-03"> <action dev="rikgig" type="add">First public version of the plugin</action> </release> <!-- --> <release version="1.0.4" date="2004-09-10"> <action dev="rikgig" type="add">Starting from this one, uber-dist now take full control on dependencies deployment. Including, renaming the jar (to remove version if necessary), customizable output directory, all from the project.xml entries.</action> </release> </body> </document> 1.1 maven-plugins/uberdist/xdocs/faq.fml Index: faq.fml =================================================================== <?xml version="1.0" encoding="ISO-8859-1"?> <faqs title="Frequently Asked Questions"> <part id="General"> <title>General</title> <faq id="register-project"> <question>How do I register my project with UberDist to get my distribution goal called?</question> <answer> Until a custom tag is integrated in the plugin (like report plugin for example), you must call the registerProject tag from the UberDist taglib. The snippit below shows an example:<br/> Note that the property gets are "optionnal" at this point but doing it there allows you to use them freely in your maven script while building your distribution.<br/> <source> <![CDATA[ <postGoal name="uber-dist:init"> <udist:registerProject name="${pom.id}" description="My distribution"/> <maven:get plugin="maven-uberdist-plugin" property="maven.uber.dist.assembly.dir" var="dist.assembly.dir" /> <maven:get plugin="maven-uberdist-plugin" property="maven.uber.dist.dir" var="distribution_dir" /> </postGoal>]]> </source><br/> Using the ${pom.id} is a very good practice. This is the value that will be used as default when the tag will be available. This name is then used as </answer> </faq> <faq id="create-distribution"> <question>How do I create my distribution with UberDist?</question> <answer> You have to add a goal in your project named: [registered_name]:prepare-dist-filesystem. where [registered_name] is the name you supplied when registering with the plugin. </answer> </faq> </part> </faqs> 1.1 maven-plugins/uberdist/xdocs/goals.xml Index: goals.xml =================================================================== <?xml version="1.0" encoding="ISO-8859-1"?> <document> <properties> <title>uberdist Plugin Goals</title> <author email="ri...@ya...">dIon Gillard</author> </properties> <body> <goals> <goal> <name>uber-dist:init</name> <description> This goal is provided to give a hook on project developpers to add a preGoal so that<br/> the project registers itself with the plugin.<br/> It also checks for make an OS check to to customize the tar call so that<br/> file access rights are kept in the tarball if building un Unix or Solaris<br/> </description> </goal> <goal> <name>uber-dist:make</name> <description> This goal make a distribution. It starts from the existing target files and from the existing distribution assembly. Some files may be out of date but its way faster that a complete rebuild. </description> </goal> <goal> <name>uber-dist:build</name> <description> This goal is used to create from scratch a binary distribution. Like make, it will build the distribution assembly in the dist-assembly dir (under target) but unlike uber-dist:make, this goal calls the goal clean-dist-filesystem before any other goal. </description> </goal> <goal> <name>uber-dist:prepare-dist-filesystem</name> <description> TBD </description> </goal> <goal> <name>uber-dist:clean-dist-filesystem</name> <description> TBD </description> </goal> <goal> <name>uber-dist:create-distrib</name> <description> TBD </description> </goal> <goal> <name>uber-dist:dist-setup</name> <description> TBD </description> </goal> <goal> <name>uber-dist:clean-dist</name> <description> TBD </description> </goal> <goal> <name>uber-dist:copy-deps</name> <description> TBD </description> </goal> <goal> <name>uber-dist:make-executable</name> <description> TBD </description> </goal> <goal> <name>uber-dist:copy-scripts</name> <description> TBD </description> </goal> </goals> </body> </document> 1.1 maven-plugins/uberdist/xdocs/index.xml Index: index.xml =================================================================== <?xml version="1.0"?> <document> <properties> <title>Overview</title> </properties> <body> <section name="Maven UberDist Plugin "> <subsection name="Plugin Overview and Documentation map"> <p> Why another distribution plugin? </p> <p> Some software systems are made of many artifacts and may require an aggregation of many <br/> "external" components or third parties to have a complete distribution.<br/> In a production environment, deployment rules may be very strict and software teams may have<br/> to follow script prescribe procedures on how and where their system should be installed, especially<br/> on Unix environments where proper file rights attribution are crutial.<br/> This work environment being very specific in nature, the one fits all rule doesn't apply here and building<br/> the distribution becomes an complex task in itself.<br/> </p> <p> The goal of the UberDist plugin is to integrate the basic mechanism of having a custom goal called to<br/> build this specific complex distribution. But, it also automates some recurring tasks and most of all leverages<br/> the enormous amout of available facilities provided by the Maven build environment to give better control<br/> on the deployment file structure. </p> <table> <tr><th>Document</th><th>Description</th></tr> <tr><td><a href="goals.html">Goals</a></td> <td> Document listing all callable and internal goals of the UberDist maven plugin. </td> </tr> <tr><td><a href="tags.html">Tags</a></td> <td> The UberDist plugin defines Jelly tags to perform some basic operations. These tags are listed and explained in this document. </td> </tr> <tr><td><a href="properties.html">Properties</a></td> <td> The behavior of the Maven UberDist Plugin can be altered as many plugins via several properties. This document describes each property available, and the default values used if none are supplied in the project. </td> </tr> <tr><td><a href="faq.html">FAQs</a></td> <td> Question and answers to get you up and running in no time! </td> </tr> </table> </subsection> <subsection name="UberDist Process"> <p> UberDist with results of maven a project compilation but not in the location they are generated at.<br/> The plugin uses 2 directories that are defined by properties: <ul> <li>Distribution-assembly directory: Where the distribution is built: <a href="./properties.html#maven.uber.dist.assembly.dir">maven.uber.dist.assembly.dir</a></li> <li>Distribution directory: Where final distribution (tar or zip) file is produced: <a href="./properties.html#maven.uber.dist.dir">maven.uber.dist.dir</a></li> </ul> </p> <p> When one of the distribution building goal is called (either one of <a href="./goals.html#uber-dist:make">uber-dist:make</a>, <a href="./goals.html#uber-dist:build">build</a> or <a href="./goals.html#uber-dist:prepare-dist-filesystem">prepare-dist-filesystem</a>), the plugin will call its internal init goal ( uber-dist:init ). Util a custom tag is supplied, writing a postGaol to this one is the prefered way to register a distribution to be built with the plugin. Its very similar to the xdoc plugin in behavior. It allows building many seperate distribution from a same project. </p> <p> Once your project is registered, UberDist prepares the necessary directories, based on its property values.<br/> Now comes the time to copy all necessary files in the distribution assembly. UberDist will first call YOUR distribution goal. To do this, it uses the name your registered with (typically ${pom.artifactId} makes a perfect name) appended with ':prepare-dist-filesystem'.<br/> Ex.: For a a maven project with id: <strong>myproject</strong>, the goal <strong>myproject:prepare-dist-filesystem</strong> will be called. </p> <p> Then, the plugin will call a list of internal goals designed to help you building your distribution with minimum jelly code added in your project.<br/> <ol> <li><a href="./goals.html#uber-dist:copy-deps">uber-dist:copy-deps</a> : to copy project dependencies like artifact does but with a little more control</li> <li><a href="./goals.html#uber-dist:copy-scripts">uber-dist:copy-scripts</a> : to copy launch scripts (batch file, bash,etc) with filtering</li> <li><a href="./goals.html#uber-dist:make-executable">uber-dist:make-executable</a> : For Unix platforms, to make some files executable</li> </ol> And final step, creating the tarball (Unix) or the zip file (Windows).<br/> For more details, please see the Goals, Properties and FAQ pages.<br/> Happy Distributing! </p> </subsection> </section> </body> </document> 1.1 maven-plugins/uberdist/xdocs/navigation.xml Index: navigation.xml =================================================================== <?xml version="1.0" encoding="ISO-8859-1"?> <project name="Maven uberdist Plugin"> <title>Maven uberdist Plugin</title> <body> <links> <item name="Maven" href="http://maven.apache.org/"/> </links> <menu name="Overview"> <item name="Goals" href="/goals.html"/> <item name="Tags" href="/tags.html" /> <item name="Properties" href="/properties.html"/> <item name="FAQs" href="/faq.html"/> </menu> </body> </project> 1.1 maven-plugins/uberdist/xdocs/properties.xml Index: properties.xml =================================================================== <?xml version="1.0" encoding="ISO-8859-1"?> <document> <properties> <title>Properties</title> </properties> <body> <section name="Maven UberDist Plugin Properties"> <table> <tr> <th>Property name</th> <th>Description</th> <th>Optional?</th> </tr> <tr> <td>maven.uber.dist.assembly.root</td> <td> The directory under the project's target dir under which the files that builds up the distribution should be copied to. It is also called the distribution assembly dir.<br/> <i>maven.uber.dist.assembly.root=${maven.build.dir}/dist-assembly</i> <br/> </td> <td>No</td> </tr> <tr> <td>maven.uber.dist.dir</td> <td> The directory under the project's target dir where the plugin puts the final distribution: tarball or zip files based on the OS under which it is created. <br/> <i>maven.uber.dist.dir=${maven.build.dir}/distributions</i> <br/> </td> <td>No</td> </tr> <tr> <td>maven.uber.dist.proj.subdir</td> <td> Specifies the sub-directory under the distribution assembly dir where the files for this project should be kept. This is necessary only if you are in a multiproject environment with seperate distributions. <br/> See the <a href="protocols.html">the list</a> of supported protocols. <br/> </td> <td>No</td> </tr> <tr> <td><a name="maven.uber.dist.assembly.dir">maven.uber.dist.assembly.dir</a></td> <td> This property holds the directory where the distribution assembly is. By default, it is made of the concatenation of root dir followed by project sub-dir if any. <i>maven.uber.dist.assembly.dir=${maven.uber.dist.assembly.root}/${maven.uber.dist.proj.subdir}</i> </td> <td>No</td> </tr> <tr><td>Autres a finir:</td> <td>maven.uber.dist.assembly.dep.subdir= maven.uber.dist.executable.permission=gu+x maven.uber.dist.executable.includes=**/*.sh,**/*.so maven.uber.dist.launch.scripts=*.sh,*.cmd,*.bat </td></tr> </table> </section> <section name="Other properties used"> <p> If you are behind firewall and need to use proxy server see <a href="http://maven.apache.org/reference/user-guide.html#Using Proxies">following</a> section from the <b>Maven User Guide</b> . </p> </section> </body> </document> 1.1 maven-plugins/uberdist/xdocs/tags.xml Index: tags.xml =================================================================== <?xml version="1.0"?> <document> <properties> <title>Tags</title> <author email="ri...@ya...">Eric Giguere</author> </properties> <body> <section name="Overview"> <p> This document describes the <a href="http://jakarta.apache.org/commons/jelly/tags.html">tags</a> that are available when using the Maven Uberdist Plug-in. </p> </section> <section name="Tags"> <table> <tr><th>Name</th><th>Description</th></tr> <tr> <td><a href="#uber-dist:copyScripts">uber-dist:copyScripts</a></td> <td>Copies launch scripts to a specified directory</td> </tr> <tr> <td><a href="#uber-dist:registerProject">artifact:deploy-snapshot</a></td> <td>Add a project to the distribution list to be built.</td> </tr> <tr> <td><a href="#uber-dist:deregisterProject">uber-dist:deregisterProject</a></td> <td>Removes a project from the distribution list to build</td> </tr> </table> <subsection name="uber-dist:copyScripts"> <p> Copies launch scripts to a specified directory. <br/> The files located in directory with matching pattern as described by property <a href="./properties.html#maven.uber.dist.launch.scripts"> maven.uber.dist.launch.scripts</a> are copied<br/> using Ant filtering mechanism with default @artifact_id@ token replaced<br/> by the current's project artifact id.<br/> The default value for the file pattern is: <code>*.sh,*.cmd,*.bat</code> </p> <table> <tr> <th>Attribute Name</th><th>Description</th><th>Optional?</th> </tr> <tr> <td>scriptsDirectory</td> <td>The path to the destination directory under the distribution assembly root</td> <td>No</td> </tr> </table> </subsection> <subsection name="uber-dist:registerProject"> <p> Register a project with uberdist plugin to get the complex distribution built. <br/> NOTE: It is necessary to use this tag before calling any distribution goal so that<br/> the plugin will be able to call the custom file copy goal in your project.<br/> </p> <table> <tr> <th>Attribute Name</th><th>Description</th><th>Optional?</th> </tr> <tr> <td>name</td> <td>The name of the distribution to build</td> <td>No</td> </tr> </table> </subsection> <subsection name="uber-dist:deregisterProject"> <p> Removes a project from the list of distribution to be built. <br/> </p> <table> <tr> <th>Attribute Name</th><th>Description</th><th>Optional?</th> </tr> <tr> <td>name</td> <td>The name of the distribution to remove from build list</td> <td>No</td> </tr> </table> </subsection> </section> </body> </document> |
From: Eric G. <ri...@us...> - 2005-05-12 19:56:06
|
rikgig 05/05/12 12:55:58 Modified: uberdist/xdocs changes.xml faq.fml goals.xml index.xml navigation.xml properties.xml tags.xml Log: Update doc for version 1.0.11 Update copyright. Revision Changes Path 1.2 +13 -4 maven-plugins/uberdist/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/uberdist/xdocs/changes.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- changes.xml 2 Mar 2005 17:46:46 -0000 1.1 +++ changes.xml 12 May 2005 19:55:58 -0000 1.2 @@ -1,8 +1,7 @@ -<?xml version="1.0" encoding="UTF-8"?> - +<?xml version="1.0" encoding="ISO-8859-1"?> <!-- /* - * Copyright 2001-2004 The Apache Software Foundation. + * Copyright 2004-2005 Eric Giguère. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,10 +23,20 @@ <author email="ri...@us...">Eric Giguere</author> </properties> <body> + + <release version="1.0.11" date="2005-05-12"> + <action dev="rikgig" type="remove">Project registration mic-mac removed. No custom multiproject support included now in the plugin, use the Reactor instead.</action> + <action dev="rikgig" type="add">Goal uber-dist:copy-deps is now executable on its own.</action> + <action dev="rikgig" type="add">New tag in the tag lib: getArtifacts accepts a Map as argument which gets + filled by the list of project artifacts to be deployed (see artifact deployment properties).<br/> + The Map contains the artifact as key and the deployment relative path for it including jar renaming if used.</action> + <action dev="rikgig" type="add">New token for scripts: pom-artifacts that gets replaced by a an entry to be + included in a -cp or -classpath entry to be used by the java tools (java, javac, etc.).</action> + </release> + <release version="1.0.10" date="2005-01-03"> <action dev="rikgig" type="add">First public version of the plugin</action> </release> - <!-- --> <release version="1.0.4" date="2004-09-10"> <action dev="rikgig" type="add">Starting from this one, uber-dist now take full control on dependencies deployment. 1.3 +30 -13 maven-plugins/uberdist/xdocs/faq.fml Index: faq.fml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/uberdist/xdocs/faq.fml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- faq.fml 3 Mar 2005 03:36:25 -0000 1.2 +++ faq.fml 12 May 2005 19:55:58 -0000 1.3 @@ -1,36 +1,53 @@ <?xml version="1.0" encoding="ISO-8859-1"?> +<!-- +/* + * Copyright 2004-2005 Eric Giguère. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + --> + <faqs title="Frequently Asked Questions"> <part id="General"> <title>General</title> + <faq id="register-project"> <question>How do I register my project with UberDist to get my distribution goal called?</question> <answer> -Until a custom tag is integrated in the plugin (like report plugin for example), you must call -the registerProject tag from the UberDist taglib. The snippit below shows an example:<br/> -Note that the property gets are "optionnal" at this point but doing it there allows you to use them freely in your maven script while building -your distribution.<br/> + Starting with version 1.0.11, you just have to include in your project a goal named: 'project.id':prepared-dist-filesystem.<br/> +<strong>The older way things with uberdist is deprecated. Do not use project register tag anymore<br/> +The tags remains for another version and will be phased out after.</strong><br/> +<br/> <source> <![CDATA[ <postGoal name="uber-dist:init"> - <udist:registerProject name="${pom.artifactId}" description="My distribution"/> - <maven:get plugin="maven-uberdist-plugin" - property="maven.uber.dist.assembly.dir" var="dist.assembly.dir" /> - <maven:get plugin="maven-uberdist-plugin" - property="maven.uber.dist.dir" var="distribution_dir" /> + <udist:registerProject name="${pom.id}" description="My distribution"/> + <maven:get plugin="maven-uberdist-plugin" + property="maven.uber.dist.assembly.dir" var="dist.assembly.dir" /> + <maven:get plugin="maven-uberdist-plugin" + property="maven.uber.dist.dir" var="distribution_dir" /> </postGoal>]]> </source><br/> -Using the ${pom.id} is a very good practice. This is the value that will be used as default when the tag will be available. -This name is then used as </answer> </faq> <faq id="create-distribution"> <question>How do I create my distribution with UberDist?</question> <answer> - You have to add a goal in your project named: [registered_name]:prepare-dist-filesystem. - where [registered_name] is the name you supplied when registering with the plugin. + You have to add a goal in your project named: 'pom.artifactId':prepare-dist-filesystem.<br/> + Otherwise, the plugin will call the standard dist:build-bin offered by the maven-dist-plugin. </answer> </faq> 1.2 +161 -27 maven-plugins/uberdist/xdocs/goals.xml Index: goals.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/uberdist/xdocs/goals.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- goals.xml 2 Mar 2005 17:46:46 -0000 1.1 +++ goals.xml 12 May 2005 19:55:58 -0000 1.2 @@ -1,4 +1,22 @@ <?xml version="1.0" encoding="ISO-8859-1"?> +<!-- +/* + * Copyright 2004-2005 Eric Giguère. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + --> + <document> <properties> @@ -7,14 +25,26 @@ </properties> <body> + <section name="Plugin goals"> + <p> + The plugin offers many goals. Some of these goals uses plugin properties but others make use + of Custom properties that can be supplied in the project.xml file. Some examples of these custom + properties used by the plugin can be found in the section <a href="#Code_extracts">Code extracts</a> of this page. + </p> <goals> <goal> <name>uber-dist:init</name> <description> - This goal is provided to give a hook on project developpers to add a preGoal so that<br/> - the project registers itself with the plugin.<br/> - It also checks for make an OS check to to customize the tar call so that<br/> - file access rights are kept in the tarball if building un Unix or Solaris<br/> + This goal makes an OS check to to customize some operations based on the + nature of the OS where the distribution is created. If on Unix-like (Unix, Solaris, Linux, etc), it will + set the property: isOnUnix<br/> + Examples of operations that are tailored to the OS are: + <ul><li>customization of the tar call + so that the file access rights are kept in the tarball if building on + Unix or Solaris</li> + <li>The classpath entries created for launch scripts are also tailored to the right OS + (different entries in the list seperated by a colon (:) on Unix, semi-colon (;) on Windows.</li> + </ul> </description> </goal> @@ -37,59 +67,163 @@ <goal> <name>uber-dist:prepare-dist-filesystem</name> <description> - TBD + This goal is responsible for creating the content of the distribution.<br/> + It first creates the necessary directories, then will call the custom goal of the calling project + ('pom.artifactId':prepare-dist-filesystem). Once this goal completes, other internal goals gets called + to finalize the distribution, goals like: + <ul> + <li><a href="#uber-dist:copy-deps">uber-dist:copy-deps</a></li> + <li><a href="#uber-dist:copy-scripts">uber-dist:copy-scripts</a></li> + <li><a href="#uber-dist:make-executable">uber-dist:make-executable</a></li> + </ul> </description> </goal> <goal> <name>uber-dist:clean-dist-filesystem</name> <description> - TBD + This goal, like its name suggests, deletes the distribution assembly directory and also deletes + the distribution file (in the distribution directory) if it is found. </description> </goal> <goal> <name>uber-dist:create-distrib</name> <description> - TBD + This goal is responsible for creating the distribution out of the distribution assembly. Its is automatically + called as part of both the uber-dist:make and uber-dist:build process. </description> </goal> <goal> - <name>uber-dist:dist-setup</name> - <description> - TBD - </description> - </goal> - - <goal> - <name>uber-dist:clean-dist</name> - <description> - TBD - </description> - </goal> - - <goal> <name>uber-dist:copy-deps</name> <description> - TBD + This goal is used to copy all project dependencies marked for deployment. This goal uses some plugin custom + properties to control which, how and where the dependencies gets deployed.<br/> + The available properties must be supplied inside the properties tag in the maven project.xml file. + The list of properties goes as follow:<br/> + <ul> + <li>jar.dependency.dist.dir:<br/> + Specifies in which sub-directory the deplendencies must be published. + This property can be supplied at the project level or overriden at the dependency level. The project level + definition is used as the default value for all deployed dependencies except if the dependency states + differently.<br/></li> + <li>'pom.artifactId'.deploy.<br/> + This property must be added to each dependency defined your project.xml if you want it to be deployed in + the system's distribution. The example above is valid for a project with id: myproject.</li> + <li>jar.dependency.dist.name<br/> + This property allows changing the name of the dependency as it gets deployed. This is very usefull + especially if your system is deployed as part of a framework that may use your dependencies but without the + version number as part of the jar file name.</li> + </ul> </description> </goal> <goal> <name>uber-dist:make-executable</name> <description> - TBD + This goal run the chmod program on files to make launch scripts executable under Unix.<br/> + The goal will use the value of the property: <a href="./properties.html#maven.uber.dist.executable.permission">maven.uber.dist.executable.permission</a> + for the permissions to pass chmod. If the property is empty, the value: gu+x will be used.<br/> + The files on which those rights will be applied are specified using the property: <a href="./properties.html#maven.uber.dist.executable.includes">maven.uber.dist.executable.includes</a> </description> </goal> <goal> <name>uber-dist:copy-scripts</name> <description> - TBD - </description> - </goal> + This is a very usefull goal. It is used to copy launch scripts (bash, DOS batch, etc) with some automatic + filtering happenning while doing so. The goal always copy the scripts in the root of the distribution assembly + along with the project's artifact (if there is one).<br/> + The goal uses 3 properties to complete the work, see those for more details: + <ul> + <li><a href="./properties.html#maven.uber.dist.scripts.dir">maven.uber.dist.scripts.dir</a></li> + <li><a href="./properties.html#maven.uber.dist.assembly.dir">maven.uber.dist.assembly.dir</a></li> + <li><a href="./properties.html#maven.uber.dist.launch.scripts">maven.uber.dist.launch.scripts</a></li> + </ul> + As of today, 2 tokens are automatically replaced by Uberdist while copying scripts: + <ul> + <li>@artifact_id@: Gets replace by the expression: ${maven.final.name}.jar</li> + <li>@pom-artifacts@: Gets replace by the list of all deployed dependencies where each element + are seperated between them the the OS specific classpath entry separator.</li> + </ul><br/> + So with a single property to set, you get a fully configured launch script for your application. It is true + that other mechanism can be used like the Class-Path manifest entry along with the Main-Class but if your + jar holds many executable classes, multiple launch scripts will be necessary. Uberdist makes this + script configuring operation transparent as long as you tell it where your scripts are.<br/> + An example of a bash launch scripts before and after running uber-dist is supplied in + the section <a href="#Launch_scripts">Launch scripts</a> of this page. + </description> + </goal> + + </goals> + <subsection name="Code extracts"> + <subsection name="project.xml"> + <p> + Example of a project level entry for the default dependency deployment directory in the project.xml file: + <source>Ex:<![CDATA[ +... + </versions> + + <properties> + <jar.dependency.dist.dir>lib</jar.dependency.dist.dir> + </properties>]]> +... +</source> + </p> + + <p> + This example shows how to configure a dependency in the project.xml file so that the Uberdist plugin + will publish it under a specific directory and with its name overriden (version removed).<br/> + <strong>NOTE: In the following example, the project id is : myproject.</strong> See its usage in the + 'projectId.deploy' property to indicate that this dependency must be deployed in the distribution. +<source> +<![CDATA[ +... +<dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.0.4</version> + <url>http://jakarta.apache.org/commons/logging.html</url> + <properties> + <myproject.deploy>true</myproject.deploy> + <jar.manifest.classpath>true</jar.manifest.classpath> + <jar.dependency.dist.dir>lib/3rdparty</jar.dependency.dist.dir> + <jar.dependency.dist.name>commons-logging.jar</jar.dependency.dist.name> + </properties> +</dependency> +... +]]> +</source><br/></p> + </subsection> + <subsection name="Launch scripts"> + <p> + This example shows the content of a launch script with the tokens that uber-dist will replace while it + creates the distribution. All necessary properties must be set accordingly before.<br/> + <source> +#!/bin/sh + +# Need native library path +LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib +export LD_LIBRARY_PATH + +$JAVA_HOME/bin/java -cp .:@artifact_id@:@pom-artifacts@ test.com.MyClassToRun + </source> + This same script, after being copied by Uberdist, could look like this: +<source> +#!/bin/sh + +# Need native library path +LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib +export LD_LIBRARY_PATH + +$JAVA_HOME/bin/java -cp .:myproject-1.0.jar:lib/commons-logging.jar:lib/commons-beanutils.jar test.com.MyClassToRun +</source> + </p> + </subsection> + </subsection> + </section> - </goals> + </body> </document> \ No newline at end of file 1.3 +41 -22 maven-plugins/uberdist/xdocs/index.xml Index: index.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/uberdist/xdocs/index.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- index.xml 3 Mar 2005 03:36:25 -0000 1.2 +++ index.xml 12 May 2005 19:55:58 -0000 1.3 @@ -1,4 +1,22 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- +/* + * Copyright 2004-2005 Eric Giguère. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> + <document> <properties> @@ -12,20 +30,20 @@ Why another distribution plugin? </p> <p> - Some software systems are made of many artifacts and may require an aggregation of many <br/> + Some software systems are made of many artifacts and may require an aggregation of many "external" components or third parties to have a complete distribution.<br/> - In a production environment, deployment rules may be very strict and software teams may have<br/> - to follow prescribe procedures on how and where their system should be installed, especially<br/> + In a production environment, deployment rules may be very strict and software teams may have + to follow script prescribe procedures on how and where their system should be installed, especially on Unix environments where proper file rights attribution are crucial.<br/> - The one fits all rule doesn't apply here and building the distribution becomes an complex task in itself.<br/> + This work environment being very specific in nature, the one fits all rule doesn't apply here and building + the distribution becomes an complex task in itself.<br/> </p> <p> - The goal of the UberDist plugin is to integrate the basic mechanism of having a custom goal called to<br/> - build this project specific complex distribution. In other words, use the full power of maven to build your distribution<br/> - using a project specific goal you write. But, it also automates some recurring tasks and most of all leverages<br/> - the enormous amout of available facilities provided by the Maven build environment to give better control<br/> + The goal of the UberDist plugin is to integrate the basic mechanism of having a custom goal called to + build this specific complex distribution. But, it also automates some recurring tasks and most of all leverages + the enormous amout of available facilities provided by the Maven build environment to give better control on the deployment file structure. - </p> + </p> <table> <tr><th>Document</th><th>Description</th></tr> <tr><td><a href="goals.html">Goals</a></td> @@ -56,7 +74,7 @@ </subsection> <subsection name="UberDist Process"> <p> - UberDist with results of maven a project compilation but not in the location they are generated at.<br/> + UberDist, like all plugins, works with the results of a maven project compilation but not from the bare results from the target directory. The plugin uses 2 directories that are defined by properties: <ul> <li>Distribution-assembly directory: Where the distribution is built: <a href="./properties.html#maven.uber.dist.assembly.dir">maven.uber.dist.assembly.dir</a></li> @@ -65,25 +83,26 @@ </p> <p> When one of the distribution building goal is called (either one of <a href="./goals.html#uber-dist:make">uber-dist:make</a>, <a href="./goals.html#uber-dist:build">build</a> or <a href="./goals.html#uber-dist:prepare-dist-filesystem">prepare-dist-filesystem</a>), - the plugin will call its internal init goal ( uber-dist:init ), this is when you register your project with a postGoal. See <a href="./tags.html#uber-dist:registerProject">uber-dist:registerProject tag</a><br/> - See also FAQ: <a href="./faq.html#register-project">register-project</a> - </p> - <p> - Once your project is registered, UberDist prepares the necessary directories, based on its property values.<br/> - Now comes the time to copy all necessary files in the distribution assembly. UberDist will first call YOUR - distribution goal.<br/> - Ex.: For a a maven project with id: <strong>myproject</strong>, the goal <strong>myproject:prepare-dist-filesystem</strong> will be called. + the plugin will call some internal initialization goal, then try to call a custom goal supplied in your project to build the distribution files. + This is where Uberdist is different from to the original dist plugin. When the time comes to copy all necessary files in the distribution assembly, + instead of copying the project artifact (which may even be missing for 'non-standard' maven projects, UberDist will call YOUR + custom distribution goal. To do this, it uses the artifactId of your project appended with ':prepare-dist-filesystem'.<br/> + Ex.: For a a maven project with id: <strong>myproject</strong>, the goal <strong>myproject:prepare-dist-filesystem</strong> will be called.<br/> + When this custom goal is missing, Uberdist will fall back to the original dist plugin calling its binary distribution construction goal. </p> <p> - Then, the plugin will call a list of internal goals designed to help you building your distribution with minimum - jelly code added in your project.<br/> + If you did supply your 'uberdist custom goal' the plugin will then call some utility goals to perform common operations when preparing a distribution. + These are supplied to help you building your distribution with minimum jelly code added in your project.<br/> + Uberdist offers those goals: <ol> <li><a href="./goals.html#uber-dist:copy-deps">uber-dist:copy-deps</a> : to copy project dependencies like artifact does but with a little more control</li> - <li><a href="./goals.html#uber-dist:copy-scripts">uber-dist:copy-scripts</a> : to copy launch scripts (batch file, bash,etc) with filtering</li> + <li><a href="./goals.html#uber-dist:copy-scripts">uber-dist:copy-scripts</a> : to copy launch scripts (batch file, bash,etc) with token filtering</li> <li><a href="./goals.html#uber-dist:make-executable">uber-dist:make-executable</a> : For Unix platforms, to make some files executable</li> </ol> + And final step, creating the tarball (Unix) or the zip file (Windows).<br/> For more details, please see the Goals, Properties and FAQ pages.<br/> + Happy Distributing! </p> 1.2 +18 -0 maven-plugins/uberdist/xdocs/navigation.xml Index: navigation.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/uberdist/xdocs/navigation.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- navigation.xml 2 Mar 2005 17:46:46 -0000 1.1 +++ navigation.xml 12 May 2005 19:55:58 -0000 1.2 @@ -1,4 +1,21 @@ <?xml version="1.0" encoding="ISO-8859-1"?> +<!-- +/* + * Copyright 2004-2005 Eric Giguère. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> <project name="Maven uberdist Plugin"> @@ -9,6 +26,7 @@ <item name="Maven" href="http://maven.apache.org/"/> </links> <menu name="Overview"> + <item name="Description" href="/index.html"/> <item name="Goals" href="/goals.html"/> <item name="Tags" href="/tags.html" /> <item name="Properties" href="/properties.html"/> 1.3 +79 -28 maven-plugins/uberdist/xdocs/properties.xml Index: properties.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/uberdist/xdocs/properties.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- properties.xml 3 Mar 2005 03:36:25 -0000 1.2 +++ properties.xml 12 May 2005 19:55:58 -0000 1.3 @@ -1,4 +1,21 @@ <?xml version="1.0" encoding="ISO-8859-1"?> +<!-- +/* + * Copyright 2004-2005 Eric Giguère. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> <document> @@ -15,54 +32,88 @@ <th>Optional?</th> </tr> <tr> - <td>maven.uber.dist.assembly.root</td> + <td><a name="maven.uber.dist.assembly.root"/>maven.uber.dist.assembly.root</td> <td> - The directory where the distribution is built (under the project's target).<br/> - It is also called the distribution assembly dir.<br/> + The directory under the project's target dir under which the files that builds<br/> + up the distribution should be copied to. It is also called the distribution<br/> + assembly dir.<br/> <i>maven.uber.dist.assembly.root=${maven.build.dir}/dist-assembly</i> <br/> </td> - <td>No</td> + <td>Yes</td> </tr> <tr> - <td>maven.uber.dist.dir</td> + <td><a name="maven.uber.dist.dir"/>maven.uber.dist.dir</td> <td> - The directory under the project's target dir <br/> - where the plugin puts the final distribution: tarball or zip<br/> - files based on the OS under which it is created.<br/> + The directory under the project's target dir where the plugin puts the final<br/> + distribution: tarball or zip files based on the OS under which it is created.<br/> <i>maven.uber.dist.dir=${maven.build.dir}/distributions</i> <br/> </td> - <td>No</td> + <td>Yes</td> </tr> <tr> - <td>maven.uber.dist.proj.subdir</td> + <td><a name="maven.uber.dist.proj.subdir"/>maven.uber.dist.proj.subdir</td> <td> - Specifies the sub-directory under the distribution assembly<br/> - dir where the files for this project should be kept.<br/> - This is necessary only if you are in a multiproject<br/> - environment with seperate distributions.<br/> + Specifies the sub-directory under the distribution assembly dir where the files<br/> + for this project should be kept. This is necessary only if you are in a multiproject<br/> + environment with seperate distributions under the same root target.<br/> </td> - <td>No</td> + <td>Yes</td> </tr> <tr> - <td><a name="maven.uber.dist.assembly.dir">maven.uber.dist.assembly.dir</a></td> + <td><a name="maven.uber.dist.assembly.dir"/>maven.uber.dist.assembly.dir</td> <td> - This property holds the directory where the distribution assembly is.<br/> - By default, it is made of the concatenation of root dir followed <br/> - by project sub-dir if any.<br/> - <i>maven.uber.dist.assembly.dir=${maven.uber.dist.assembly.root}/<br/> - ${maven.uber.dist.proj.subdir}</i> + This property holds the directory where the distribution assembly is. By default,<br/> + it is made of the concatenation of root dir followed by project sub-dir if any.<br/> + <i>maven.uber.dist.assembly.dir=${maven.uber.dist.assembly.root}/${maven.uber.dist.proj.subdir}</i> </td> - <td>No</td> + <td>Yes</td> </tr> - <tr><td>Autres a finir:</td> - <td>maven.uber.dist.assembly.dep.subdir= -maven.uber.dist.executable.permission=gu+x -maven.uber.dist.executable.includes=**/*.sh,**/*.so -maven.uber.dist.launch.scripts=*.sh,*.cmd,*.bat -</td></tr> + + <tr> + <td><a name="maven.uber.dist.executable.permission"/>maven.uber.dist.executable.permission</td> + <td> + This property holds the rights supplied to chmod command when running the goal:<a href="./goals.html#uber-dist:make-executable">uber-dist:make-executable</a><br/> + This property uses the default value:<br/> + <i>maven.uber.dist.executable.permission=gu+x</i> + </td> + <td>Yes</td> + </tr> + + <tr> + <td><a name="maven.uber.dist.executable.includes"/>maven.uber.dist.executable.includes</td> + <td> + This property holds a pattern that allow the goal <a href="./goals.html#uber-dist:make-executable">uber-dist:make-executable</a> to recognize on which files<br/> + the chmod command should be run.<br/> + <i>maven.uber.dist.executable.includes=**/*.sh,**/*.so</i> + </td> + <td>Yes</td> + </tr> + + <tr> + <td><a name="maven.uber.dist.scripts.dir"/>maven.uber.dist.scripts.dir</td> + <td> + This property holds the path to the root directory where execution scripts for<br/> + the project are kept. These are copied (with token filtering) by the goal:<a href="./goals.html#uber-dist:copy-scripts">uber-dist:copy-scripts</a><br/> + This property does NOT have a default value so if you want some scripts to be copied,<br/> + a value must be supplied otherwise, the copy-scripts goal is skipped.<br/> + <i>maven.uber.dist.scripts.dir=''</i> + </td> + <td>Yes</td> + </tr> + + <tr> + <td><a name="maven.uber.dist.launch.scripts"/>maven.uber.dist.launch.scripts</td> + <td> + This property holds the pattern that identify a file as a script to be copied with<br/> + token filtering while executing the goal:<a href="./goals.html#uber-dist:copy-scripts">uber-dist:copy-scripts</a><br/> + <i>maven.uber.dist.launch.scripts=*.sh,*.cmd,*.bat</i> + </td> + <td>Yes</td> + </tr> + </table> </section> 1.3 +67 -11 maven-plugins/uberdist/xdocs/tags.xml Index: tags.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/uberdist/xdocs/tags.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- tags.xml 3 Mar 2005 03:36:25 -0000 1.2 +++ tags.xml 12 May 2005 19:55:58 -0000 1.3 @@ -1,4 +1,21 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- +/* + * Copyright 2004-2005 Eric Giguère. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> <document> @@ -24,27 +41,39 @@ <td>Copies launch scripts to a specified directory</td> </tr> <tr> + <td><a href="#uber-dist:getArtifacts">uber-dist:getArtifacts</a></td> + <td>Retreives the list of project artifacts (dependencies) along with their deploy directory in a Map supplied by the caller</td> + </tr> + <tr> <td><a href="#uber-dist:registerProject">uber-dist:registerProject</a></td> - <td>Add a project to the distribution list to be built.</td> + <td>Add a project to the distribution list to be built. + <strong>Deprecated, do not use anymore</strong> + </td> </tr> <tr> <td><a href="#uber-dist:deregisterProject">uber-dist:deregisterProject</a></td> - <td>Removes a project from the distribution list to build</td> + <td>Removes a project from the distribution list to build + <strong>Deprecated, do not use anymore</strong> + </td> </tr> + + </table> <subsection name="uber-dist:copyScripts"> <p> - Copies launch scripts to a specified directory.<br/> + Copies launch scripts to a specified directory. + <br/> The files located in directory with matching pattern as described by - property <a href="./properties.html#maven.uber.dist.launch.scripts">maven.uber.dist.launch.scripts</a> - are copied using Ant filtering mechanism with default @artifact_id@ - token replaced by the current's project artifact id.<br/> + property <a href="./properties.html#maven.uber.dist.launch.scripts"> + maven.uber.dist.launch.scripts</a> are copied<br/> + using Ant filtering mechanism. See the goal: <a href="./goals.html#uber-dist:copy-scripts">uber-dist:copy-scripts</a> + for the list of tokens that Uberdist replaces while copying the scripts.<br/> The default value for the file pattern is: <code>*.sh,*.cmd,*.bat</code> </p> <table> <tr> - <th>Attribute Name</th><th>Description</th><th>Optional?</th> + <th>Parameter Name</th><th>Description</th><th>Optional?</th> </tr> <tr> <td>scriptsDirectory</td> @@ -53,9 +82,35 @@ </tr> </table> </subsection> + + <subsection name="uber-dist:getArtifacts"> + <p> + Retreives the list of project artifacts (dependencies) along with their + deploy directory in a Map supplied by the caller. + <br/> + The list of dependencies published by the project bean is filtered as described + by the Uberdist custom distribution properties. + See the goal: <a href="./goals.html#uber-dist:copy-scripts">uber-dist:copy-scripts</a> + for more details on the properties and their effect on deployed dependencies.<br/> + The list is then returned in the parameter: depArtifacts + </p> + <table> + <tr> + <th>Parameter Name</th><th>Description</th><th>Optional?</th> + </tr> + <tr> + <td>depArtifacts</td> + <td>A Java Map object that will hold all deployable dependencies. + The dependency object returned by the pom.artifacts list are used as keys, + deployment sub-directory as value.</td> + <td>No</td> + </tr> + </table> + </subsection> <subsection name="uber-dist:registerProject"> <p> + <strong>Deprecated, do not use anymore</strong> Register a project with uberdist plugin to get the complex distribution built. <br/> NOTE: It is necessary to use this tag before calling any distribution goal so that<br/> @@ -64,23 +119,24 @@ <table> <tr> - <th>Attribute Name</th><th>Description</th><th>Optional?</th> + <th>Parameter Name</th><th>Description</th><th>Optional?</th> </tr> <tr> <td>name</td> - <td>The name of the distribution to build. </td> + <td>The name of the distribution to build</td> <td>No</td> </tr> </table> </subsection> <subsection name="uber-dist:deregisterProject"> <p> + <strong>Deprecated, do not use anymore</strong> Removes a project from the list of distribution to be built. <br/> </p> <table> <tr> - <th>Attribute Name</th><th>Description</th><th>Optional?</th> + <th>Parameter Name</th><th>Description</th><th>Optional?</th> </tr> <tr> <td>name</td> |