MPANT-20 :
- Use the property maven.ant.use.properties to define if build.properties files must be loaded.
- Allow to load ${user.home}/build.properties
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@125210 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
b2d872ac22
commit
3f88c82539
4 files changed
+11
-9
No files matched your search
@@ -22,3 +22,4 @@
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
maven.ant.generatebuild.file = ${basedir}/build.xml
|
||||
maven.ant.use.properties = true
|
||||
@@ -42,6 +42,12 @@
|
||||
|
||||
<project name="${pom.artifactId}" default="jar" basedir=".">
|
||||
|
||||
<j:if test="${maven.ant.use.properties}">
|
||||
<!-- Load local and user build preferences -->
|
||||
<property file="build.properties"/>
|
||||
<property file="$${user.home}/build.properties"/>
|
||||
</j:if>
|
||||
|
||||
<j:set var="baseDirFile" value="${pom.file.canonicalFile.parentFile}"/>
|
||||
<maven:makeRelativePath basedir="${baseDirFile}" path="${maven.build.dir}" separator="/" var="defaulttargetdir"/>
|
||||
<property name="defaulttargetdir" value="${defaulttargetdir}"/>
|
||||
@@ -67,8 +73,6 @@
|
||||
<property name="javadocdir" value="dist/docs/api"/>
|
||||
<property name="final.name" value="${maven.final.name}"/>
|
||||
|
||||
<property file="build.properties"/>
|
||||
|
||||
<path id="build.classpath">
|
||||
<fileset dir="$${libdir}" >
|
||||
<include name="**/*.jar"/>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<u:file name="${basedir}/build.xml" var="buildFile"/>
|
||||
<x:parse var="buildXml" xml="${buildFile.toURL()}"/>
|
||||
<x:set var="properties" select="$buildXml/project/property"/>
|
||||
<j:set var="defaulttargetdirName" value="${properties[0].attribute('name').value}"/>
|
||||
<j:set var="defaulttargetdirValue" value="${properties[0].attribute('value').value}"/>
|
||||
<j:set var="defaulttargetdirName" value="${properties[2].attribute('name').value}"/>
|
||||
<j:set var="defaulttargetdirValue" value="${properties[2].attribute('value').value}"/>
|
||||
<assert:assertEquals expected="defaulttargetdir" value="${defaulttargetdirName}" msg="first target is not defaulttargetdir"/>
|
||||
<assert:assertEquals expected="target" value="${defaulttargetdirValue}" msg="defaulttargetdir property is not relative"/>
|
||||
<!-- check obey jar override -->
|
||||
|
||||
@@ -16,14 +16,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<document>
|
||||
|
||||
<properties>
|
||||
<title>Maven Ant Plugin Properties</title>
|
||||
<author email="dion@multitask.com.au">dIon Gillard</author>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
<section name="Maven Ant Plugin Settings">
|
||||
<table>
|
||||
@@ -42,7 +39,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<source>
|
||||
<source>
|
||||
maven.ant.excludeTests=**/*Test.java,**/*Suite.java
|
||||
</source>
|
||||
</td>
|
||||
@@ -59,4 +56,4 @@ maven.ant.excludeTests=**/*Test.java,**/*Suite.java
|
||||
</table>
|
||||
</section>
|
||||
</body>
|
||||
</document>
|
||||
</document>
|
||||
Reference in new issue
Block a user