maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r1145180 - in /maven/jxr/trunk/maven-jxr-plugin: ./ src/it/aggregate/ src/it/aggregate/p2/src/test/java/org/apache/maven/jxr/it/ src/it/aggregate/p2/src/test/java/org/apache/maven/jxr/it2/ src/main/java/org/apache/maven/plugin/jxr/
Date Mon, 11 Jul 2011 14:02:55 GMT
Author: bimargulies
Date: Mon Jul 11 14:02:55 2011
New Revision: 1145180

URL: http://svn.apache.org/viewvc?rev=1145180&view=rev
Log:
JXR-88: jxr:aggregate and jxr:test-aggregate
o add code, and test coverage, for test-aggregate
o repair NPE in test report; someone seemed to have left two copies of something in there,
and one of the two
lacked protection from an NPE case. I'm puzzled as to why this bit me, but the fix seems clear
enough.

Added:
    maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/p2/src/test/java/org/apache/maven/jxr/it2/
      - copied from r1145003, maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/p2/src/test/java/org/apache/maven/jxr/it/
    maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/verify.groovy   (with props)
    maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrTestReport.java
  (with props)
Removed:
    maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/p2/src/test/java/org/apache/maven/jxr/it/
Modified:
    maven/jxr/trunk/maven-jxr-plugin/pom.xml
    maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/p2/src/test/java/org/apache/maven/jxr/it2/AppTest.java
    maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/pom.xml
    maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrReportUtil.java
    maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrTestReport.java

Modified: maven/jxr/trunk/maven-jxr-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/jxr/trunk/maven-jxr-plugin/pom.xml?rev=1145180&r1=1145179&r2=1145180&view=diff
==============================================================================
--- maven/jxr/trunk/maven-jxr-plugin/pom.xml (original)
+++ maven/jxr/trunk/maven-jxr-plugin/pom.xml Mon Jul 11 14:02:55 2011
@@ -184,7 +184,7 @@ under the License.
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-invoker-plugin</artifactId>
-            <version>1.3</version>
+            <version>1.5</version>
             <configuration>
               <projectsDirectory>src/it</projectsDirectory>
               <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>

Modified: maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/p2/src/test/java/org/apache/maven/jxr/it2/AppTest.java
URL: http://svn.apache.org/viewvc/maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/p2/src/test/java/org/apache/maven/jxr/it2/AppTest.java?rev=1145180&r1=1145003&r2=1145180&view=diff
==============================================================================
--- maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/p2/src/test/java/org/apache/maven/jxr/it2/AppTest.java
(original)
+++ maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/p2/src/test/java/org/apache/maven/jxr/it2/AppTest.java
Mon Jul 11 14:02:55 2011
@@ -1,4 +1,4 @@
-package org.apache.maven.jxr.it;
+package org.apache.maven.jxr.it2;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one

Modified: maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/pom.xml
URL: http://svn.apache.org/viewvc/maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/pom.xml?rev=1145180&r1=1145179&r2=1145180&view=diff
==============================================================================
--- maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/pom.xml (original)
+++ maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/pom.xml Mon Jul 11 14:02:55 2011
@@ -53,7 +53,7 @@ under the License.
 	<executions>
 	  <execution>
 	    <id>aggregate</id>
-	    <goals><goal>aggregate</goal></goals>
+	    <goals><goal>aggregate</goal><goal>test-aggregate</goal></goals>
 	    <phase>site</phase>
 	  </execution>
 	</executions>
@@ -67,6 +67,7 @@ under the License.
             <id>aggregate</id>
             <goals>
               <goal>aggregate</goal>
+              <goal>test-aggregate</goal>
             </goals>
             <phase>site</phase>
           </execution>

Added: maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/verify.groovy
URL: http://svn.apache.org/viewvc/maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/verify.groovy?rev=1145180&view=auto
==============================================================================
--- maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/verify.groovy (added)
+++ maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/verify.groovy Mon Jul 11 14:02:55 2011
@@ -0,0 +1,43 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+assert new File( basedir, 'target/site' ).exists();
+
+content = new File( basedir, 'target/site/project-reports.html' ).text;
+
+assert content.contains( 'xref/index.html' );
+assert content.contains( 'xref-test/index.html' );
+
+assert new File( basedir, 'target/site/xref' ).exists();
+assert new File( basedir, 'target/site/xref/index.html' ).exists();
+assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists();
+assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it2/App.html' ).exists();
+
+assert new File( basedir, 'target/site/xref-test' ).exists();
+assert new File( basedir, 'target/site/xref-test/index.html' ).exists();
+assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it/AppTest.html' ).exists();
+assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it2/AppTest.html' ).exists();
+
+content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).text;
+assert content.contains( 'App2.html' );
+
+content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it2/App.html' ).text;
+assert content.contains( 'App2.html' );
+
+return true;
\ No newline at end of file

Propchange: maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/verify.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/jxr/trunk/maven-jxr-plugin/src/it/aggregate/verify.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrTestReport.java
URL: http://svn.apache.org/viewvc/maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrTestReport.java?rev=1145180&view=auto
==============================================================================
--- maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrTestReport.java
(added)
+++ maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrTestReport.java
Mon Jul 11 14:02:55 2011
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.maven.plugin.jxr;
+
+/**
+ * Generates a combined JXR report for test code in an aggregating project.
+ * 
+ * @goal test-aggregate
+ * @aggregator
+ * @since 2.3
+ *
+ */
+public class AggregatorJxrTestReport
+    extends JxrTestReport
+{
+    protected boolean isAggregate()
+    {
+        return true;
+    }
+
+}

Propchange: maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrTestReport.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AggregatorJxrTestReport.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrReportUtil.java
URL: http://svn.apache.org/viewvc/maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrReportUtil.java?rev=1145180&r1=1145179&r2=1145180&view=diff
==============================================================================
--- maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrReportUtil.java
(original)
+++ maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrReportUtil.java
Mon Jul 11 14:02:55 2011
@@ -57,6 +57,7 @@ public class JxrReportUtil
 
     /**
      * Determine if javadoc is aggregated in this project, paying attention to both
+     * TODO: take cognizance of javadoc versus test-javadoc
      * the old parameter and the new mojo.
      * @param project
      * @return

Modified: maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrTestReport.java
URL: http://svn.apache.org/viewvc/maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrTestReport.java?rev=1145180&r1=1145179&r2=1145180&view=diff
==============================================================================
--- maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrTestReport.java
(original)
+++ maven/jxr/trunk/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/JxrTestReport.java
Mon Jul 11 14:02:55 2011
@@ -91,11 +91,6 @@ public class JxrTestReport
     {
         List l = new ArrayList();
 
-        if ( !"pom".equals( project.getPackaging().toLowerCase() ) )
-        {
-            l.addAll( project.getExecutionProject().getTestCompileSourceRoots() );
-        }
-
         if ( project.getExecutionProject() != null )
         {
             if ( !"pom".equals( project.getExecutionProject().getPackaging().toLowerCase()
) )



Mime
View raw message