Ant user can set proxy settings.
New property maven.ant.compatibility if you want a script compatible with ant 1.5 (actually for proxy settings). Update copyrights Update documentations git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@155597 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d220bf37ae
commit
46777e5300
23
ant/maven.xml
Normal file
23
ant/maven.xml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
|
*
|
||||||
|
* Licensed 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 xmlns:j="jelly:core">
|
||||||
|
<postGoal name="site">
|
||||||
|
<attainGoal name="pdf"/>
|
||||||
|
</postGoal>
|
||||||
|
</project>
|
||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!--
|
<!--
|
||||||
/*
|
/*
|
||||||
* Copyright 2001-2004 The Apache Software Foundation.
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -41,12 +41,11 @@
|
|||||||
name="ant:generate-build"
|
name="ant:generate-build"
|
||||||
description="Generate an Ant build file">
|
description="Generate an Ant build file">
|
||||||
|
|
||||||
<ant:echo>Generating ${maven.ant.generatebuild.file}</ant:echo>
|
<ant:echo>Generating ${maven.ant.generatebuild.file} ...</ant:echo>
|
||||||
|
|
||||||
<j:file name="${maven.ant.generatebuild.file}" prettyPrint="true">
|
<j:file name="${maven.ant.generatebuild.file}" prettyPrint="true">
|
||||||
<j:import file="${plugin.resources}/templates/build.jelly" inherit="true"/>
|
<j:import file="${plugin.resources}/templates/build.jelly" inherit="true"/>
|
||||||
</j:file>
|
</j:file>
|
||||||
|
<ant:echo>${maven.ant.generatebuild.file} generated.</ant:echo>
|
||||||
</goal>
|
</goal>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
# Copyright 2001-2004 The Apache Software Foundation.
|
# Copyright 2001-2005 The Apache Software Foundation.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
@ -23,3 +23,4 @@
|
|||||||
|
|
||||||
maven.ant.generatebuild.file = ${basedir}/build.xml
|
maven.ant.generatebuild.file = ${basedir}/build.xml
|
||||||
maven.ant.use.properties = true
|
maven.ant.use.properties = true
|
||||||
|
maven.ant.compatibility = 1.6
|
||||||
@ -1,5 +1,5 @@
|
|||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
# Copyright 2001-2004 The Apache Software Foundation.
|
# Copyright 2001-2005 The Apache Software Foundation.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
@ -17,3 +17,8 @@
|
|||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
# P R O J E C T P R O P E R T I E S
|
# P R O J E C T P R O P E R T I E S
|
||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
|
# Plugin tests use ant release given with maven
|
||||||
|
maven.ant.compatibility = 1.5
|
||||||
|
# PDF settings
|
||||||
|
maven.pdf.projectLogo=${maven.docs.src}/images/maven.gif
|
||||||
|
maven.pdf.companyLogo=${maven.docs.src}/images/asf_logo_wide_clear.gif
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
/*
|
/*
|
||||||
* Copyright 2001-2004 The Apache Software Foundation.
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<!--
|
<!--
|
||||||
/*
|
/*
|
||||||
* Copyright 2001-2004 The Apache Software Foundation.
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -35,6 +35,9 @@
|
|||||||
<maven:makeRelativePath var="testSrcDir" basedir="${basedir}" path="${pom.build.unitTestSourceDirectory}" separator="/"/>
|
<maven:makeRelativePath var="testSrcDir" basedir="${basedir}" path="${pom.build.unitTestSourceDirectory}" separator="/"/>
|
||||||
</j:if>
|
</j:if>
|
||||||
|
|
||||||
|
<j:set var="antComp" value="${maven.ant.compatibility}"/>
|
||||||
|
<ant:echo>Compatibility : Ant ${antComp}</ant:echo>
|
||||||
|
|
||||||
<x:comment>
|
<x:comment>
|
||||||
build.xml generated by maven from project.xml version ${pom.currentVersion}
|
build.xml generated by maven from project.xml version ${pom.currentVersion}
|
||||||
on date ${TODAY}, time ${TSTAMP}
|
on date ${TODAY}, time ${TSTAMP}
|
||||||
@ -70,6 +73,11 @@
|
|||||||
<property name="javadocdir" value="dist/docs/api"/>
|
<property name="javadocdir" value="dist/docs/api"/>
|
||||||
<property name="final.name" value="${maven.final.name}"/>
|
<property name="final.name" value="${maven.final.name}"/>
|
||||||
|
|
||||||
|
<property name="proxy.host" value="$${maven.proxy.host}"/>
|
||||||
|
<property name="proxy.port" value="$${maven.proxy.port}"/>
|
||||||
|
<property name="proxy.username" value="$${maven.proxy.username}"/>
|
||||||
|
<property name="proxy.password" value="$${maven.proxy.password}"/>
|
||||||
|
|
||||||
<path id="build.classpath">
|
<path id="build.classpath">
|
||||||
<fileset dir="$${libdir}" >
|
<fileset dir="$${libdir}" >
|
||||||
<include name="**/*.jar"/>
|
<include name="**/*.jar"/>
|
||||||
@ -83,8 +91,17 @@
|
|||||||
<condition property="noget">
|
<condition property="noget">
|
||||||
<equals arg1="$${build.sysclasspath}" arg2="only"/>
|
<equals arg1="$${build.sysclasspath}" arg2="only"/>
|
||||||
</condition>
|
</condition>
|
||||||
<x:comment> Test if JUNIT is present in ANT classpath </x:comment>
|
<x:comment> Test if JUNIT is present in ANT classpath</x:comment>
|
||||||
<available classname="junit.framework.Test" property="Junit.present"/>
|
<available classname="junit.framework.Test" property="Junit.present"/>
|
||||||
|
<x:comment> Test if user defined a proxy</x:comment>
|
||||||
|
<condition property="useProxy">
|
||||||
|
<and>
|
||||||
|
<isset property="proxy.host"/>
|
||||||
|
<not>
|
||||||
|
<equals arg1="$${proxy.host}" arg2="" trim="true"/>
|
||||||
|
</not>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target
|
<target
|
||||||
@ -342,18 +359,9 @@
|
|||||||
|
|
||||||
<target
|
<target
|
||||||
name="get-deps"
|
name="get-deps"
|
||||||
depends="init"
|
depends="init,setProxy,noProxy"
|
||||||
unless="noget">
|
unless="noget">
|
||||||
|
|
||||||
<x:comment>Proxy settings works only with a JDK 1.2 and higher.</x:comment>
|
|
||||||
<j:if test="${maven.proxy.host != null and !maven.proxy.host.trim().equals('')}">
|
|
||||||
<setproxy
|
|
||||||
proxyhost="${maven.proxy.host}"
|
|
||||||
proxyport="${maven.proxy.port}"
|
|
||||||
proxyuser="${maven.proxy.username}"
|
|
||||||
proxypassword="${maven.proxy.password}"/>
|
|
||||||
</j:if>
|
|
||||||
|
|
||||||
<j:forEach var="lib" items="${pom.artifacts}">
|
<j:forEach var="lib" items="${pom.artifacts}">
|
||||||
<maven:makeRelativePath var="relativePath" basedir="${maven.repo.local}" path="${lib.path}" separator="/"/>
|
<maven:makeRelativePath var="relativePath" basedir="${maven.repo.local}" path="${lib.path}" separator="/"/>
|
||||||
<u:file var="checkExist" name="${maven.repo.local}/${relativePath}" />
|
<u:file var="checkExist" name="${maven.repo.local}/${relativePath}" />
|
||||||
@ -376,9 +384,45 @@
|
|||||||
<copy todir="$${libdir}" file="${relativePath}"/>
|
<copy todir="$${libdir}" file="${relativePath}"/>
|
||||||
</j:otherwise>
|
</j:otherwise>
|
||||||
</j:choose>
|
</j:choose>
|
||||||
</j:forEach>
|
</j:forEach>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<target
|
||||||
|
name="setProxy"
|
||||||
|
depends="init"
|
||||||
|
if="useProxy">
|
||||||
|
<x:comment>Proxy settings works only with a JDK 1.2 and higher.</x:comment>
|
||||||
|
<echo>Proxy used :</echo>
|
||||||
|
<j:choose>
|
||||||
|
<j:when test="${antComp == '1.5'}">
|
||||||
|
<echo>Proxy host [$${proxy.host}]</echo>
|
||||||
|
<echo>Proxy port [$${proxy.port}]</echo>
|
||||||
|
<setproxy
|
||||||
|
proxyhost="$${proxy.host}"
|
||||||
|
proxyport="$${proxy.port}"/>
|
||||||
|
</j:when>
|
||||||
|
<j:when test="${antComp == '1.6'}">
|
||||||
|
<echo>Proxy host [$${proxy.host}]</echo>
|
||||||
|
<echo>Proxy port [$${proxy.port}]</echo>
|
||||||
|
<echo>Proxy user [$${proxy.username}]</echo>
|
||||||
|
<setproxy
|
||||||
|
proxyhost="$${proxy.host}"
|
||||||
|
proxyport="$${proxy.port}"
|
||||||
|
proxyuser="$${proxy.username}"
|
||||||
|
proxypassword="$${proxy.password}"/>
|
||||||
|
</j:when>
|
||||||
|
<j:otherwise>
|
||||||
|
<ant:fail>maven.ant.compatibility property must be setted to 1.5 or 1.6.</ant:fail>
|
||||||
|
</j:otherwise>
|
||||||
|
</j:choose>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target
|
||||||
|
name="noProxy"
|
||||||
|
depends="init"
|
||||||
|
unless="useProxy">
|
||||||
|
<echo>Proxy not used.</echo>
|
||||||
|
</target>
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<!-- A N T A U T O I N S T A L L E R -->
|
<!-- A N T A U T O I N S T A L L E R -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<!--
|
<!--
|
||||||
/*
|
/*
|
||||||
* Copyright 2001-2004 The Apache Software Foundation.
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -20,6 +20,7 @@
|
|||||||
<attainGoal name="clean"/>
|
<attainGoal name="clean"/>
|
||||||
</goal>
|
</goal>
|
||||||
<goal name="test-ant">
|
<goal name="test-ant">
|
||||||
|
<delete file="${basedir}/build.xml" failonerror="false"/>
|
||||||
<attainGoal name="ant"/>
|
<attainGoal name="ant"/>
|
||||||
<assert:assertFileExists file="${basedir}/build.xml"/>
|
<assert:assertFileExists file="${basedir}/build.xml"/>
|
||||||
<ant:ant/>
|
<ant:ant/>
|
||||||
@ -44,6 +45,5 @@
|
|||||||
<!-- there are no unit test sources present, so the resources wont be copied either
|
<!-- there are no unit test sources present, so the resources wont be copied either
|
||||||
<assert:assertFileExists file="${maven.test.dest}/directory-1/file1.properties"/>
|
<assert:assertFileExists file="${maven.test.dest}/directory-1/file1.properties"/>
|
||||||
<assert:assertFileExists file="${maven.test.dest}/file2.properties"/-->
|
<assert:assertFileExists file="${maven.test.dest}/file2.properties"/-->
|
||||||
<delete file="${basedir}/build.xml"/>
|
|
||||||
</goal>
|
</goal>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
/*
|
/*
|
||||||
* Copyright 2001-2004 The Apache Software Foundation.
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright 2001-2004 The Apache Software Foundation.
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -19,7 +19,7 @@
|
|||||||
* A simple class
|
* A simple class
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
|
* @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
|
||||||
* @version $Id: AClass.java,v 1.1 2004/08/16 10:50:27 carlos Exp $
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class AClass {
|
public class AClass {
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright 2001-2004 The Apache Software Foundation.
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
128
ant/xdocs/ant-settings.xml
Normal file
128
ant/xdocs/ant-settings.xml
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
|
*
|
||||||
|
* Licensed 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.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<document>
|
||||||
|
<properties>
|
||||||
|
<title>Ant Settings</title>
|
||||||
|
<author email="aheritier@apache.org">Arnaud Heritier</author>
|
||||||
|
</properties>
|
||||||
|
<body>
|
||||||
|
<section name="Information about the generated Ant build file">
|
||||||
|
<subsection name="Properties">
|
||||||
|
<p>When you generate the build file with maven, if the property <a href="properties.html">
|
||||||
|
<code>"maven.ant.use.properties"</code>
|
||||||
|
</a> is setted to true (default behaviour), the build file will load successively the properties stored in files <code>"build.properties"</code> located in :</p>
|
||||||
|
<ol>
|
||||||
|
<li>the project's root directory,</li>
|
||||||
|
<li>the user's home directory.</li>
|
||||||
|
</ol>
|
||||||
|
<p>If this property is setted to false the generated build file doesn't load this properties, so it will help you to avoid conflicts.</p>
|
||||||
|
<p>The following properties are defined in the build files and thus can be overridden in the files described previously : </p>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Property name</th>
|
||||||
|
<th>Description</th>
|
||||||
|
<th>Default value</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>defaulttargetdir</td>
|
||||||
|
<td>The directory where the generated files are stored</td>
|
||||||
|
<td>${basedir}/target</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>libdir</td>
|
||||||
|
<td>The directory where are downloaded dependencies</td>
|
||||||
|
<td>${basedir}/target/lib</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>classesdir</td>
|
||||||
|
<td>The directory where compiled classes are stored</td>
|
||||||
|
<td>${basedir}/target/classes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>testclassesdir</td>
|
||||||
|
<td>The directory where compiled classes for unit tests are stored (only if there are unit tests classes in your project)</td>
|
||||||
|
<td>${basedir}/target/test-classes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>testreportdir</td>
|
||||||
|
<td>The directory where tests reports are stored (only if there are unit tests classes in your project)</td>
|
||||||
|
<td>${basedir}/target/test-reports</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>distdir</td>
|
||||||
|
<td>The directory where the distribution is created</td>
|
||||||
|
<td>${basedir}/dist</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>javadocdir</td>
|
||||||
|
<td>The directory where is stored the javadoc</td>
|
||||||
|
<td>${basedir}/dist/docs/api</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>final.name</td>
|
||||||
|
<td>The name used for the generated jar</td>
|
||||||
|
<td>${maven.final.name}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><i>${dep.artifactId}</i>.jar</td>
|
||||||
|
<td>A property is created for each project's dependency (for example : <code>activation.jar</code>). This property can be used to override the default url used to download the dependency (for example : <code>activation.jar=http://myhost/repository/sun/jars/activation-1.0.2.jar</code>)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>proxy.host</td>
|
||||||
|
<td>The proxy host used to download dependencies.</td>
|
||||||
|
<td>${maven.proxy.host}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>proxy.port</td>
|
||||||
|
<td>The proxy port.</td>
|
||||||
|
<td>${maven.proxy.port}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>proxy.username</td>
|
||||||
|
<td>The username used to connect on proxy. (only if the ant file was generated with a 1.6 compatibility)</td>
|
||||||
|
<td>${maven.proxy.username}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>proxy.password</td>
|
||||||
|
<td>The password used to connect on proxy. (only if the ant file was generated with a 1.6 compatibility)</td>
|
||||||
|
<td>${maven.proxy.password}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</subsection>
|
||||||
|
<subsection name="Targets">
|
||||||
|
<p>The main targets defined in the generated ant's buildfile are : </p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<b>clean</b> : to delete generated directories (${defaulttargetdir} and ${distdir}).</li>
|
||||||
|
<li>
|
||||||
|
<b>compile</b> : to compile the code.</li>
|
||||||
|
<li>
|
||||||
|
<b>test</b> : to run the test cases.</li>
|
||||||
|
<li>
|
||||||
|
<b>jar</b> : to create the jar.</li>
|
||||||
|
<li>
|
||||||
|
<b>javadoc</b> : to generate the project's javadoc.</li>
|
||||||
|
<li>
|
||||||
|
<b>dist</b> : to create the distribution. It contains the jar, the javadoc, licenses(LICENCE.*) and readme (README.*).</li>
|
||||||
|
</ul>
|
||||||
|
</subsection>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</document>
|
||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
/*
|
/*
|
||||||
* Copyright 2001-2004 The Apache Software Foundation.
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -20,12 +20,14 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<title>Ant plugin changes</title>
|
<title>Ant plugin changes</title>
|
||||||
<author email="dion@multitask.com.au">dIon Gillard</author>
|
<author email="dion@multitask.com.au">dIon Gillard</author>
|
||||||
|
<author email="aheritier@apache.org">Arnaud Heritier</author>
|
||||||
</properties>
|
</properties>
|
||||||
<body>
|
<body>
|
||||||
<release version="1.9" date="">
|
<release version="1.9" date="In SVN">
|
||||||
<action dev="epugh" type="add" issue="MPANT-7">Obey jar override and not attempt to download relative jars.</action>
|
<action dev="epugh" type="add" issue="MPANT-7">Obey jar override and not attempt to download relative jars.</action>
|
||||||
<action dev="aheritier" type="add" issue="MPANT-20" due-to="Dennis Lundberg">Allow URL substitutions in generated build.xml files.</action>
|
<action dev="aheritier" type="add" issue="MPANT-20" due-to="Dennis Lundberg">Allow URL substitutions in generated build.xml files.</action>
|
||||||
<action dev="aheritier" type="fix">Do not set proxy if maven.proxy.host is null or empty.</action>
|
<action dev="aheritier" type="add">Ant user can set proxy settings.</action>
|
||||||
|
<action dev="aheritier" type="add">New property maven.ant.compatibility if you want a script compatible with ant 1.5 (actually for proxy settings).</action>
|
||||||
</release>
|
</release>
|
||||||
<release version="1.8.1" date="2004-08-20">
|
<release version="1.8.1" date="2004-08-20">
|
||||||
<action dev="carlos" type="fix" issue="MPANT-16">Use relative paths in test resources filesets.</action>
|
<action dev="carlos" type="fix" issue="MPANT-16">Use relative paths in test resources filesets.</action>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!--
|
<!--
|
||||||
/*
|
/*
|
||||||
* Copyright 2001-2004 The Apache Software Foundation.
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -16,39 +16,42 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<document>
|
<document>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<title>Maven Ant Plug-in Goals</title>
|
<title>Goals</title>
|
||||||
<author email="dion@multitask.com.au">dIon Gillard</author>
|
<author email="dion@multitask.com.au">dIon Gillard</author>
|
||||||
|
<author email="aheritier@apache.org">Arnaud Heritier</author>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<goals>
|
<section name="Goals">
|
||||||
<goal>
|
<table>
|
||||||
<name>ant</name>
|
<tr>
|
||||||
<description>
|
<th>Goal</th>
|
||||||
This is the default goal of the plugin and simply attains
|
<th>Available</th>
|
||||||
the <code>ant:generate-build</code> goal.
|
<th>Description</th>
|
||||||
</description>
|
</tr>
|
||||||
</goal>
|
<tr>
|
||||||
<goal>
|
<td>ant</td>
|
||||||
<name>ant:generate-build</name>
|
<td>since 1.0</td>
|
||||||
<description>
|
<td>This is the default goal of the plugin and simply attains the <code>ant:generate-build</code> goal.
|
||||||
Generates an <a href="http://ant.apache.org/">ant</a>
|
</td>
|
||||||
<code>build.xml</code> in the current directory which has targets to
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ant:generate-build</td>
|
||||||
|
<td>since 1.0</td>
|
||||||
|
<td>Generates an <a href="http://ant.apache.org/">ant</a> build file in the current directory which has targets to
|
||||||
<ul>
|
<ul>
|
||||||
<li>Compile the java source code</li>
|
<li>Compile the java source code</li>
|
||||||
<li>Create a jar from the compiled java code</li>
|
<li>Create a jar from the compiled java code</li>
|
||||||
<li>Create a distribution</li>
|
<li>Create a distribution</li>
|
||||||
<li>Run unit tests</li>
|
<li>Run unit tests</li>
|
||||||
<li>Generate JavaDoc</li>
|
<li>Generate JavaDoc</li>
|
||||||
<li>Download all required jar files</li>
|
<li>Download all required jar files</li>
|
||||||
<li>Download and install Maven</li>
|
<li>Download and install Maven</li>
|
||||||
</ul>
|
</ul>
|
||||||
</description>
|
</td>
|
||||||
</goal>
|
</tr>
|
||||||
</goals>
|
</table>
|
||||||
</body>
|
</section>
|
||||||
|
</body>
|
||||||
</document>
|
</document>
|
||||||
|
|||||||
BIN
ant/xdocs/images/asf_logo_wide_clear.gif
Normal file
BIN
ant/xdocs/images/asf_logo_wide_clear.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
BIN
ant/xdocs/images/maven.gif
Normal file
BIN
ant/xdocs/images/maven.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!--
|
<!--
|
||||||
/*
|
/*
|
||||||
* Copyright 2001-2004 The Apache Software Foundation.
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -18,7 +18,7 @@
|
|||||||
-->
|
-->
|
||||||
<document>
|
<document>
|
||||||
<properties>
|
<properties>
|
||||||
<title>Maven Ant Plug-in</title>
|
<title>Home</title>
|
||||||
<author email="jason@zenplex.com">Jason van Zyl</author>
|
<author email="jason@zenplex.com">Jason van Zyl</author>
|
||||||
<author email="aheritier@apache.org">Arnaud Heritier</author>
|
<author email="aheritier@apache.org">Arnaud Heritier</author>
|
||||||
</properties>
|
</properties>
|
||||||
@ -38,56 +38,10 @@
|
|||||||
by this plugin, please see the <a href="properties.html">properties</a>
|
by this plugin, please see the <a href="properties.html">properties</a>
|
||||||
document.
|
document.
|
||||||
</p>
|
</p>
|
||||||
</section>
|
<p>
|
||||||
<section name="Information about the generated Ant build file">
|
For more information on the ant script generated, please see
|
||||||
<subsection name="Properties">
|
the <a href="build.html">ant script settings</a> document.
|
||||||
<p>When you generate the build file with maven, if the property <a href="properties.html">
|
</p>
|
||||||
<code>"maven.ant.use.properties"</code>
|
|
||||||
</a> is setted to true (default behaviour), the build file will load successively the properties stored in files <code>"build.properties"</code> located in :</p>
|
|
||||||
<ol>
|
|
||||||
<li>the project's root directory,</li>
|
|
||||||
<li>the user's home directory.</li>
|
|
||||||
</ol>
|
|
||||||
<p>If this property is setted to false the generated build file doesn't load this properties, so it will help you to avoid conflicts.</p>
|
|
||||||
<p>The following properties are defined in the build files and thus can be overridden in the files described previously : </p>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<b>defaulttargetdir</b> : the directory where the generated files are stored <i>(default = ${project.home}/target)</i>.</li>
|
|
||||||
<li>
|
|
||||||
<b>libdir</b> : the directory where are downloaded dependencies <i>(default = ${project.home}/target/lib)</i>.</li>
|
|
||||||
<li>
|
|
||||||
<b>classesdir</b> : the directory where compiled classes are stored <i>(default = ${project.home}/target/classes)</i>.</li>
|
|
||||||
<li>
|
|
||||||
<b>testclassesdir</b> (only if there are unit tests classes in your project) : the directory where compiled classes for unit tests are stored <i>(default = ${project.home}/target/test-classes)</i>.</li>
|
|
||||||
<li>
|
|
||||||
<b>testreportdir</b> (only if there are unit tests classes in your project) : the directory where tests reports are stored <i>(default = ${project.home}/target/test-reports)</i>.</li>
|
|
||||||
<li>
|
|
||||||
<b>distdir</b> : the directory where the distribution is created <i>(default = ${project.home}/dist)</i>.</li>
|
|
||||||
<li>
|
|
||||||
<b>javadocdir</b> : the directory where is stored the javadoc <i>(default = ${project.home}/dist/docs/api)</i>.</li>
|
|
||||||
<li>
|
|
||||||
<b>final.name</b> : the name used for the generated jar <i>(default = ${maven.final.name}</i>.</li>
|
|
||||||
<li>
|
|
||||||
<b>${dep.artifactId}.jar</b> : a property is created for each project's dependency (for example : <code>activation.jar</code>). This property can be used to override the default url used to download the dependency (for example : <code>activation.jar=http://myhost/repository/sun/jars/activation-1.0.2.jar</code>).</li>
|
|
||||||
</ul>
|
|
||||||
</subsection>
|
|
||||||
<subsection name="Targets">
|
|
||||||
<p>The main targets defined in the generated ant's buildfile are : </p>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<b>clean</b> : to delete generated directories (${defaulttargetdir} and ${distdir}).</li>
|
|
||||||
<li>
|
|
||||||
<b>compile</b> : to compile the code.</li>
|
|
||||||
<li>
|
|
||||||
<b>test</b> : to run the test cases.</li>
|
|
||||||
<li>
|
|
||||||
<b>jar</b> : to create the jar.</li>
|
|
||||||
<li>
|
|
||||||
<b>javadoc</b> : to generate the project's javadoc.</li>
|
|
||||||
<li>
|
|
||||||
<b>dist</b> : to create the distribution. It contains the jar, the javadoc, licenses(LICENCE.*) and readme (README.*).</li>
|
|
||||||
</ul>
|
|
||||||
</subsection>
|
|
||||||
</section>
|
</section>
|
||||||
</body>
|
</body>
|
||||||
</document>
|
</document>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!--
|
<!--
|
||||||
/*
|
/*
|
||||||
* Copyright 2001-2004 The Apache Software Foundation.
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -16,19 +16,20 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<project name="Maven Ant Plugin">
|
<project name="Maven Ant Plugin">
|
||||||
|
|
||||||
<title>Maven Ant Plugin</title>
|
<title>Maven Ant Plugin</title>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<links>
|
<links>
|
||||||
<item name="Maven" href="http://maven.apache.org/"/>
|
<item name="Maven" href="http://maven.apache.org/"/>
|
||||||
<item name="Ant" href="http://ant.apache.org/"/>
|
<item name="Ant" href="http://ant.apache.org/"/>
|
||||||
|
<item name="PDF Documentation" href="/maven-ant-plugin.pdf" img="/images/pdf.gif" target="_blank"/>
|
||||||
</links>
|
</links>
|
||||||
<menu name="Overview">
|
<menu name="Overview">
|
||||||
<item name="Goals" href="/goals.html" />
|
<item name="About" href="/index.html"/>
|
||||||
<item name="Properties" href="/properties.html" />
|
<item name="Plugin goals" href="/goals.html"/>
|
||||||
|
<item name="Plugin properties" href="/properties.html"/>
|
||||||
|
<item name="Ant script settings" href="/ant-settings.html"/>
|
||||||
|
<item name="Changes" href="/changes-report.html"/>
|
||||||
</menu>
|
</menu>
|
||||||
</body>
|
</body>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!--
|
<!--
|
||||||
/*
|
/*
|
||||||
* Copyright 2001-2004 The Apache Software Foundation.
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -18,55 +18,50 @@
|
|||||||
-->
|
-->
|
||||||
<document>
|
<document>
|
||||||
<properties>
|
<properties>
|
||||||
<title>Maven Ant Plugin Properties</title>
|
<title>Properties</title>
|
||||||
<author email="dion@multitask.com.au">dIon Gillard</author>
|
<author email="dion@multitask.com.au">dIon Gillard</author>
|
||||||
|
<author email="aheritier@apache.org">Arnaud Heritier</author>
|
||||||
</properties>
|
</properties>
|
||||||
<body>
|
<body>
|
||||||
<section name="Maven Ant Plugin Settings">
|
<section name="Maven Ant Plugin Settings">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Property name</th>
|
<th>Property name</th>
|
||||||
<th>Optional?</th>
|
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
|
<th>Available</th>
|
||||||
|
<th>Optional?</th>
|
||||||
|
<th>Default value</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>maven.ant.excludeTests</td>
|
<td>maven.ant.excludeTests</td>
|
||||||
|
<td>Holds a comma separated list of source file patterns that will be excluded in the generated Ant build, e.g.</td>
|
||||||
|
<td>since 1.2</td>
|
||||||
<td>Yes</td>
|
<td>Yes</td>
|
||||||
<td>
|
<td/>
|
||||||
Holds a comma separated list of source file patterns that
|
|
||||||
will be excluded in the generated Ant build, e.g.
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3">
|
<td colspan="5">
|
||||||
<source>
|
<source>maven.ant.excludeTests=**/*Test.java,**/*Suite.java</source>
|
||||||
maven.ant.excludeTests=**/*Test.java,**/*Suite.java
|
|
||||||
</source>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>maven.ant.generatebuild.file</td>
|
<td>maven.ant.generatebuild.file</td>
|
||||||
|
<td>Sets the name of the ant buildfile to create.</td>
|
||||||
|
<td>since 1.0</td>
|
||||||
<td>Yes</td>
|
<td>Yes</td>
|
||||||
<td>
|
<td>${basedir}/build.xml</td>
|
||||||
Sets the name of the ant buildfile to create.
|
|
||||||
Defaults to "build.xml". This is used by the "ant:generate-build"
|
|
||||||
goal.
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>maven.ant.use.properties</td>
|
<td>maven.ant.use.properties</td>
|
||||||
<td>Yes</td>
|
|
||||||
<td>
|
<td>
|
||||||
Starting with version 1.9 of the Maven ant plugin two lines are
|
<p>The maven plugin for ant adds two lines at the top of the generated buildfile :</p>
|
||||||
added at the top of the generated buildfile:
|
<source><property file="build.properties"/>
|
||||||
<pre>
|
<property file="${user.home}/build.properties"/></source>
|
||||||
<property file="build.properties"/>
|
<p>If you experience that your own properties are clashing with the ones used in the generated buildfile you can set this property to "false" to remove these 2 lines from the generated buildfile. Valid values are "true" or "false".</p>
|
||||||
<property file="${user.home}/build.properties"/></pre>
|
|
||||||
If you experience that your own properties are clashing with the
|
|
||||||
ones used in the generated buildfile you can set this property to
|
|
||||||
"false" to remove these 2 lines from the generated buildfile.
|
|
||||||
Valid values are "true" or "false". Defaults to "true".
|
|
||||||
</td>
|
</td>
|
||||||
|
<td>since 1.9</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
<td>true</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user