You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2006/06/06 06:19:08 UTC

svn commit: r411991 - in /maven/plugins/trunk/maven-deploy-plugin/src/site/apt: howto.apt introduction.apt

Author: jdcasey
Date: Mon Jun  5 21:19:07 2006
New Revision: 411991

URL: http://svn.apache.org/viewvc?rev=411991&view=rev
Log:
Updating documentation to reflect new functionality, and provide more information about configuration of deployment options.

Modified:
    maven/plugins/trunk/maven-deploy-plugin/src/site/apt/howto.apt
    maven/plugins/trunk/maven-deploy-plugin/src/site/apt/introduction.apt

Modified: maven/plugins/trunk/maven-deploy-plugin/src/site/apt/howto.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/site/apt/howto.apt?rev=411991&r1=411990&r2=411991&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/site/apt/howto.apt (original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/site/apt/howto.apt Mon Jun  5 21:19:07 2006
@@ -1,41 +1,126 @@
- ------
- Maven 2 Deploy Plugin
- ------
- Jerome Lacoste
- ------
- January 29 2006
- ------
+  ------
+  Maven 2 Deploy Plugin - HOW-TO
+  ------
+  Jerome Lacoste
+  John Casey
+  ------
+  January 29 2006
+  ------
 
 How-to
 
- 
+* Introduction
 
-deploy:deploy
+  The Deploy Plugin has two basic functions. In most project builds, the
+  <<<deploy>>> phase of the build lifecycle is implemented using the
+  <<<deploy:deploy>>> mojo. Also, artifacts which are not built using Maven can
+  be added to any remote repository using the <<<deploy:deploy-file>>> mojo.
 
-  If you've configured your repository deployment information correctly (in the pom and in your settings.xml), most of the time, deploying will only require to run
+* The <<<deploy:deploy>>> Mojo
 
--------------------------------
+  In most cases, this mojo is invoked when you call the <<<deploy>>> phase of
+  the default build lifecycle.
+  
+  To enable this mojo to function, you must include a valid
+  <<<\<distributionManagement/\>>>> section POM, which at the minimum provides a
+  <<<\<repository/\>>>> defining the remote repository location for your
+  artifact. To separate snapshot artifacts from release artifacts, you can also
+  specify a <<<\<snapshotRepository/\>>>> location. Finally, to deploy a project
+  website, you must specify a <<<\<site/\>>>> section here as well. It's also
+  important to note that this section can be inherited, allowing you to specify
+  the deployment location one time for a set of related projects.
+  
+  If your repository is secured, you may also want to configure your
+  <<<settings.xml>>> file to define corresponding <<<\<server/\>>>> entries
+  which provides authentication information. Server entries are matched to the
+  different parts of the distributionManagement using their <<<\<id/\>>>>
+  elements. For example, your project may have a distributionManagement section
+  similar to the following:
+  
++---+
+[...]
+  <distributionManagement>
+    <repository>
+      <id>internal.repo</id>
+      <name>MyCo Internal Repository</name>
+      <url>scp://host.com/path/to/remote/repository</url>
+    </repository>
+    <snapshotRepository>
+      <id>internal.repo</id>
+      <name>MyCo Internal Snapshot Repository</name>
+      <url>scp://host.com/path/to/snapshot/repository</url>
+    </snapshotRespository>
+  </distributionManagement>
+[...]
++---+
+
+  In this case, you can specify a server definition in your <<<settings.xml>>>
+  to provide authentication information for both of these repositories at once.
+  Your server section might look like this:
+  
++---+
+[...]
+    <server>
+      <id>internal.repo</id>
+      <username>maven</username>
+      <password>foobar</password>
+    </server>
+[...]
++---+
+
+  Unfortunately, Maven doesn't currently support hashed or encrypted passwords
+  in the <<<settings.xml>>>.
+  
+  Once you've configured your repository deployment information correctly
+  deploying your project's artifact will only require invocation of the
+  <<<deploy>>> phase of the build:
+
++---+
 mvn deploy
--------------------------------
++---+
  
 
-deploy:deploy-file
+* The <<<deploy:deploy-file>>> Mojo
 
--------------------------------
-mvn deploy:deploy-file -Durl=file://C:\m2-repo -DrepositoryId -Dfile=thefile.jar 
-                       [-DpomFile=the.pom]
-                       [-DgroupId=group] [-DartifactId=artifact] [-Dversion=version] [-Dpackaging]
-                       [-Dclassifier=test]
-                       [-DgeneratePom=true]
--------------------------------
+  The <<<deploy:deploy-file>>> mojo is used primarily for deploying artifacts to
+  which were not built by Maven. The project's development team may or may not
+  provide a POM for the artifact, and in some cases you may want to deploy the
+  artifact to an internal remote repository. The deploy-file mojo provides
+  functionality covering all of these use cases, and offers a wide range of
+  configurability for generating a POM on-the-fly. Additionally, you can specify
+  what layout your repository uses. The full usage statement of the deploy-file
+  mojo can be described as:
+
++---+
+mvn deploy:deploy-file -Durl=file://C:\m2-repo \
+                       -DrepositoryId=some.id \
+                       -Dfile=your-artifact-1.0.jar \
+                       [-DpomFile=your-pom.xml] \
+                       [-DgroupId=org.some.group] \
+                       [-DartifactId=your-artifact] \
+                       [-Dversion=1.0] \
+                       [-Dpackaging=jar] \
+                       [-Dclassifier=test] \
+                       [-DgeneratePom=true] \
+                       [-DgeneratePom.description="My Project Description"]
+                       [-DuniqueVersion=false]
++---+
 
-  If the following required information is not specified in some way, the goal will fail:
+  If the following required information is not specified in some way, the goal
+  will fail:
 
-  * the file to deploy
+  * the artifact file to deploy
   
-  * the group, artifact, version and packaging of the file to deploy. These can be taken from the specified pomFile, and overriden 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 repository information: the url to deploy to and the repositoryId mapping to a server section in the settings.xml file.
+  * the group, artifact, version and packaging of the file to deploy. These can
+    be taken from the specified pomFile, and overriden 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 repository information: the url to deploy to and the repositoryId
+    mapping to a server section in the settings.xml file. If you don't specify a
+    repositoryId, Maven will try to extract authentication information using the
+    id <<<'remote-repository'>>>.
 
-  Optionally, one can specify a classifier, or avoid generating a pom.
+  []
 

Modified: maven/plugins/trunk/maven-deploy-plugin/src/site/apt/introduction.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/site/apt/introduction.apt?rev=411991&r1=411990&r2=411991&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/site/apt/introduction.apt (original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/site/apt/introduction.apt Mon Jun  5 21:19:07 2006
@@ -1,38 +1,61 @@
- ------
- Maven 2 Deploy Plugin
- ------
- Jerome Lacoste
- ------
- January 29 2006
- ------
-
-Introduction
-
-  The deploy plugin is primarily used during the deploy phase, to add your artifact(s) to a remote repository for sharing with other developers and projects. This is usualy done in an integration or release environment. It can also be used to deploy a particular artifact (e.g. a third party jar like Sun's non redistributable reference implementations).
-
-  As a repository contains more than the artifacts (POMs, the metadata, MD5 and SHA1 hash files...), deploying means not only copying the artifacts, but making sure all this information is correctly updated. It's the reponsibility of the deploy plugin.
+  ------
+  Maven 2 Deploy Plugin
+  ------
+  Jerome Lacoste
+  ------
+  January 29 2006
+  ------
+
+Maven 2 Deploy Plugin - Introduction
+  
+  The deploy plugin is primarily used during the deploy phase, to add your
+  artifact(s) to a remote repository for sharing with other developers and
+  projects. This is usualy done in an integration or release environment. It can
+  also be used to deploy a particular artifact (e.g. a third party jar like
+  Sun's non redistributable reference implementations).
+
+  As a repository contains more than the artifacts (POMs, the metadata, MD5 and
+  SHA1 hash files...), deploying means not only copying the artifacts, but
+  making sure all this information is correctly updated. It's the reponsibility
+  of the deploy plugin.
 
   To work, the deployment will require:
 
-  * information about the repository: its location, the transport method used to access it (FTP, SCP, SFTP...) and the optional user specific required account information
+  * information about the repository: its location, the transport method used to
+    access it (FTP, SCP, SFTP...) and the optional user specific required 
+    account information
 
-  * information about the artifact(s): the group, artifact, version, packaging, classifier...
+  * information about the artifact(s): the group, artifact, version, packaging,
+    classifier...
 
-  * a deployer: a method to actually perform the deployment. This can be implemented as a wagon transport (making it cross-platform), or use a system specific method.
+  * a deployer: a method to actually perform the deployment. This can be
+    implemented as a wagon transport (making it cross-platform), or use a system
+    specific method.
 
-  The information will be taken from the implied (or specified) pom and from the command line. The settings.xml file may also be parsed to retrieve user credentials.
+  The information will be taken from the implied (or specified) pom and from the
+  command line. The settings.xml file may also be parsed to retrieve user
+  credentials.
 
 
-Goals overview
+* Goals Overview
 
   The deploy plugin has 2 goals:
 
-  * {{{index.html} deploy:deploy}} is used to automatically install the artifact, its pom and the attached artifacts produced by a particuliar project. Most if not all the information related to the deployment is stored in the project's pom. The operation
+  * {{{index.html}deploy:deploy}} is used to automatically install the
+    artifact, its pom and the attached artifacts produced by a particuliar
+    project. Most if not all the information related to the deployment is stored
+    in the project's pom. The operation
+
+  * {{{index.html}deploy:deploy-file}} is used to install a single artifact
+    along with its pom. In that case the artifact information can be taken from 
+    an optionally specified pomFile, but can be completed/overriden using the 
+    command line.
 
-  * {{{index.html} deploy:deploy-file}} is used to install a single artifact along with its pom. In that case the artifact information can be taken from an optionally specified pomFile, but can be completed/overriden using the command line.
+* How-To
 
+  Some basic instructions for configuring and using the mojos of the <<<maven-deploy-plugin>>> can be found in the {{{howto.html}How-To guide}}.
 
-Links
+* Resources
 
   * {{{http://maven.apache.org/guides/introduction/introduction-to-repositories.html} Introduction to repositories}}