You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ag...@apache.org on 2013/04/27 21:49:51 UTC

git commit: [SUREFIRE-989] fix site generation for failsafe-plugin

Updated Branches:
  refs/heads/master 6f51572ef -> d0452c793


[SUREFIRE-989] fix site generation for failsafe-plugin


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/d0452c79
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/d0452c79
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/d0452c79

Branch: refs/heads/master
Commit: d0452c793df074008480c61ab5d97ea6286a2b23
Parents: 6f51572
Author: Andreas Gudian <ag...@apache.org>
Authored: Sat Apr 27 21:49:32 2013 +0200
Committer: Andreas Gudian <ag...@apache.org>
Committed: Sat Apr 27 21:49:32 2013 +0200

----------------------------------------------------------------------
 maven-failsafe-plugin/pom.xml                      |    7 ++
 maven-surefire-plugin/pom.xml                      |   44 +++++++++++++++
 maven-surefire-plugin/src/assembly/site-source.xml |    9 +++
 pom.xml                                            |   12 ++--
 4 files changed, 67 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d0452c79/maven-failsafe-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/maven-failsafe-plugin/pom.xml b/maven-failsafe-plugin/pom.xml
index 0dadfdf..824da8b 100644
--- a/maven-failsafe-plugin/pom.xml
+++ b/maven-failsafe-plugin/pom.xml
@@ -153,6 +153,13 @@
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-site-plugin</artifactId>
+        <configuration>
+          <siteDirectory>${project.build.directory}/source-site</siteDirectory>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-shade-plugin</artifactId>
         <executions>
           <execution>

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d0452c79/maven-surefire-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/maven-surefire-plugin/pom.xml b/maven-surefire-plugin/pom.xml
index 9022560..54d99e6 100644
--- a/maven-surefire-plugin/pom.xml
+++ b/maven-surefire-plugin/pom.xml
@@ -102,6 +102,50 @@
         </dependencies>
       </plugin>
       <plugin>
+        <artifactId>maven-site-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>prepare-site-source</id>
+            <phase>process-resources</phase>
+            <goals>
+              <goal>effective-site</goal>
+            </goals>
+            <configuration>
+              <siteDirectory>${basedir}/src/site</siteDirectory>
+              <output>${project.build.directory}/source-site/site.xml</output>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <!-- BEGIN HACK: use replacer plugin to remove the second xml processing instruction (MSITE-670).  -->
+      <!-- can be removed once maven-site-plugin 3.3 is released. -->
+      <plugin>
+        <groupId>com.google.code.maven-replacer-plugin</groupId>
+        <artifactId>replacer</artifactId>
+        <version>1.5.2</version>
+        <executions>
+           <execution>
+               <phase>prepare-package</phase>
+               <goals>
+                   <goal>replace</goal>
+               </goals>                   
+           </execution>
+        </executions>
+        <configuration>
+           <regexFlags>
+             <regexFlag>DOTALL</regexFlag>
+           </regexFlags>
+           <file>${project.build.directory}/source-site/site.xml</file>
+           <replacements>
+               <replacement>
+                   <token>(.+)&lt;\?xml [^&gt;]+&gt;(.*)</token>
+                   <value>$1$2</value>
+               </replacement>         
+           </replacements>
+        </configuration>
+      </plugin>
+      <!-- END HACK ->
+      <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
         <executions>
           <execution>

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d0452c79/maven-surefire-plugin/src/assembly/site-source.xml
----------------------------------------------------------------------
diff --git a/maven-surefire-plugin/src/assembly/site-source.xml b/maven-surefire-plugin/src/assembly/site-source.xml
index 0c563eb..ff550c5 100644
--- a/maven-surefire-plugin/src/assembly/site-source.xml
+++ b/maven-surefire-plugin/src/assembly/site-source.xml
@@ -28,6 +28,15 @@
     <fileSet>
       <useDefaultExcludes>true</useDefaultExcludes>
       <directory>${basedir}/src/site</directory>
+      <excludes>
+        <exclude>site.xml</exclude>
+      </excludes>
+      <filtered>false</filtered>
+      <outputDirectory>/</outputDirectory>
+    </fileSet>
+    <fileSet>
+      <useDefaultExcludes>true</useDefaultExcludes>
+      <directory>${project.build.directory}/source-site</directory>
       <filtered>false</filtered>
       <outputDirectory>/</outputDirectory>
     </fileSet>

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d0452c79/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 59fd5bc..677b367 100644
--- a/pom.xml
+++ b/pom.xml
@@ -316,6 +316,13 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-site-plugin</artifactId>
           <version>3.2</version>
+          <dependencies>
+            <dependency>
+              <groupId>org.apache.maven.doxia</groupId>
+              <artifactId>doxia-module-markdown</artifactId>
+              <version>1.3</version>
+            </dependency>
+          </dependencies>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
@@ -425,11 +432,6 @@
                   <artifactId>surefire-shadefire</artifactId>
                   <version>${project.version}</version>
                 </dependency -->
-                <dependency>
-                  <groupId>org.apache.maven.doxia</groupId>
-                  <artifactId>doxia-module-markdown</artifactId>
-                  <version>1.3</version>
-                </dependency>
               </dependencies>
             </plugin>
           </plugins>