You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2009/08/26 11:44:42 UTC

svn commit: r807943 - in /maven/plugins/trunk/maven-site-plugin/src/it/surefire-report: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/maven/ src/main/java/org/apache/maven/plugins/ src/main/java/...

Author: olamy
Date: Wed Aug 26 09:44:41 2009
New Revision: 807943

URL: http://svn.apache.org/viewvc?rev=807943&view=rev
Log:
add an it for surefire report generation

Added:
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/pom.xml   (with props)
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/main/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/main/java/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/main/java/org/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/main/java/org/apache/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/main/java/org/apache/maven/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/main/java/org/apache/maven/plugins/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/main/java/org/apache/maven/plugins/site/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/main/java/org/apache/maven/plugins/site/its/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/main/java/org/apache/maven/plugins/site/its/App.java   (with props)
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/test/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/test/java/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/test/java/org/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/test/java/org/apache/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/test/java/org/apache/maven/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/test/java/org/apache/maven/plugins/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/test/java/org/apache/maven/plugins/site/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/test/java/org/apache/maven/plugins/site/its/
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/test/java/org/apache/maven/plugins/site/its/AppTest.java   (with props)
    maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/verify.groovy

Added: maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/pom.xml?rev=807943&view=auto
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/pom.xml (added)
+++ maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/pom.xml Wed Aug 26 09:44:41 2009
@@ -0,0 +1,37 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.site.its</groupId>
+  <artifactId>surefire-report</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <name>surefire-report</name>
+  <url>http://maven.apache.org</url>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.2</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-site-plugin</artifactId>
+        <version>@project.version@</version>
+      </plugin>
+    </plugins>
+  </build>  
+  <reporting>
+    <excludeDefaults>true</excludeDefaults>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <version>2.4.3</version>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>

Propchange: maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/main/java/org/apache/maven/plugins/site/its/App.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/main/java/org/apache/maven/plugins/site/its/App.java?rev=807943&view=auto
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/main/java/org/apache/maven/plugins/site/its/App.java (added)
+++ maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/main/java/org/apache/maven/plugins/site/its/App.java Wed Aug 26 09:44:41 2009
@@ -0,0 +1,13 @@
+package org.apache.maven.plugins.site.its;
+
+/**
+ * Hello world!
+ *
+ */
+public class App 
+{
+    public static void main( String[] args )
+    {
+        System.out.println( "Hello World!" );
+    }
+}

Propchange: maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/main/java/org/apache/maven/plugins/site/its/App.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/main/java/org/apache/maven/plugins/site/its/App.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Revision Id

Added: maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/test/java/org/apache/maven/plugins/site/its/AppTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/test/java/org/apache/maven/plugins/site/its/AppTest.java?rev=807943&view=auto
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/test/java/org/apache/maven/plugins/site/its/AppTest.java (added)
+++ maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/test/java/org/apache/maven/plugins/site/its/AppTest.java Wed Aug 26 09:44:41 2009
@@ -0,0 +1,44 @@
+package org.apache.maven.plugins.site.its;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest 
+    extends TestCase
+{
+    /**
+     * Create the test case
+     *
+     * @param testName name of the test case
+     */
+    public AppTest( String testName )
+    {
+        super( testName );
+    }
+
+    /**
+     * @return the suite of tests being tested
+     */
+    public static Test suite()
+    {
+        return new TestSuite( AppTest.class );
+    }
+
+    /**
+     * Rigourous Test :-)
+     */
+    public void testApp()
+    {
+        assertTrue( true );
+    }
+    
+    /*
+    public void testFailed()
+    {
+        assertTrue( false );
+    } */   
+}

Propchange: maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/test/java/org/apache/maven/plugins/site/its/AppTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/src/test/java/org/apache/maven/plugins/site/its/AppTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Revision Id

Added: maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/verify.groovy?rev=807943&view=auto
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/verify.groovy (added)
+++ maven/plugins/trunk/maven-site-plugin/src/it/surefire-report/verify.groovy Wed Aug 26 09:44:41 2009
@@ -0,0 +1,31 @@
+
+/*
+ * 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/surefire-reports').exists();
+assert new File(basedir, 'target/surefire-reports/org.apache.maven.plugins.site.its.AppTest.txt').exists();
+content = new File(basedir, 'target/surefire-reports/org.apache.maven.plugins.site.its.AppTest.txt').text;
+
+assert content.contains( 'Test set: org.apache.maven.plugins.site.its.AppTest' );
+
+assert content.contains( 'Tests run: 1, Failures: 0, Errors: 0, Skipped: 0' );
+
+assert new File(basedir, 'target/site/surefire-report.html').exists();
+assert !new File(basedir, 'target/site/index.html').exists();
+
+return true;
\ No newline at end of file