You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by de...@apache.org on 2007/08/25 21:56:58 UTC
svn commit: r569723 - in /maven/plugins/trunk/maven-stage-plugin/src:
main/java/org/apache/maven/plugins/stage/CopyRepositoryMojo.java site/
site/apt/ site/apt/index.apt site/apt/usage.apt site/fml/ site/fml/faq.fml
site/site.xml
Author: dennisl
Date: Sat Aug 25 12:56:57 2007
New Revision: 569723
URL: http://svn.apache.org/viewvc?rev=569723&view=rev
Log:
o Create a site for the plugin.
o Improve JavaDoc.
Added:
maven/plugins/trunk/maven-stage-plugin/src/site/
maven/plugins/trunk/maven-stage-plugin/src/site/apt/
maven/plugins/trunk/maven-stage-plugin/src/site/apt/index.apt (with props)
maven/plugins/trunk/maven-stage-plugin/src/site/apt/usage.apt (with props)
maven/plugins/trunk/maven-stage-plugin/src/site/fml/
maven/plugins/trunk/maven-stage-plugin/src/site/fml/faq.fml (with props)
maven/plugins/trunk/maven-stage-plugin/src/site/site.xml (with props)
Modified:
maven/plugins/trunk/maven-stage-plugin/src/main/java/org/apache/maven/plugins/stage/CopyRepositoryMojo.java
Modified: maven/plugins/trunk/maven-stage-plugin/src/main/java/org/apache/maven/plugins/stage/CopyRepositoryMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-stage-plugin/src/main/java/org/apache/maven/plugins/stage/CopyRepositoryMojo.java?rev=569723&r1=569722&r2=569723&view=diff
==============================================================================
--- maven/plugins/trunk/maven-stage-plugin/src/main/java/org/apache/maven/plugins/stage/CopyRepositoryMojo.java (original)
+++ maven/plugins/trunk/maven-stage-plugin/src/main/java/org/apache/maven/plugins/stage/CopyRepositoryMojo.java Sat Aug 25 12:56:57 2007
@@ -28,6 +28,8 @@
import java.io.IOException;
/**
+ * Copies artifacts from one repository to the another repository.
+ *
* @author Jason van Zyl
* @requiresProject false
* @goal copy
@@ -35,13 +37,25 @@
public class CopyRepositoryMojo
extends AbstractMojo
{
- /** @parameter expression="${source}" */
+ /**
+ * The URL to the source repository.
+ *
+ * @parameter expression="${source}"
+ */
private String source;
- /** @parameter expression="${target}" */
+ /**
+ * The URL to the target repository.
+ *
+ * @parameter expression="${target}"
+ */
private String target;
- /** @parameter expression="${repositoryId}" default-value="target" */
+ /**
+ * The id of the target repository.
+ *
+ * @parameter expression="${repositoryId}" default-value="target"
+ */
private String repositoryId;
/**
@@ -54,12 +68,22 @@
private String username;
/**
+ * The version of the artifact that is to be copied.
+ * <p>
+ * <b>Note:</b> This is currently only used for naming temporary files.
+ * <i>All</i> versions of the artifacts will be copied.
+ * </p>
+ *
* @parameter expression="${version}"
* @required
*/
private String version;
- /** @component */
+ /**
+ * The repository copier to use.
+ *
+ * @component
+ */
private RepositoryCopier copier;
public void execute()
Added: maven/plugins/trunk/maven-stage-plugin/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-stage-plugin/src/site/apt/index.apt?rev=569723&view=auto
==============================================================================
--- maven/plugins/trunk/maven-stage-plugin/src/site/apt/index.apt (added)
+++ maven/plugins/trunk/maven-stage-plugin/src/site/apt/index.apt Sat Aug 25 12:56:57 2007
@@ -0,0 +1,51 @@
+ ------
+ Introduction
+ ------
+ Dennis Lundberg
+ ------
+ 2007-08-25
+ ------
+
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements. See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership. The ASF licenses this file
+ ~~ 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
+ ~~ KIND, either express or implied. See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+
+Maven Stage Plugin
+
+ The Maven Stage Plugin copies artifacts from one repository to another. Its
+ main use is for copying artifacts from a staging repository to the real
+ repository.
+
+* Goals Overview
+
+ The Stage Plugin has one goals:
+
+ * {{{copy-mojo.html}stage:copy}} Copies artifacts from one repository to the
+ another repository.
+
+* Usage
+
+ Instructions on how to use the Stage Plugin can be found {{{usage.html}here}}.
+
+ ~~ * Examples
+
+ ~~ The following examples show how to use the Stage Plugin in more advanced use-cases:
+
+ ~~ * {{{examples/advanced.html}Advanced}}
Propchange: maven/plugins/trunk/maven-stage-plugin/src/site/apt/index.apt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-stage-plugin/src/site/apt/index.apt
------------------------------------------------------------------------------
svn:keywords = Date Id
Added: maven/plugins/trunk/maven-stage-plugin/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-stage-plugin/src/site/apt/usage.apt?rev=569723&view=auto
==============================================================================
--- maven/plugins/trunk/maven-stage-plugin/src/site/apt/usage.apt (added)
+++ maven/plugins/trunk/maven-stage-plugin/src/site/apt/usage.apt Sat Aug 25 12:56:57 2007
@@ -0,0 +1,72 @@
+ ------
+ Usage
+ ------
+ Dennis Lundberg
+ ------
+ 2007-08-25
+ ------
+
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements. See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership. The ASF licenses this file
+ ~~ 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
+ ~~ KIND, either express or implied. See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+
+Usage
+
+ The plugin is used from the command line. In the following example we will
+ copy artifacts from a staging repository located at
+ <<<http://people.apache.org/~snicoll/maven-stage-repo/>>> to the Apache rsync
+ repository located at
+ <<<scp://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository>>>.
+
+-------------------
+mvn stage:copy -Dsource="http://people.apache.org/~snicoll/maven-stage-repo/" \
+ -Dtarget="scp://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository" \
+ -Dversion=2.0.3
+-------------------
+
+ <<Note:>> Although it looks like we are only copying version <<<2.0.3>>>, we
+ are in fact copying <<everything>> from the source URL to the target. This is
+ due to a bug and will change in the future.
+
+
+* What is happening under the hood?
+
+ The follwing tasks will be performed by the plugin:
+
+ * Download the files from the source repository
+
+ * Download any metadata that is already present in the target repository
+
+ * Merge source and target metadata
+
+ * Create a rename script
+
+ * Create a zip file containing the source files, the merged metadata and the rename script
+
+ * Upload the zip file to the target repository
+
+ * Unpack the zip file on the target machine
+
+ * Delete the zip file from the target repository
+
+ * Run the rename script on the target machine
+
+ * Delete the rename script from the target repository
+
\ No newline at end of file
Propchange: maven/plugins/trunk/maven-stage-plugin/src/site/apt/usage.apt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-stage-plugin/src/site/apt/usage.apt
------------------------------------------------------------------------------
svn:keywords = Date Id
Added: maven/plugins/trunk/maven-stage-plugin/src/site/fml/faq.fml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-stage-plugin/src/site/fml/faq.fml?rev=569723&view=auto
==============================================================================
--- maven/plugins/trunk/maven-stage-plugin/src/site/fml/faq.fml (added)
+++ maven/plugins/trunk/maven-stage-plugin/src/site/fml/faq.fml Sat Aug 25 12:56:57 2007
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+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
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<faqs id="FAQ" title="Frequently Asked Questions">
+ <part id="General">
+ <faq id="Why isn't my username being picked up when I specify a repositoryId?">
+ <question>Why isn't my username being picked up when I specify a repositoryId?</question>
+ <answer>
+ <p>
+ The plugin <i>should</i> pick up your username/password from your
+ <code>settings.xml</code> file. Due to a bug in Wagon this isn't
+ happening. To get around this you can pass along your username like
+ this:
+ </p>
+ <source>
+mvn stage:copy -Dstage.username=dennisl ...
+ </source>
+ </answer>
+ </faq>
+ </part>
+</faqs>
\ No newline at end of file
Propchange: maven/plugins/trunk/maven-stage-plugin/src/site/fml/faq.fml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-stage-plugin/src/site/fml/faq.fml
------------------------------------------------------------------------------
svn:keywords = Date Id
Added: maven/plugins/trunk/maven-stage-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-stage-plugin/src/site/site.xml?rev=569723&view=auto
==============================================================================
--- maven/plugins/trunk/maven-stage-plugin/src/site/site.xml (added)
+++ maven/plugins/trunk/maven-stage-plugin/src/site/site.xml Sat Aug 25 12:56:57 2007
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+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
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+ <body>
+ <menu name="Overview">
+ <item name="Introduction" href="index.html"/>
+ <item name="Goals" href="plugin-info.html"/>
+ <item name="Usage" href="usage.html"/>
+ <item name="FAQ" href="faq.html"/>
+ </menu>
+<!--
+ <menu name="Examples">
+ <item name="Advanced" href="/examples/advanced.html"/>
+ </menu>
+-->
+ </body>
+</project>
Propchange: maven/plugins/trunk/maven-stage-plugin/src/site/site.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-stage-plugin/src/site/site.xml
------------------------------------------------------------------------------
svn:keywords = Date Id