Initial revision

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@112724 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jvanzyl
2003-01-24 03:44:26 +00:00
parent 66e44f2734
commit 530c640d4f
821 changed files with 55754 additions and 0 deletions

3
deploy/.cvsignore Normal file
View File

@@ -0,0 +1,3 @@
target
velocity.log
maven.log

187
deploy/plugin.jelly Normal file
View File

@@ -0,0 +1,187 @@
<?xml version="1.0"?>
<project
xmlns:j="jelly:core"
xmlns:maven="jelly:maven"
xmlns:define="jelly:define"
xmlns:deploy="deploy"
xmlns:util="jelly:util"
xmlns:log="jelly:log"
xmlns:m="maven">
<!--
|
| FIX ME: It is the additional siteCommand options that is causing the
| deploy:artifact tag to hang indefinitely.
|
-->
<!-- ================================================================== -->
<!-- D E P L O Y A R T I F A C T T A G -->
<!-- ================================================================== -->
<!-- The deploy-artifact tag is a dynamic tag that allows the -->
<!-- consistent deployment of artifacts generated by Maven. -->
<!-- -->
<!-- The following parameters can be used with the deploy-artifact -->
<!-- tag by setting the appropriate attribute when invoking the tag: -->
<!-- -->
<!-- @param artifact -->
<!-- @param type -->
<!-- @param assureDirectoryCommand -->
<!-- ================================================================== -->
<define:taglib uri="deploy">
<define:tag name="artifact">
<!--
||
|| If the ${maven.username} value isn't set then the deployment
|| process fails.
||
-->
<j:set var="username" value='${context.getVariable("maven.username")}'/>
<m:user-check user="${username}"/>
<j:set var="copier" value='${context.getVariable("maven.scp.executable")}'/>
<j:set var="commander" value='${context.getVariable("maven.ssh.executable")}'/>
<j:set var="distributionSiteX" value="${pom.distributionSite}X"/>
<j:choose>
<j:when test="${distributionSiteX != 'X'}">
<j:set var="siteAddress" value="${pom.distributionSite}"/>
<j:set var="siteDirectory" value="${pom.distributionDirectory}"/>
</j:when>
<j:otherwise>
<j:set var="siteAddress" value='${context.getVariable("maven.repo.central")}'/>
<j:set var="siteDirectory" value='${context.getVariable("maven.repo.central.directory")}'/>
</j:otherwise>
</j:choose>
<j:set var="typeX" value="${type}X"/>
<j:choose>
<j:when test="${typeX != 'X'}">
<property
name="resolvedDirectory"
value="${siteDirectory}/${pom.artifactDirectory}/${type}"
/>
</j:when>
<j:otherwise>
<property
name="resolvedDirectory"
value="${siteDirectory}/${pom.artifactDirectory}"
/>
</j:otherwise>
</j:choose>
<echo>
Moving ${artifact} to the ${resolvedDirectory} on ${siteAddress}
</echo>
<!--
||
|| Make sure the destination directory exists.
||
-->
<j:set var="assureDirectoryCommandX" value="${assureDirectoryCommand}X"/>
<j:if test="${assureDirectoryCommandX != 'X'}">
<exec dir="." executable="${commander}">
<arg line="${siteAddress} -l ${username} '${assureDirectoryCommand} ${resolvedDirectory}'"/>
</exec>
</j:if>
<exec dir="." executable="${copier}">
<arg value="${artifact}"/>
<arg value="${username}@${siteAddress}:${resolvedDirectory}"/>
</exec>
<!--
||
|| Execute a command on the server if one is specified.
||
-->
<j:set var="siteCommandX" value="${siteCommand}X"/>
<j:if test="${siteCommandX != 'X'}">
<j:useBean var="strings" class="org.apache.commons.lang.StringUtils"/>
<j:set
var="siteCommand"
value='${strings.replace(siteCommand, "@deployDirectory@", resolvedDirectory)}'
/>
<echo>
Executing ${siteCommand} with the username ${username} on ${siteAddress}
</echo>
<exec dir="." executable="${commander}">
<arg line="${siteAddress} -l ${username} '${siteCommand}'"/>
</exec>
</j:if>
</define:tag>
<!-- ================================================================== -->
<!-- C O P Y D E P S -->
<!-- ================================================================== -->
<define:tag name="copy-deps">
<!--
|
| If a POM descriptor has been specified then use it.
|
-->
<j:if test="${projectDescriptor != null}">
<maven:pom var="pom" projectDescriptor="${projectDescriptor}"/>
</j:if>
<j:set var="mavenRepoLocal" value='${context.getVariable("maven.repo.local")}'/>
<mkdir dir="${todir}"/>
<copy todir="${todir}" flatten="true">
<fileset dir="${mavenRepoLocal}">
<j:forEach var="dep" items="${pom.dependencies}">
<include name="${dep.artifactDirectory}/jars/${dep.artifact}"/>
</j:forEach>
<j:if test="${excludes != ''}">
<!-- The excludes are a list of dep ids -->
<util:tokenize var="excludeItems" delim=",">${excludes}</util:tokenize>
<j:forEach var="exclude" items="${excludeItems}">
<j:set var="depToExclude" value="${pom.getDependency(exclude)}"/>
<exclude name="${depToExclude.artifactDirectory}/jars/${depToExclude.jar}"/>
</j:forEach>
</j:if>
</fileset>
</copy>
</define:tag>
</define:taglib>
<!-- ========================================================================== -->
<!-- D E P L O Y P O M -->
<!-- ========================================================================== -->
<!-- POMs are deployed in the form ${pom.artifactId}-${pom.currentVersion}.pom -->
<!-- to match the same versioning convention as JARs. Having the POMs -->
<!-- deployed during each release will allow someone to build any -->
<!-- version of a project reliably. -->
<!-- ========================================================================== -->
<goal name="deploy:pom"
description="Deploy POM to the central repository.">
<copy file="project.xml" tofile="${pom.artifactId}-${pom.currentVersion}.pom"/>
<deploy:artifact
artifact="${pom.artifactId}-${pom.currentVersion}.pom"
type="poms"
assureDirectoryCommand="mkdir -p"
/>
<delete file="${pom.artifactId}-${pom.currentVersion}.pom"/>
</goal>
</project>

