See below...

[EMAIL PROTECTED] wrote:
Author: bentmann
Date: Sat Aug  9 09:38:56 2008
New Revision: 684290

URL: http://svn.apache.org/viewvc?rev=684290&view=rev
Log:
o Added basic IT for smoke testing

Added:
    maven/plugins/trunk/maven-project-info-reports-plugin/src/it/
    maven/plugins/trunk/maven-project-info-reports-plugin/src/it/minimal-pom/
    
maven/plugins/trunk/maven-project-info-reports-plugin/src/it/minimal-pom/pom.xml
   (with props)
    
maven/plugins/trunk/maven-project-info-reports-plugin/src/it/minimal-pom/verify.bsh
   (with props)
    maven/plugins/trunk/maven-project-info-reports-plugin/src/it/settings.xml   
(with props)
Modified:
    maven/plugins/trunk/maven-project-info-reports-plugin/pom.xml

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=684290&r1=684289&r2=684290&view=diff
==============================================================================
--- maven/plugins/trunk/maven-project-info-reports-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-project-info-reports-plugin/pom.xml Sat Aug  9 
09:38:56 2008
@@ -523,5 +523,41 @@
         </plugins>
       </reporting>
     </profile>
+    <profile>
+      <id>run-its</id>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-invoker-plugin</artifactId>
+            <configuration>
+              <debug>true</debug>
+              <projectsDirectory>src/it</projectsDirectory>
+              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+              <pomIncludes>
+                <pomInclude>**/pom.xml</pomInclude>
+              </pomIncludes>
+              <pomExcludes>
+                <pomExclude>pom.xml</pomExclude>
+              </pomExcludes>
+              <postBuildHookScript>verify.bsh</postBuildHookScript>
+              
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              <settingsFile>src/it/settings.xml</settingsFile>
+              <goals>
+                <goal>site</goal>
+              </goals>
+            </configuration>
+            <executions>
+              <execution>
+                <id>integration-test</id>
+                <goals>
+                  <goal>install</goal>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
   </profiles>
 </project>

Added: 
maven/plugins/trunk/maven-project-info-reports-plugin/src/it/minimal-pom/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/src/it/minimal-pom/pom.xml?rev=684290&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-project-info-reports-plugin/src/it/minimal-pom/pom.xml
 (added)
+++ 
maven/plugins/trunk/maven-project-info-reports-plugin/src/it/minimal-pom/pom.xml
 Sat Aug  9 09:38:56 2008
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<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.project-info-reports</groupId>
+  <artifactId>minimal</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>minimal-pom</packaging>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-site-plugin</artifactId>
+        <version>2.0-beta-7</version>
+      </plugin>
+    </plugins>
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-project-info-reports-plugin</artifactId>
+        <version>@pom.version@</version>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>

Propchange: 
maven/plugins/trunk/maven-project-info-reports-plugin/src/it/minimal-pom/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-project-info-reports-plugin/src/it/minimal-pom/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-project-info-reports-plugin/src/it/minimal-pom/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/src/it/minimal-pom/verify.bsh?rev=684290&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-project-info-reports-plugin/src/it/minimal-pom/verify.bsh
 (added)
+++ 
maven/plugins/trunk/maven-project-info-reports-plugin/src/it/minimal-pom/verify.bsh
 Sat Aug  9 09:38:56 2008
@@ -0,0 +1,43 @@
+import java.io.*;
+import java.util.*;
+import java.util.regex.*;
+
+try
+{
+    File siteDir = new File( basedir, "target/site" );
+    if ( !siteDir.isDirectory() )
+    {
+        System.out.println( "Site directory not existent: " + siteDir );
+        return false;
+    }
+
+ String[] reports = { "dependencies", + "index", + "integration", + "issue-tracking", + "license", + "mail-lists", + "plugin-management", + "plugins", + "project-info", + "project-summary", + "source-repository", + "team-list"
+                       };


This is a Java 5 enhanced for loop, isn't it?

+    for ( String report : reports )
+    {
+        File reportFile = new File( siteDir, report + ".html" );
+        if ( !reportFile.isFile() )
+        {
+            System.out.println( "Report file not existent: " + reportFile );
+            return false;
+        }
+    }
+}
+catch( Throwable t )
+{
+    t.printStackTrace();
+    return false;
+}
+
+return true;

Propchange: 
maven/plugins/trunk/maven-project-info-reports-plugin/src/it/minimal-pom/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-project-info-reports-plugin/src/it/minimal-pom/verify.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-project-info-reports-plugin/src/it/settings.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/src/it/settings.xml?rev=684290&view=auto
==============================================================================
--- maven/plugins/trunk/maven-project-info-reports-plugin/src/it/settings.xml 
(added)
+++ maven/plugins/trunk/maven-project-info-reports-plugin/src/it/settings.xml 
Sat Aug  9 09:38:56 2008
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<settings>
+  <profiles>
+    <profile>
+      <id>it-repo</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <repositories>
+        <repository>
+          <id>local.central</id>
+          <url>file://@localRepository@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+      <pluginRepositories>
+        <pluginRepository>
+          <id>local.central</id>
+          <url>file://@localRepository@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+  </profiles>
+</settings>

Propchange: 
maven/plugins/trunk/maven-project-info-reports-plugin/src/it/settings.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-project-info-reports-plugin/src/it/settings.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision





--
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to