Author: pgier
Date: Wed Jul 1 20:09:07 2009
New Revision: 790355
URL: http://svn.apache.org/viewvc?rev=790355&view=rev
Log:
Some minor improvements to the property handling and testing.
Added:
maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/goals.txt
(with props)
Modified:
maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/build.xml
maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
Modified:
maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/build.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/build.xml?rev=790355&r1=790354&r2=790355&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/build.xml
(original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/build.xml
Wed Jul 1 20:09:07 2009
@@ -3,9 +3,10 @@
<target name="test">
- <fail unless="maven.project.artifactId" message="Property not set
${project.artifactId}"/>
+ <fail unless="maven.project.artifactId" message="Property not set
${maven.project.artifactId}"/>
<fail unless="testProp1" message="Property not set ${testProp1}"/>
<fail unless="maven.dependency.junit.junit.jar.path" message="Property
not set ${maven.dependency.junit.junit.jar.path}"/>
+ <fail unless="line.separator" message="Property not set
${line.separator}"/>
</target>
Added: maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/goals.txt
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/goals.txt?rev=790355&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/goals.txt
(added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/goals.txt
Wed Jul 1 20:09:07 2009
@@ -0,0 +1 @@
+clean generate-resources
\ No newline at end of file
Propchange:
maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/goals.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/goals.txt
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified:
maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java?rev=790355&r1=790354&r2=790355&view=diff
==============================================================================
---
maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
(original)
+++
maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
Wed Jul 1 20:09:07 2009
@@ -188,6 +188,9 @@
antProject.setProperty( key, mavenProps.getProperty( key ) );
}
+ // Set the POM file as the ant.file for the tasks run directly in
Maven.
+ antProject.setProperty( "ant.file",
mavenProject.getFile().getAbsolutePath() );
+
// Add some of the common maven properties
antProject.setProperty( "maven.project.groupId",
mavenProject.getGroupId() );
antProject.setProperty( "maven.project.artifactId",
mavenProject.getArtifactId() );