Adapting reporting approach to work with maven goal order 20/23920/1
authorRyan Moats <rmoats@us.ibm.com>
Wed, 8 Jul 2015 17:37:00 +0000 (12:37 -0500)
committerRyan Moats <rmoats@us.ibm.com>
Wed, 8 Jul 2015 17:37:00 +0000 (12:37 -0500)
Because maven goals are set to "clean install", that means
the top level project has to move the IT reports from the
integration test project to itself.

Change-Id: Id7c09fd020739ef335e9ca63df2c3322c22d147a
Signed-off-by: Ryan Moats <rmoats@us.ibm.com>
integration/test/pom.xml
pom.xml

index 95f21f3a8b2731c7b4cd5aed6f3d033f50160095..54337fa39158c1a1b6abcdf2a5332266f4f54651 100644 (file)
@@ -14,7 +14,7 @@
   <packaging>jar</packaging>
 
   <properties>
-    <sonar.jacoco.itReportPath>../../target/jacoco-it.exec</sonar.jacoco.itReportPath>
+    <sonar.jacoco.itReportPath>target/jacoco-it.exec</sonar.jacoco.itReportPath>
     <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
     <sonar.sources>pom.xml,target/generated-sources/dependency</sonar.sources>
   </properties>
             </goals>
             <configuration>
               <target>
-                <copy todir="${project.basedir}/../../target" flatten="true" overwrite="true">
+                <copy todir="${project.basedir}/target" flatten="true" overwrite="true">
                   <fileset dir="target/pax" casesensitive="yes">
                     <include name="**/jacoco-it.exec" />
                   </fileset>
             </goals>
             <configuration>
               <dataFile>${sonar.jacoco.itReportPath}</dataFile>
-              <outputDirectory>${project.basedir}/../../target/site/jacoco-it</outputDirectory>
+              <outputDirectory>${project.basedir}/target/site/jacoco-it</outputDirectory>
             </configuration>
           </execution>
         </executions>
diff --git a/pom.xml b/pom.xml
index c41e9530e3efd2db8a8d183479a8af5e02a3b920..b9ae51a43a5fcee8f1848adaf4a6d564d4620461 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     <module>integration/test</module>
     <module>model</module>
   </modules>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>move-it-reports</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <move todir="target/site">
+                  <fileset dir="integration/test/target/site" />
+                </move>
+                <move file="integration/test/target/jacoco-it.exec" todir="target" />
+              </target>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
   <scm>
     <connection>scm:git:ssh://git.opendaylight.org:29418/neutron.git</connection>
     <developerConnection>scm:git:ssh://git.opendaylight.org:29418/neutron.git</developerConnection>