maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r639969 - in /maven/plugins/trunk/maven-ant-plugin: pom.xml src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java src/test/java/org/apache/maven/plugin/ant/stubs/AbstractAntTestMavenProjectStub.java
Date Sat, 22 Mar 2008 10:10:43 GMT
Author: bentmann
Date: Sat Mar 22 03:10:41 2008
New Revision: 639969

URL: http://svn.apache.org/viewvc?rev=639969&view=rev
Log:
[MANT-38] Use reporting output directory configured in POM

Modified:
    maven/plugins/trunk/maven-ant-plugin/pom.xml
    maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java
    maven/plugins/trunk/maven-ant-plugin/src/test/java/org/apache/maven/plugin/ant/stubs/AbstractAntTestMavenProjectStub.java

Modified: maven/plugins/trunk/maven-ant-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/pom.xml?rev=639969&r1=639968&r2=639969&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-ant-plugin/pom.xml Sat Mar 22 03:10:41 2008
@@ -90,7 +90,7 @@
     <dependency>
       <groupId>org.apache.maven.shared</groupId>
       <artifactId>maven-plugin-testing-harness</artifactId>
-      <version>1.0-beta-1</version>
+      <version>1.1</version>
       <scope>test</scope>
     </dependency>
     <dependency>

Modified: maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java?rev=639969&r1=639968&r2=639969&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java
(original)
+++ maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java
Sat Mar 22 03:10:41 2008
@@ -495,9 +495,16 @@
         writer.addAttribute( "value", "${maven.build.dir}/test-reports" );
         writer.endElement(); // property
 
+        String reportingOutputDir = project.getReporting().getOutputDirectory();
+        // workaround for MNG-3475
+        if ( !new File( reportingOutputDir ).isAbsolute() )
+        {
+            reportingOutputDir = new File( project.getBasedir(), reportingOutputDir ).getAbsolutePath();
+        }
         writer.startElement( "property" );
         writer.addAttribute( "name", "maven.reporting.outputDirectory" );
-        writer.addAttribute( "value", "${maven.build.dir}/site" );
+        writer.addAttribute( "value", "${maven.build.dir}/"
+            + PathUtils.toRelative( new File( project.getBuild().getDirectory() ), reportingOutputDir
) );
         writer.endElement(); // property
 
         // ----------------------------------------------------------------------

Modified: maven/plugins/trunk/maven-ant-plugin/src/test/java/org/apache/maven/plugin/ant/stubs/AbstractAntTestMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/test/java/org/apache/maven/plugin/ant/stubs/AbstractAntTestMavenProjectStub.java?rev=639969&r1=639968&r2=639969&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/test/java/org/apache/maven/plugin/ant/stubs/AbstractAntTestMavenProjectStub.java
(original)
+++ maven/plugins/trunk/maven-ant-plugin/src/test/java/org/apache/maven/plugin/ant/stubs/AbstractAntTestMavenProjectStub.java
Sat Mar 22 03:10:41 2008
@@ -96,7 +96,11 @@
 
         setBuild( build );
 
-        getModel().setReporting( new Reporting() );
+        Reporting reporting = new Reporting();
+
+        reporting.setOutputDirectory( getBasedir().getAbsolutePath() + "/target/site" );
+
+        getModel().setReporting( reporting );
     }
 
     /**



Mime
View raw message