You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by br...@apache.org on 2008/05/10 23:12:32 UTC

svn commit: r655186 - /archiva/trunk/archiva-docs/src/site/apt/userguide/deploy.apt

Author: brett
Date: Sat May 10 14:12:32 2008
New Revision: 655186

URL: http://svn.apache.org/viewvc?rev=655186&view=rev
Log:
clarify that you can use HTTP, not just WebDAV. Adjust ordering and other minor improvements

Modified:
    archiva/trunk/archiva-docs/src/site/apt/userguide/deploy.apt

Modified: archiva/trunk/archiva-docs/src/site/apt/userguide/deploy.apt
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-docs/src/site/apt/userguide/deploy.apt?rev=655186&r1=655185&r2=655186&view=diff
==============================================================================
--- archiva/trunk/archiva-docs/src/site/apt/userguide/deploy.apt (original)
+++ archiva/trunk/archiva-docs/src/site/apt/userguide/deploy.apt Sat May 10 14:12:32 2008
@@ -6,49 +6,13 @@
 
  There are different ways on how you can deploy artifacts in an Archiva repository. 
 
-* Deploying via the Web UI Form
+   * {{{#Maven} Configuring Maven to deploy to an Archiva repository}}
 
-  The easiest way to deploy in the repository is via the Web UI form, which can be accessed in the 'Upload Artifact' section.
-  Just follow these steps:
-
-  [[1]] Fill up the following required fields:
-
-  * Group Id - the groupId of the artifact to be deployed.
-
-  * Artifact Id - the artifactId of the artifact to be deployed.
-
-  * Version - the version of the artifact to be deployed.
-
-  * Packaging - the packaging of the artifact to be deployed. (ex. jar, war, ear, etc.)
-
-  * Artifact File - the actual artifact to be deployed.
-
-  []
-
-  [[2]] Select the repository you want to deploy to. Please note that if you do not have write permission to the repository,
-   you will not be allowed to deploy in it.
-
-  [[3]] Now, if you want Archiva to generate a pom for the artifact, check the Generate Maven 2 POM field.
-   (Right now, only Maven 2 poms can be generated.)  Alternately, supply a POM file to be deployed alongside the artifact.
-
-  [[4]] Click Submit and a message will be displayed notifying you if the upload/deployment was successful or not.
-
-  []
-  
-  These are the files that will be in your repository after deployment:
+   * {{{#Web UI} Deploying via the Web UI Form}}
 
-  * artifact 
-
-  * POM file (if you supplied one or checked Generate Maven 2 POM)
-
-  * maven-metadata.xml (this will be created if none exists in the artifact level yet, otherwise it will just be updated)
-
-  * maven-metadata.xml.sha1 and maven-metadata.xml.md5 (these will be generated for newly created maven-metadata.xml files, otherwise
-  they will just be updated)
-
-* Configuring Maven to deploy to an Archiva repository
+* Configuring {Maven} to deploy to an Archiva repository
   
-  [[1]] Create a user in Archiva to use for deployment
+  [[1]] Create a user in Archiva to use for deployment (or use guest if you wish to deploy without a username and password)
 
   [[2]] The deployment user needs the Role 'Repository Manager' for each repository that you want to deploy to
 
@@ -74,11 +38,37 @@
   </settings>
 +-------------------------------------------------------------------------+
 
-* Deploying to Archiva using WebDAV
+** Deploying to Archiva using HTTP
 
-  [[1]] Configure the <<<distributionManagement>>> part of your <<<pom.xml>>> (customising the URLs as needed).
-        The <<<id>>> of the repository in <<<distributionManagement>>> <<must>> match the <<<id>>> of the <<<server>>>
-        element in <<<settings.xml>>>.
+  Configure the <<<distributionManagement>>> part of your <<<pom.xml>>> (customising the URLs as needed).
+  The <<<id>>> of the repository in <<<distributionManagement>>> <<must>> match the <<<id>>> of the <<<server>>>
+  element in <<<settings.xml>>>.
+ 
++-------------------------------------------------------------------------+
+  <project>
+    ...
+    <distributionManagement>
+      <repository>
+        <id>archiva.internal</id>
+        <name>Internal Release Repository</name>
+        <url>http://reposerver.mycompany.com:8080/archiva/repository/internal/</url>
+      </repository>
+      <snapshotRepository>
+        <id>archiva.snapshots</id>
+        <name>Internal Snapshot Repository</name>
+        <url>http://reposerver.mycompany.com:8080/archiva/repository/snapshots/</url>
+      </snapshotRepository>
+    </distributionManagement>
+    ...
+  </project>
++-------------------------------------------------------------------------+
+
+** Deploying to Archiva using WebDAV
+
+  In some cases, you may want to use WebDAV to deploy instead of HTTP. If you find this is necessary, follow the same
+  process as for HTTP, with these additional steps:
+
+  [[1]] Add <<<dav:>>> to the front of the deployment URLs:
  
 +-------------------------------------------------------------------------+
   <project>
@@ -99,7 +89,7 @@
   </project>
 +-------------------------------------------------------------------------+
 
-  [[2]] Add a build extension to your <<<pom.xml>>>
+  [[2]] Add a build extension to your <<<pom.xml>>> (not required in Maven 2.0.9 and above)
 
 +-------------------------------------------------------------------------+
   <project>
@@ -117,9 +107,7 @@
   </project>
 +-------------------------------------------------------------------------+
 
-  [[3]] Finally the user that is running archiva (tomcat-user, plexus-user,..) must have write access to the deployment repository.   
-
-* Deploying using other protocols
+** Deploying using other protocols
 
   You can also deploy to the Archiva server using traditional means such as SCP, FTP, etc. For more information on these deployment
   techniques, refer to the Maven documentation.
@@ -127,45 +115,92 @@
   Note that once the files are deployed into the location of the Archiva managed repository, they will not be detected by Archiva until the
   next scan takes place, so the interval should be configured to a reasonably frequent setting.
   
-* Deploying Third-Party Artifacts to Archiva
+** Deploying Third-Party Artifacts to Archiva using Maven
+
+  You can use <<<mvn deploy:deploy-file>>> to deploy single artifacts to Archiva. Once you have the settings file in place as
+  described above, you can deploy the artifact using this type of command:
+
++------+
+mvn deploy:deploy-file -Dfile=filename.jar -DpomFile=filename.pom
+    -DrepositoryId=archiva.internal
+    -Durl=http://repo.mycompany.com:8080/repository/internal/
++------+
+
+  For more information, consult the {{{http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html} documentation for the
+  <<<deploy:deploy-file>>> goal}}
 
-  [[1]] In the directory from which you intend to execute "<<<mvn
-  deploy:deploy-file>>>", save the following content as <<<pom.xml>>>.
+  If you wish to use WebDAV to deploy the file, add <<<dav:>>> to the start of the URL as in the previous instructions.
+
+  However, on versions of Maven prior to 2.0.9, you will also need to create a file called <<<pom.xml>>>
+  in the directory from which you intend to execute "<<<mvn
+  deploy:deploy-file>>>":
   
 +-------+
 <project>
-   <modelVersion>4.0.0</modelVersion>
-   <groupId>com.example</groupId>
-   <artifactId>webdav-deploy</artifactId>
-   <packaging>pom</packaging>
-   <version>1</version>
-   <name>Webdav Deployment POM</name>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>com.example</groupId>
+  <artifactId>webdav-deploy</artifactId>
+  <packaging>pom</packaging>
+  <version>1</version>
+  <name>Webdav Deployment POM</name>
    
-   <build>
-      <extensions>
-         <extension>
-            <groupId>org.apache.maven.wagon</groupId>
-            <artifactId>wagon-webdav</artifactId>
-            <version>1.0-beta-2</version>
-         </extension>
-      </extensions>
-   </build>
-
+  <build>
+    <extensions>
+      <extension>
+        <groupId>org.apache.maven.wagon</groupId>
+        <artifactId>wagon-webdav</artifactId>
+        <version>1.0-beta-2</version>
+      </extension>
+    </extensions>
+  </build>
 </project>
 +-------+
 
   This pom will not be deployed with the artifact, it simply serves to make the
-  wagon-webdav jar available to the build process.
+  WebDAV protocol available to the build process.
   
-  Alternately, save this file somewhere else, and use "<<<mvn ... -f
+  Alternately, you can save this file somewhere else, and use "<<<mvn ... -f
   /path/to/filename>>>" to force the use of an alternate POM file.
   
-  [[2]] Deploy the artifact:
+* Deploying via the {Web UI} Form
+
+  The easiest way to deploy in the repository is via the Web UI form, which can be accessed in the 'Upload Artifact' section.
+  Just follow these steps:
+
+  [[1]] Fill up the following required fields:
+
+  * Group Id - the groupId of the artifact to be deployed.
+
+  * Artifact Id - the artifactId of the artifact to be deployed.
+
+  * Version - the version of the artifact to be deployed.
+
+  * Packaging - the packaging of the artifact to be deployed. (ex. jar, war, ear, etc.)
+
+  * Artifact File - the actual artifact to be deployed.
+
+  []
+
+  [[2]] Select the repository you want to deploy to. Please note that if you do not have write permission to the repository,
+   you will not be allowed to deploy in it.
+
+  [[3]] Now, if you want Archiva to generate a pom for the artifact, check the Generate Maven 2 POM field.
+   (Right now, only Maven 2 poms can be generated.)  Alternately, supply a POM file to be deployed alongside the artifact.
+
+  [[4]] Click Submit and a message will be displayed notifying you if the upload/deployment was successful or not.
+
+  []
   
-+------+
-mvn deploy:deploy-file -Dfile=filename.jar -DpomFile=filename.pom
-    -DrepositoryId=archiva.internal
-    -Durl=dav:http://repo.mycompany.com:8080/repository/internal/
-+------+
+  These are the files that will be in your repository after deployment:
+
+  * artifact 
+
+  * POM file (if you supplied one or checked Generate Maven 2 POM)
+
+  * maven-metadata.xml (this will be created if none exists in the artifact level yet, otherwise it will just be updated)
+
+  * maven-metadata.xml.sha1 and maven-metadata.xml.md5 (these will be generated for newly created maven-metadata.xml files, otherwise
+  they will just be updated)
 
 ~~TODO: information for Maven 1, ant tasks, ivy, etc.
+