You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by vs...@apache.org on 2007/09/29 16:46:30 UTC
svn commit: r580589 - in
/maven/plugins/trunk/maven-project-info-reports-plugin: pom.xml
src/test/java/org/apache/maven/report/projectinfo/DependenciesReportTest.java
Author: vsiveton
Date: Sat Sep 29 07:46:29 2007
New Revision: 580589
URL: http://svn.apache.org/viewvc?rev=580589&view=rev
Log:
o reverted of r580581 as discussed on IRC with dennis and ltheussl
Modified:
maven/plugins/trunk/maven-project-info-reports-plugin/pom.xml
maven/plugins/trunk/maven-project-info-reports-plugin/src/test/java/org/apache/maven/report/projectinfo/DependenciesReportTest.java
Modified: maven/plugins/trunk/maven-project-info-reports-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/pom.xml?rev=580589&r1=580588&r2=580589&view=diff
==============================================================================
--- maven/plugins/trunk/maven-project-info-reports-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-project-info-reports-plugin/pom.xml Sat Sep 29 07:46:29 2007
@@ -32,7 +32,7 @@
<version>2.1-SNAPSHOT</version>
<inceptionYear>2005</inceptionYear>
<prerequisites>
- <maven>2.0.6</maven>
+ <maven>2.0.4</maven>
</prerequisites>
<issueManagement>
<system>JIRA</system>
@@ -53,31 +53,36 @@
</plugins>
</build>
<dependencies>
- <!-- Maven -->
<dependency>
<groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
- <version>2.0.7</version>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>2.0.4</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
- <artifactId>maven-settings</artifactId>
- <version>2.0.7</version>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.0.4</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-api</artifactId>
- <version>2.0.7</version>
+ <artifactId>maven-settings</artifactId>
+ <version>2.0.4</version>
</dependency>
<dependency>
- <groupId>org.apache.maven.reporting</groupId>
- <artifactId>maven-reporting-api</artifactId>
- <version>2.0.8-SNAPSHOT</version>
+ <groupId>commons-validator</groupId>
+ <artifactId>commons-validator</artifactId>
+ <version>1.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ <version>2.0.4</version>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
- <version>2.1-SNAPSHOT</version>
+ <version>2.0.4</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
@@ -89,8 +94,6 @@
<artifactId>maven-dependency-tree</artifactId>
<version>1.0</version>
</dependency>
-
- <!-- wagon -->
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-provider-api</artifactId>
@@ -100,13 +103,6 @@
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>${wagon.version}</version>
- <exclusions>
- <!-- Using org.codehaus.plexus:plexus-utils instead of -->
- <exclusion>
- <groupId>plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
@@ -118,8 +114,6 @@
<artifactId>wagon-http-lightweight</artifactId>
<version>${wagon.version}</version>
</dependency>
-
- <!-- scm -->
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-api</artifactId>
@@ -155,37 +149,15 @@
<artifactId>maven-scm-provider-cvsexe</artifactId>
<version>${scm.version}</version>
</dependency>
-
- <!-- doxia -->
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-core</artifactId>
- <version>1.0-beta-1-SNAPSHOT</version>
+ <version>1.0-alpha-8</version>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-site-renderer</artifactId>
- <version>1.0-beta-1-SNAPSHOT</version>
- </dependency>
-
- <!-- other -->
- <dependency>
- <groupId>commons-validator</groupId>
- <artifactId>commons-validator</artifactId>
- <version>1.2.0</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- <version>1.4.5</version>
- </dependency>
-
- <!-- test -->
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-repository-metadata</artifactId>
- <version>2.0.7</version>
- <scope>test</scope>
+ <version>1.0-alpha-8</version>
</dependency>
<dependency>
<groupId>httpunit</groupId>
@@ -196,11 +168,16 @@
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
- <version>1.1</version>
+ <version>1.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>1.4.3</version>
<scope>test</scope>
</dependency>
</dependencies>
-
<properties>
<wagon.version>1.0-beta-2</wagon.version>
<scm.version>1.0</scm.version>
Modified: maven/plugins/trunk/maven-project-info-reports-plugin/src/test/java/org/apache/maven/report/projectinfo/DependenciesReportTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/src/test/java/org/apache/maven/report/projectinfo/DependenciesReportTest.java?rev=580589&r1=580588&r2=580589&view=diff
==============================================================================
--- maven/plugins/trunk/maven-project-info-reports-plugin/src/test/java/org/apache/maven/report/projectinfo/DependenciesReportTest.java (original)
+++ maven/plugins/trunk/maven-project-info-reports-plugin/src/test/java/org/apache/maven/report/projectinfo/DependenciesReportTest.java Sat Sep 29 07:46:29 2007
@@ -1,94 +1,92 @@
-package org.apache.maven.report.projectinfo;
-
-/*
- * 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.
- */
-
-import java.net.URL;
-
-import com.meterware.httpunit.GetMethodWebRequest;
-import com.meterware.httpunit.TextBlock;
-import com.meterware.httpunit.WebConversation;
-import com.meterware.httpunit.WebRequest;
-import com.meterware.httpunit.WebResponse;
-import com.meterware.httpunit.WebTable;
-
-/**
- * @author Edwin Punzalan
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id: $
- */
-public class DependenciesReportTest
- extends AbstractProjectInfoTestCase
-{
- /**
- * WebConversation object
- */
- private static final WebConversation webConversation = new WebConversation();
-
- /**
- * Test report
- *
- * @throws Exception if any
- */
- public void testReport()
- throws Exception
- {
- generateReport( "dependencies", "dependencies-plugin-config.xml" );
- assertTrue( "Test html generated", getGeneratedReport( "dependencies.html" ).exists() );
-
- URL reportURL = getGeneratedReport( "dependencies.html" ).toURL();
- assertNotNull( reportURL );
-
- // HTTPUnit
- WebRequest request = new GetMethodWebRequest( reportURL.toString() );
- WebResponse response = webConversation.getResponse( request );
-
- // Basic HTML tests
- assertTrue( response.isHTML() );
- assertTrue( response.getContentLength() > 0 );
-
- // Test the Page title
- assertEquals( getString( "report.dependencies.name" ) + " - " + getString( "report.dependencies.title" ),
- response.getTitle() );
-
- // Test the tables
- WebTable[] webTables = response.getTables();
- assertEquals( webTables.length, 2 );
-
- assertEquals( webTables[0].getColumnCount(), 6 );
- assertEquals( webTables[0].getRowCount(), 1 + getTestMavenProject().getDependencies().size() );
-
- assertEquals( webTables[1].getColumnCount(), 6 );
-
- // Test the texts
- TextBlock[] textBlocks = response.getTextBlocks();
- assertEquals( textBlocks[0].getText(), getString( "report.dependencies.title" ) );
- assertEquals( textBlocks[1].getText(), "test" );
- assertEquals( textBlocks[2].getText(), getString( "report.dependencies.intro.test" ) );
- assertEquals( textBlocks[3].getText(), getString( "report.transitivedependencies.title" ) );
- assertEquals( textBlocks[4].getText(), getString( "report.transitivedependencies.intro" ) );
- assertEquals( textBlocks[5].getText(), "test" );
- assertEquals( textBlocks[6].getText(), getString( "report.dependencies.intro.test" ) );
- assertEquals( textBlocks[7].getText(), getString( "report.dependencies.graph.title" ) );
- assertEquals( textBlocks[8].getText(), getString( "report.dependencies.graph.tree.title" ) );
- assertEquals( textBlocks[10].getText(), "" );
- assertEquals( textBlocks[11].getText(), "" );
- assertEquals( textBlocks[12].getText(), getString( "report.dependencies.graph.tables.title" ) );
- }
-}
+package org.apache.maven.report.projectinfo;
+
+/*
+ * 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.
+ */
+
+import java.net.URL;
+
+import com.meterware.httpunit.GetMethodWebRequest;
+import com.meterware.httpunit.TextBlock;
+import com.meterware.httpunit.WebConversation;
+import com.meterware.httpunit.WebRequest;
+import com.meterware.httpunit.WebResponse;
+import com.meterware.httpunit.WebTable;
+
+/**
+ * @author Edwin Punzalan
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id $
+ */
+public class DependenciesReportTest
+ extends AbstractProjectInfoTestCase
+{
+ /**
+ * WebConversation object
+ */
+ private static final WebConversation webConversation = new WebConversation();
+
+ /**
+ * Test report
+ *
+ * @throws Exception if any
+ */
+ public void testReport()
+ throws Exception
+ {
+ generateReport( "dependencies", "dependencies-plugin-config.xml" );
+ assertTrue( "Test html generated", getGeneratedReport( "dependencies.html" ).exists() );
+
+ URL reportURL = getGeneratedReport( "dependencies.html" ).toURL();
+ assertNotNull( reportURL );
+
+ // HTTPUnit
+ WebRequest request = new GetMethodWebRequest( reportURL.toString() );
+ WebResponse response = webConversation.getResponse( request );
+
+ // Basic HTML tests
+ assertTrue( response.isHTML() );
+ assertTrue( response.getContentLength() > 0 );
+
+ // Test the Page title
+ assertEquals( getString( "report.dependencies.name" ) + " - " + getString( "report.dependencies.title" ),
+ response.getTitle() );
+
+ // Test the tables
+ WebTable[] webTables = response.getTables();
+ assertEquals( webTables.length, 2 );
+
+ assertEquals( webTables[0].getColumnCount(), 6 );
+ assertEquals( webTables[0].getRowCount(), 1 + getTestMavenProject().getDependencies().size() );
+
+ assertEquals( webTables[1].getColumnCount(), 6 );
+
+ // Test the texts
+ TextBlock[] textBlocks = response.getTextBlocks();
+ assertEquals( textBlocks[0].getText(), getString( "report.dependencies.title" ) );
+ assertEquals( textBlocks[1].getText(), "test" );
+ assertEquals( textBlocks[2].getText(), getString( "report.dependencies.intro.test" ) );
+ assertEquals( textBlocks[3].getText(), getString( "report.transitivedependencies.title" ) );
+ assertEquals( textBlocks[4].getText(), getString( "report.transitivedependencies.intro" ) );
+ assertEquals( textBlocks[5].getText(), "test" );
+ assertEquals( textBlocks[6].getText(), getString( "report.dependencies.intro.test" ) );
+ assertEquals( textBlocks[7].getText(), getString( "report.dependencies.graph.title" ) );
+ assertEquals( textBlocks[8].getText(), getString( "report.dependencies.graph.tree.title" ) );
+ assertEquals( textBlocks[10].getText(), getString( "report.dependencies.graph.tables.title" ) );
+ }
+}