View File

@@ -0,0 +1,2 @@
maven.xdoc.date=left
maven.xdoc.version=${pom.currentVersion}

109
deploy/project.xml Normal file
View File

@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<extend>${basedir}/../project.xml</extend>
<pomVersion>3</pomVersion>
<id>maven-deploy-plugin</id>
<name>Maven Deploy Plug-in</name>
<currentVersion>1.0</currentVersion>
<description>
</description>
<shortDescription>Java Project Management Tools</shortDescription>
<url>http://jakarta.apache.org/turbine/maven/reference/plugins/deploy/</url>
<issueTrackingUrl>http://jira.werken.com/BrowseProject.jspa?id=10030</issueTrackingUrl>
<siteAddress>jakarta.apache.org</siteAddress>
<siteDirectory>/www/jakarta.apache.org/turbine/maven/reference/plugins/deploy/</siteDirectory>
<distributionDirectory>/www/jakarta.apache.org/builds/jakarta-turbine-maven/</distributionDirectory>
<developers>
<developer>
<name>dIon Gillard</name>
<id>dion</id>
<email>dion@multitask.com.au</email>
<organization>Multitask Consulting</organization>
<roles>
<role>Documentation</role>
</roles>
</developer>
<developer>
<name>Stéphane Mor</name>
<id>smor</id>
<email>stephanemor@yahoo.fr</email>
<organization>Hasgard Systèmes et Réseaux</organization>
<roles>
<role>Java Developer</role>
</roles>
</developer>
<developer>
<name>Jason van Zyl</name>
<id>jvanzyl</id>
<email>jason@zenplex.com</email>
<organization>Zenplex</organization>
<roles>
<role>Architect</role>
<role>Release Manager</role>
</roles>
</developer>
</developers>
<dependencies>
<!--
|
| Need this so that deployers can know about Projects
| and Artifacts.
|
-->
<dependency>
<id>maven</id>
<version>beta-8</version>
<jar>maven.jar</jar>
</dependency>
<dependency>
<id>commons-jelly</id>
<version>SNAPSHOT</version>
</dependency>
<dependency>
<id>commons-jelly+tags-log</id>
<version>SNAPSHOT</version>
<properties>
<classloader>root.maven</classloader>
</properties>
</dependency>
<!--
| Deployers
-->
<dependency>
<id>jsch</id>
<version>0.0.9</version>
</dependency>
<dependency>
<id>jce</id>
<version>1.2.2</version>
</dependency>
<dependency>
<id>commons-httpclient</id>
<version>SNAPSHOT</version>
</dependency>
<dependency>
<id>commons-net</id>
<version>SNAPSHOT</version>
</dependency>
</dependencies>
</project>

1
deploy/xdocs/.cvsignore Normal file
View File

@@ -0,0 +1 @@
stylesheets

22
deploy/xdocs/goals.xml Normal file
View File

@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<document>
<properties>
<title>Maven Deploy Goals</title>
<author email="dion@multitask.com.au">dIon Gillard</author>
</properties>
<body>
<section name="Goals">
<table>
<tr><th>Goal</th><th>Description</th></tr>
<tr>
<td>deploy:pom</td>
<td>
Deploy project.xml, a.k.a. the POM to the central repository.
</td>
</tr>
</table>
</section>
</body>
</document>

18
deploy/xdocs/index.xml Normal file
View File

@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<document>
<properties>
<title>Maven Deployment Plug-in</title>
<author email="jason@zenplex.com">Jason van Zyl</author>
</properties>
<body>
<section name="Maven Deployment Plug-in">
<p>
This plugin is a general deployment mechanism used for deploying
artifacts into the central Maven repository and for deploying
a project's site.
</p>
</section>
</body>
</document>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Maven Deploy Plugin">
<title>Maven Deploy Plugin</title>
<body>
<links>
<item name="Maven" href="http://jakarta.apache.org/turbine/maven/"/>
</links>
<menu name="Overview">
<item name="Goals" href="/goals.html" />
<item name="Properties" href="/properties.html" />
</menu>
</body>
</project>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
<properties>
<title>Deploy Properties</title>
<author email="smor@apache.org">Stéphane MOR</author>
</properties>
<body>
<section name="Deploy Properties">
<table>
<tr>
<td>maven.scp.executable</td>
<td>Yes</td>
<td>
Specifies the name (and possibly location) of the remote secure
copy executable to use (SCP). This is used by the "deploy:pom" goal.
The default value is <code>scp</code> (i.e. an executable
named <code>scp</code> must be in your path).
</td>
</tr>
<tr>
<td>maven.ssh.executable</td>
<td>Yes</td>
<td>
Specifies the name (and possibly location) of the remote secure
shell executable to use (SSH). This is used by the "deploy:pom" goal.
The default value is <code>ssh</code> (i.e. an executable
named <code>ssh</code> must be in your path).
</td>
</tr>
</table>
</section>
</body>
</document>