o Added basic integration test
git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@684860 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index e0c7f34..ba1f44c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -245,20 +245,27 @@
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
+ <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>
+ <preBuildHookScript>setup.bsh</preBuildHookScript>
+ <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>
- <phase>integration-test</phase>
- <configuration>
- <tasks>
- <echo/><echo/><echo/><echo/><echo/>
- <echo level="warning">NO INTEGRATION TESTS DEFINED</echo>
- <echo/><echo/><echo/><echo/><echo/>
- </tasks>
- </configuration>
<goals>
+ <goal>install</goal>
<goal>run</goal>
</goals>
</execution>
diff --git a/src/it/minimal-pom/pom.xml b/src/it/minimal-pom/pom.xml
new file mode 100644
index 0000000..67c9de9
--- /dev/null
+++ b/src/it/minimal-pom/pom.xml
@@ -0,0 +1,62 @@
+<?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.changelog</groupId>
+ <artifactId>minimal-pom</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <url>http://maven.apache.org/</url>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-changelog-plugin/</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-changelog-plugin/</developerConnection>
+ <url>http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changelog-plugin/</url>
+ </scm>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <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-changelog-plugin</artifactId>
+ <version>@pom.version@</version>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
diff --git a/src/it/minimal-pom/verify.bsh b/src/it/minimal-pom/verify.bsh
new file mode 100644
index 0000000..d02cdf5
--- /dev/null
+++ b/src/it/minimal-pom/verify.bsh
@@ -0,0 +1,33 @@
+import java.io.*;
+import java.util.*;
+import java.util.regex.*;
+
+try
+{
+ File siteDir = new File( basedir, "target/site" );
+ System.out.println( "Checking for existence of site directory: " + siteDir );
+ if ( !siteDir.isDirectory() )
+ {
+ System.out.println( "FAILED" );
+ return false;
+ }
+
+ String[] reports = { "changelog", "dev-activity", "file-activity" };
+ for ( String report : reports )
+ {
+ File reportFile = new File( siteDir, report + ".html" );
+ System.out.println( "Checking for existence of report: " + reportFile );
+ if ( !reportFile.isFile() )
+ {
+ System.out.println( "FAILED" );
+ return false;
+ }
+ }
+}
+catch( Throwable t )
+{
+ t.printStackTrace();
+ return false;
+}
+
+return true;
diff --git a/src/it/settings.xml b/src/it/settings.xml
new file mode 100644
index 0000000..a1c1028
--- /dev/null
+++ b/src/it/settings.xml
@@ -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>