fix it for maven 3

git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@811698 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index a5e397f..abba075 100644
--- a/pom.xml
+++ b/pom.xml
@@ -131,6 +131,7 @@
     <maven-scm.version>1.2</maven-scm.version>
     <doxiaVersion>1.0</doxiaVersion>
     <mavenVersion>2.0.6</mavenVersion>
+    <sitePluginVersion>2.0.1</sitePluginVersion>    
   </properties>
 
   <dependencies>
@@ -308,17 +309,16 @@
             <artifactId>maven-invoker-plugin</artifactId>
             <version>1.3</version>
             <configuration>
-              <debug>true</debug>
               <projectsDirectory>src/it</projectsDirectory>
               <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
               <pomIncludes>
                 <pomInclude>*/pom.xml</pomInclude>
               </pomIncludes>
-              <preBuildHookScript>setup</preBuildHookScript>
               <postBuildHookScript>verify</postBuildHookScript>
               <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
               <settingsFile>src/it/settings.xml</settingsFile>
               <goals>
+                <goal>clean</goal>
                 <goal>site</goal>
               </goals>
             </configuration>
@@ -335,6 +335,20 @@
         </plugins>
       </build>
     </profile>
+
+    <profile>
+      <id>maven-3</id>
+      <activation>
+        <file>
+          <!-- This employs that the basedir expression is only recognized by Maven 3.x (see MNG-2363) -->
+          <exists>${basedir}</exists>
+        </file>
+      </activation>
+      <properties>
+        <sitePluginVersion>3.0-beta-1-SNAPSHOT</sitePluginVersion>
+      </properties>
+    </profile>     
+
     <profile>
       <id>reporting</id>
       <reporting>
@@ -351,5 +365,6 @@
         </plugins>
       </reporting>
     </profile>
+
   </profiles>
 </project>
diff --git a/src/it/minimal-pom-output-encoding/pom.xml b/src/it/minimal-pom-output-encoding/pom.xml
index 012fa63..c80fac7 100644
--- a/src/it/minimal-pom-output-encoding/pom.xml
+++ b/src/it/minimal-pom-output-encoding/pom.xml
@@ -45,7 +45,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-site-plugin</artifactId>
-        <version>2.0</version>
+        <version>@sitePluginVersion@</version>
       </plugin>
     </plugins>
   </build>
diff --git a/src/it/minimal-pom/pom.xml b/src/it/minimal-pom/pom.xml
index f7b8e0a..71901ce 100644
--- a/src/it/minimal-pom/pom.xml
+++ b/src/it/minimal-pom/pom.xml
@@ -45,7 +45,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-site-plugin</artifactId>
-        <version>2.0</version>
+        <version>@sitePluginVersion@</version>
       </plugin>
     </plugins>
   </build>
diff --git a/src/it/settings.xml b/src/it/settings.xml
index 698a049..7246995 100644
--- a/src/it/settings.xml
+++ b/src/it/settings.xml
@@ -60,6 +60,17 @@
             <enabled>true</enabled>
           </snapshots>
         </pluginRepository>
+        <pluginRepository>
+          <id>apache.snapshots</id>
+          <name>Apache Snapshot Repository</name>
+          <url>http://repository.apache.org/content/groups/snapshots/</url>
+          <releases>
+            <enabled>false</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </pluginRepository>        
       </pluginRepositories>
     </profile>
   </profiles>