You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ah...@apache.org on 2005/01/14 22:30:56 UTC

svn commit: r125210 - in maven/maven-1/plugins/trunk/ant: . src/plugin-resources/templates src/plugin-test xdocs

Author: aheritier
Date: Fri Jan 14 13:30:55 2005
New Revision: 125210

URL: http://svn.apache.org/viewcvs?view=rev&rev=125210
Log:
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
Modified:
   maven/maven-1/plugins/trunk/ant/plugin.properties
   maven/maven-1/plugins/trunk/ant/src/plugin-resources/templates/build.jelly
   maven/maven-1/plugins/trunk/ant/src/plugin-test/   (props changed)
   maven/maven-1/plugins/trunk/ant/src/plugin-test/maven.xml
   maven/maven-1/plugins/trunk/ant/xdocs/properties.xml

Modified: maven/maven-1/plugins/trunk/ant/plugin.properties
Url: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/ant/plugin.properties?view=diff&rev=125210&p1=maven/maven-1/plugins/trunk/ant/plugin.properties&r1=125209&p2=maven/maven-1/plugins/trunk/ant/plugin.properties&r2=125210
==============================================================================
--- maven/maven-1/plugins/trunk/ant/plugin.properties	(original)
+++ maven/maven-1/plugins/trunk/ant/plugin.properties	Fri Jan 14 13:30:55 2005
@@ -22,3 +22,4 @@
 # -------------------------------------------------------------------
 
 maven.ant.generatebuild.file = ${basedir}/build.xml
+maven.ant.use.properties     = true
\ No newline at end of file

Modified: maven/maven-1/plugins/trunk/ant/src/plugin-resources/templates/build.jelly
Url: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/ant/src/plugin-resources/templates/build.jelly?view=diff&rev=125210&p1=maven/maven-1/plugins/trunk/ant/src/plugin-resources/templates/build.jelly&r1=125209&p2=maven/maven-1/plugins/trunk/ant/src/plugin-resources/templates/build.jelly&r2=125210
==============================================================================
--- maven/maven-1/plugins/trunk/ant/src/plugin-resources/templates/build.jelly	(original)
+++ maven/maven-1/plugins/trunk/ant/src/plugin-resources/templates/build.jelly	Fri Jan 14 13:30:55 2005
@@ -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}"/> 
@@ -66,8 +72,6 @@
   <property name="distdir" value="dist"/>
   <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}" >

Modified: maven/maven-1/plugins/trunk/ant/src/plugin-test/maven.xml
Url: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/ant/src/plugin-test/maven.xml?view=diff&rev=125210&p1=maven/maven-1/plugins/trunk/ant/src/plugin-test/maven.xml&r1=125209&p2=maven/maven-1/plugins/trunk/ant/src/plugin-test/maven.xml&r2=125210
==============================================================================
--- maven/maven-1/plugins/trunk/ant/src/plugin-test/maven.xml	(original)
+++ maven/maven-1/plugins/trunk/ant/src/plugin-test/maven.xml	Fri Jan 14 13:30:55 2005
@@ -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 -->

Modified: maven/maven-1/plugins/trunk/ant/xdocs/properties.xml
Url: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/ant/xdocs/properties.xml?view=diff&rev=125210&p1=maven/maven-1/plugins/trunk/ant/xdocs/properties.xml&r1=125209&p2=maven/maven-1/plugins/trunk/ant/xdocs/properties.xml&r2=125210
==============================================================================
--- maven/maven-1/plugins/trunk/ant/xdocs/properties.xml	(original)
+++ maven/maven-1/plugins/trunk/ant/xdocs/properties.xml	Fri Jan 14 13:30:55 2005
@@ -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 @@
       </table>
     </section>
   </body>
-</document>
\ No newline at end of file
+</document>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org