Author: dennisl Date: Fri Mar 13 15:13:09 2009 New Revision: 753294 URL: http://svn.apache.org/viewvc?rev=753294&view=rev Log: o Improve documentation.
Modified: maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/custom-pom-installation.apt maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/generic-pom-generation.apt maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/installing-checksums.apt maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/specific-local-repo.apt maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/update-release-info.apt maven/plugins/trunk/maven-install-plugin/src/site/apt/index.apt maven/plugins/trunk/maven-install-plugin/src/site/apt/usage.apt maven/plugins/trunk/maven-install-plugin/src/site/fml/faq.fml maven/plugins/trunk/maven-install-plugin/src/site/site.xml Modified: maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java?rev=753294&r1=753293&r2=753294&view=diff ============================================================================== --- maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java (original) +++ maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java Fri Mar 13 15:13:09 2009 @@ -46,7 +46,7 @@ import java.util.Map; /** - * Installs a file in local repository. + * Installs a file in the local repository. * * @author <a href="mailto:br...@apache.org">Brett Porter</a> * @version $Id$ @@ -59,44 +59,44 @@ { /** - * GroupId of the artifact to be installed. Retrieved from POM file if specified. - * + * GroupId of the artifact to be installed. Retrieved from POM file if one is specified. + * * @parameter expression="${groupId}" */ protected String groupId; /** - * ArtifactId of the artifact to be installed. Retrieved from POM file if specified. - * + * ArtifactId of the artifact to be installed. Retrieved from POM file if one is specified. + * * @parameter expression="${artifactId}" */ protected String artifactId; /** - * Version of the artifact to be installed. Retrieved from POM file if specified - * + * Version of the artifact to be installed. Retrieved from POM file if one is specified. + * * @parameter expression="${version}" */ protected String version; /** - * Packaging type of the artifact to be installed. Retrieved from POM file if specified - * + * Packaging type of the artifact to be installed. Retrieved from POM file if one is specified. + * * @parameter expression="${packaging}" */ protected String packaging; /** * Classifier type of the artifact to be installed. For example, "sources" or "javadoc". Defaults to none which - * means this is the project's main JAR. - * + * means this is the project's main artifact. + * * @parameter expression="${classifier}" */ protected String classifier; /** - * The file to be installed to the local repository. - * + * The file to be installed in the local repository. + * * @parameter expression="${file}" * @required */ @@ -104,7 +104,7 @@ /** * The bundled API docs for the artifact. - * + * * @parameter expression="${javadoc}" * @since 2.3 */ @@ -112,7 +112,7 @@ /** * The bundled sources for the artifact. - * + * * @parameter expression="${sources}" * @since 2.3 */ @@ -121,7 +121,7 @@ /** * Location of an existing POM file to be installed alongside the main artifact, given by the {...@link #file} * parameter. - * + * * @parameter expression="${pomFile}" */ private File pomFile; @@ -129,37 +129,38 @@ /** * Generate a minimal POM for the artifact if none is supplied via the parameter {...@link #pomFile}. Defaults to * <code>true</code> if there is no existing POM in the local repository yet. - * + * * @parameter expression="${generatePom}" */ private Boolean generatePom; /** - * The type of remote repository layout to install to. Try <i>legacy</i> for a Maven 1.x-style repository layout. - * + * The type of remote repository layout to install to. Try <code>legacy</code> for a Maven 1.x-style repository + * layout. + * * @parameter expression="${repositoryLayout}" default-value="default" * @required */ private String repositoryLayout; /** - * Map that contains the layouts. - * + * Map that contains the repository layouts. + * * @component role="org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout" */ private Map repositoryLayouts; /** * The path for a specific local repository directory. It will wrap into an <code>ArtifactRepository</code> with - * <code>localRepoId</code> as <code>id</code> and with default <code>repositoryLayout</code>. - * + * <code>localRepoId</code> as <code>id</code> and with a default <code>repositoryLayout</code>. + * * @parameter expression="${localRepositoryPath}" */ private File localRepositoryPath; /** * The <code>id</code> for the <code>localRepo</code>. - * + * * @parameter expression="${localRepositoryId}" */ private String localRepositoryId; @@ -292,7 +293,7 @@ /** * Parses a POM. - * + * * @param pomFile The path of the POM file to parse, must not be <code>null</code>. * @return The model from the POM file, never <code>null</code>. * @throws MojoExecutionException If the POM could not be parsed. @@ -326,7 +327,7 @@ /** * Populates missing mojo parameters from the specified POM. - * + * * @param model The POM to extract missing artifact coordinates from, must not be <code>null</code>. */ private void processModel( Model model ) @@ -362,7 +363,7 @@ /** * Generates a (temporary) POM file from the plugin configuration. It's the responsibility of the caller to delete * the generated file when no longer needed. - * + * * @return The path to the generated POM file, never <code>null</code>. * @throws MojoExecutionException If the POM file could not be generated. */ Modified: maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java?rev=753294&r1=753293&r2=753294&view=diff ============================================================================== --- maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java (original) +++ maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java Fri Mar 13 15:13:09 2009 @@ -30,7 +30,7 @@ import java.util.List; /** - * Installs project's main artifact in local repository. + * Installs the project's main artifact in the local repository. * * @author <a href="mailto:eveni...@apache.org">Emmanuel Venisse</a> * @version $Id$ @@ -55,7 +55,7 @@ private File pomFile; /** - * Whether to update the metadata to make the artifact as release. + * Whether to update the metadata to make the artifact a release version. * * @parameter expression="${updateReleaseInfo}" default-value="false" */ Modified: maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/custom-pom-installation.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/custom-pom-installation.apt?rev=753294&r1=753293&r2=753294&view=diff ============================================================================== --- maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/custom-pom-installation.apt (original) +++ maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/custom-pom-installation.apt Fri Mar 13 15:13:09 2009 @@ -1,9 +1,9 @@ ---- - Install an artifact with a custom POM + Installing an artifact with a custom POM ------ Allan Ramirez ------ - June 2006 + 2009-03-13 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one @@ -13,9 +13,9 @@ ~~ to you 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 @@ -26,10 +26,10 @@ ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html -Install an artifact with a custom POM +Installing an artifact with a custom POM The install plugin can include a pre-built custom POM with the artifact - in the local repository. Just set the value of the <<pomFile>> parameter + in the local repository. Just set the value of the <<<pomFile>>> parameter to the path of the custom POM. +---+ Modified: maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/generic-pom-generation.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/generic-pom-generation.apt?rev=753294&r1=753293&r2=753294&view=diff ============================================================================== --- maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/generic-pom-generation.apt (original) +++ maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/generic-pom-generation.apt Fri Mar 13 15:13:09 2009 @@ -1,9 +1,9 @@ ---- - Geneate a generic POM + Generating a generic POM ------ Allan Ramirez ------ - June 2006 + 2009-03-13 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one @@ -13,9 +13,9 @@ ~~ to you 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 @@ -26,14 +26,14 @@ ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html -Generate a generic POM +Generating a generic POM There are times when you do not have a POM for a 3rd party artifact. For instance, when installing a proprietary or commercial JAR into a repository. The install plugin can create a generic POM in this case which contains the minimal set of POM elements required by Maven, such as groupId, - artifactId, version, packaging. You tell Maven to generate a POM by setting the - <<generatePom>> parameter to <<true>>. + artifactId, version, packaging. You tell Maven to generate a POM by setting the + <<<generatePom>>> parameter to <<<true>>>. +---+ mvn install:install-file -Dfile=path-to-your-artifact-jar \ Modified: maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/installing-checksums.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/installing-checksums.apt?rev=753294&r1=753293&r2=753294&view=diff ============================================================================== --- maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/installing-checksums.apt (original) +++ maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/installing-checksums.apt Fri Mar 13 15:13:09 2009 @@ -3,7 +3,7 @@ ------ Allan Ramirez ------ - July 2006 + 2009-03-13 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one @@ -13,9 +13,9 @@ ~~ to you 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 @@ -31,7 +31,7 @@ The install plugin can create integrity checksums (MD5, SHA-1) for the artifacts during installation. Checksums are cryptographic hash functions and are used to check the integrity of the associated file. This can be - activated by setting the <<createChecksum>> parameter to <<true>>. + activated by setting the <<<createChecksum>>> parameter to <<<true>>>. In the <<<install:install>>> mojo. Modified: maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/specific-local-repo.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/specific-local-repo.apt?rev=753294&r1=753293&r2=753294&view=diff ============================================================================== --- maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/specific-local-repo.apt (original) +++ maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/specific-local-repo.apt Fri Mar 13 15:13:09 2009 @@ -1,9 +1,9 @@ ------ - Install an artifact on a specific local repository path + Installing an artifact to a specific local repository path ------ Vincent Siveton ------ - October 2006 + 2009-03-13 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one @@ -13,9 +13,9 @@ ~~ to you 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 @@ -26,11 +26,11 @@ ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html -Install on a specific local repository path +Installing an artifact to a specific local repository path By default, Maven Install Plugin uses the local repository defined in the settings.xml to install an artifact. - You could install an artifact on a specific local repository by setting the <<localRepositoryPath>> and <<localRepositoryId>> + You could install an artifact on a specific local repository by setting the <<<localRepositoryPath>>> and <<<localRepositoryId>>> parameters when installing. +---+ Modified: maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/update-release-info.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/update-release-info.apt?rev=753294&r1=753293&r2=753294&view=diff ============================================================================== --- maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/update-release-info.apt (original) +++ maven/plugins/trunk/maven-install-plugin/src/site/apt/examples/update-release-info.apt Fri Mar 13 15:13:09 2009 @@ -1,9 +1,9 @@ ------ - Update the release information of a project + Updating the release information of a project ------ Allan Ramirez ------ - July 2006 + 2009-03-13 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one @@ -13,9 +13,9 @@ ~~ to you 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 @@ -26,15 +26,15 @@ ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html -Update the release information of a project +Updating the release information of a project - Updating the release information means that a forced update of the project's - metadata took place which sets the artifact as the release version. - It is most useful when installing a plugin built from source so it can be - used by other projects without explicitly asking for the latest SNAPSHOT + Updating the release information means that a forced update of the project's + metadata takes place which sets the artifact as the release version. + It is most useful when installing a plugin built from source so it can be + used by other projects without explicitly asking for the latest SNAPSHOT version. - This can be activated by setting the <<updateReleaseInfo>> parameter to <<true>> + This can be activated by setting the <<<updateReleaseInfo>>> parameter to <<<true>>> when installing. +---+ Modified: maven/plugins/trunk/maven-install-plugin/src/site/apt/index.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/site/apt/index.apt?rev=753294&r1=753293&r2=753294&view=diff ============================================================================== --- maven/plugins/trunk/maven-install-plugin/src/site/apt/index.apt (original) +++ maven/plugins/trunk/maven-install-plugin/src/site/apt/index.apt Fri Mar 13 15:13:09 2009 @@ -3,7 +3,7 @@ ------ Allan Ramirez ------ - July 2006 + 2009-03-13 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one @@ -13,9 +13,9 @@ ~~ to you 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 @@ -28,28 +28,30 @@ Maven Install Plugin - The Local Repository is the local cache where - all artifacts needed for the build are stored. By default, it is located within - the user's home directory <<<(~/.m2/repository)>>> but the location can be configured in - <<<~/.m2/settings.xml>>> using the \<localRepository\> element. - - The install plugin is used during the install phase to add - artifact(s) to the local repository. The install plugin uses + The Install Plugin is used during the <<<install>>> phase to add + artifact(s) to the local repository. The Install Plugin uses the information in the POM (groupId, artifactId, version) to determine the proper location for the artifact within the local repository. + The local repository is the local cache where + all artifacts needed for the build are stored. By default, it is located within + the user's home directory <<<(~/.m2/repository)>>> but the location can be configured in + <<<~/.m2/settings.xml>>> using the <<<\<localRepository\>>>> element. + * Goals Overview - The install plugin has 2 goals: + The install plugin has 3 goals: * {{{install-mojo.html}install:install}} is used to automatically install the - main project artifact (the jar, war or ear), its pom and any attached artifacts + project's main artifact (the JAR, WAR or EAR), its POM and any attached artifacts (sources, javadoc, etc) produced by a particular project. * {{{install-file-mojo.html}install:install-file}} is mostly used to install an externally - created artifact into the local repository, along with its pom. In that case + created artifact into the local repository, along with its POM. In that case the project information can be taken from an optionally specified pomFile, but can - be given using command line parameters. + also be given using command line parameters. + + * {{{help-mojo.html}install:help}} displays help information on maven-install-plugin. * Usage @@ -76,14 +78,14 @@ To provide you with better understanding on some usages of the Maven Install Plugin, you can take a look into the following examples: - * {{{examples/custom-pom-installation.html}Custom POM}} + * {{{examples/custom-pom-installation.html}Installing a Custom POM}} - * {{{examples/generic-pom-generation.html}Generic POM}} + * {{{examples/generic-pom-generation.html}Generating a Generic POM}} - * {{{examples/installing-checksums.html}Installing Checksums}} + * {{{examples/installing-checksums.html}Creating Checksums}} * {{{examples/update-release-info.html}Updating Release Info}} - * {{{examples/specific-local-repo.html}Installing an artifact on a specific local repository path}} + * {{{examples/specific-local-repo.html}Installing an Artifact to a Specific Local Repository Path}} [] Modified: maven/plugins/trunk/maven-install-plugin/src/site/apt/usage.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/site/apt/usage.apt?rev=753294&r1=753293&r2=753294&view=diff ============================================================================== --- maven/plugins/trunk/maven-install-plugin/src/site/apt/usage.apt (original) +++ maven/plugins/trunk/maven-install-plugin/src/site/apt/usage.apt Fri Mar 13 15:13:09 2009 @@ -3,7 +3,7 @@ ------ Allan Ramirez ------ - July 2006 + 2009-03-13 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one @@ -13,9 +13,9 @@ ~~ to you 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 @@ -31,7 +31,7 @@ * The <<<install:install>>> Mojo In most cases, <<<install:install>>> goal doesn't need any configuration, it - needs the project's POM and the artifact file to be installed during the + needs the project's POM and the artifact file to be installed during the <<<install>>> phase of the default build lifecycle. +---+ @@ -41,7 +41,7 @@ * The <<<install:install-file>>> Mojo The <<<install:install-file>>> mojo is used primarily for installing artifacts to - the local repository which were not built by Maven. The project's development team + the local repository which were not built by Maven. The project's development team may or may not provide a POM for the artifact. Here's a complete example of the install-file mojo: @@ -55,17 +55,17 @@ [-Dversion=1.0] \ [-Dpackaging=jar] \ [-Dclassifier=sources] \ - [-DgeneratePom=true] + [-DgeneratePom=true] \ [-DcreateChecksum=true] +---+ - * the group, artifact, version and packaging of the file to install. These can + * the groupId, artifactId, version and packaging of the file to install. These can be taken from the specified pomFile, and overridden or specified using the command line. When the pomFile contains a <parent> section, the parent's groupId can be considered if the groupId is not specified further for the current project or on the command line. - * the classifier parameter can be used to install secondary artifacts for a project, - like a javadoc or sources jar. If not given, Maven assumes the file is the main + * the <<<classifier>>> parameter can be used to install secondary artifacts for a project, + like a <<<javadoc>>> or <<<sources>>> JAR. If a classifier is not given, Maven assumes the file is the main artifact for the project. Modified: maven/plugins/trunk/maven-install-plugin/src/site/fml/faq.fml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/site/fml/faq.fml?rev=753294&r1=753293&r2=753294&view=diff ============================================================================== --- maven/plugins/trunk/maven-install-plugin/src/site/fml/faq.fml (original) +++ maven/plugins/trunk/maven-install-plugin/src/site/fml/faq.fml Fri Mar 13 15:13:09 2009 @@ -25,7 +25,7 @@ <question>Can I use the <i>install:install-file</i> goal to install artifacts to my remote repository?</question> <answer> <p> - No. You may want to use + No. You need to use <a href="http://maven.apache.org/plugins/maven-deploy-plugin/"><i>deploy:deploy-file</i></a> instead. </p> </answer> Modified: maven/plugins/trunk/maven-install-plugin/src/site/site.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/site/site.xml?rev=753294&r1=753293&r2=753294&view=diff ============================================================================== --- maven/plugins/trunk/maven-install-plugin/src/site/site.xml (original) +++ maven/plugins/trunk/maven-install-plugin/src/site/site.xml Fri Mar 13 15:13:09 2009 @@ -28,10 +28,11 @@ <item name="FAQ" href="faq.html"/> </menu> <menu name="Examples"> - <item name="Custom POM" href="examples/custom-pom-installation.html"/> - <item name="Generic POM" href="examples/generic-pom-generation.html"/> - <item name="Installing Checksums" href="examples/installing-checksums.html"/> + <item name="Installing a Custom POM" href="examples/custom-pom-installation.html"/> + <item name="Generating a Generic POM" href="examples/generic-pom-generation.html"/> + <item name="Creating Checksums" href="examples/installing-checksums.html"/> <item name="Updating Release Info" href="examples/update-release-info.html"/> + <item name="Installing to a Specific Local Repository Path" href="examples/specific-local-repo.html"/> </menu> </body> </project>