You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2019/03/15 10:04:23 UTC

[kylin] branch master updated: add a copy phase for copying jacoco related jars to dev-support folder

This is an automated email from the ASF dual-hosted git repository.

shaofengshi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/master by this push:
     new 7b88a99  add a copy phase for copying jacoco related jars to dev-support folder
7b88a99 is described below

commit 7b88a99b4b77f1bb732d38a06d8b71cfe4b904df
Author: kyotoYaho <nj...@apache.org>
AuthorDate: Fri Mar 15 16:44:45 2019 +0800

    add a copy phase for copying jacoco related jars to dev-support folder
---
 dev-support/jacocoagent.jar | Bin 257327 -> 0 bytes
 kylin-it/pom.xml            |  55 +++++++++++++++++++++++++++++++++++++++++---
 pom.xml                     |   3 ++-
 3 files changed, 54 insertions(+), 4 deletions(-)

diff --git a/dev-support/jacocoagent.jar b/dev-support/jacocoagent.jar
deleted file mode 100644
index 6e70590..0000000
Binary files a/dev-support/jacocoagent.jar and /dev/null differ
diff --git a/kylin-it/pom.xml b/kylin-it/pom.xml
index eb24bff..3e9631c 100644
--- a/kylin-it/pom.xml
+++ b/kylin-it/pom.xml
@@ -374,6 +374,55 @@
                 <plugins>
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-dependency-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>copy</id>
+                                <phase>generate-test-resources</phase>
+                                <goals>
+                                    <goal>copy</goal>
+                                </goals>
+                                <configuration>
+                                    <artifactItems>
+                                        <artifactItem>
+                                            <groupId>org.jacoco</groupId>
+                                            <artifactId>org.jacoco.agent</artifactId>
+                                            <classifier>runtime</classifier>
+                                            <version>${jacoco.version}</version>
+                                            <type>jar</type>
+                                            <overWrite>true</overWrite>
+                                            <outputDirectory>${project.basedir}/..//dev-support</outputDirectory>
+                                        </artifactItem>
+                                    </artifactItems>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.jacoco</groupId>
+                        <artifactId>jacoco-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>merge</id>
+                                <goals>
+                                    <goal>merge</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <fileSets>
+                                <fileSet>
+                                    <directory>${project.basedir}</directory>
+                                    <includes>
+                                        <include>jacoco-it*.exec</include>
+                                    </includes>
+                                </fileSet>
+                            </fileSets>
+                            <destFile>${project.basedir}/..//target/jacoco-it-merged.exec</destFile>
+                        </configuration>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-failsafe-plugin</artifactId>
                         <executions>
                             <execution>
@@ -403,7 +452,7 @@
                             </systemProperties>
                             <argLine>-Xms1G -Xmx2G -XX:PermSize=128M -XX:MaxPermSize=512M
                                 -Dkylin.server.cluster-servers=localhost:7070
-                                -javaagent:${project.basedir}/..//dev-support/jacocoagent.jar=includes=org.apache.kylin.*,output=file,destfile=jacoco-it.exec
+                                -javaagent:${project.basedir}/..//dev-support/org.jacoco.agent-${jacoco.version}-runtime.jar=includes=org.apache.kylin.*,output=file,destfile=jacoco-it.exec
                             </argLine>
                         </configuration>
                     </plugin>
@@ -432,7 +481,7 @@
                                             -Dlog4j.configuration=file:${project.basedir}/..//build/conf/kylin-tools-log4j.properties
                                         </argument>
                                         <argument>
-                                            -javaagent:${project.basedir}/..//dev-support/jacocoagent.jar=includes=org.apache.kylin.*,output=file,destfile=jacoco-it-engine.exec
+                                            -javaagent:${project.basedir}/..//dev-support/org.jacoco.agent-${jacoco.version}-runtime.jar=includes=org.apache.kylin.*,output=file,destfile=jacoco-it-engine.exec
                                         </argument>
                                         <argument>-classpath</argument>
                                         <classpath />
@@ -462,7 +511,7 @@
                                             -Dlog4j.configuration=file:${project.basedir}/..//build/conf/kylin-tools-log4j.properties
                                         </argument>
                                         <argument>
-                                            -javaagent:${project.basedir}/..//dev-support/jacocoagent.jar=includes=org.apache.kylin.*,output=file,destfile=jacoco-it-stream.exec
+                                            -javaagent:${project.basedir}/..//dev-support/org.jacoco.agent-${jacoco.version}-runtime.jar=includes=org.apache.kylin.*,output=file,destfile=jacoco-it-stream.exec
                                         </argument>
                                         <argument>-classpath</argument>
                                         <classpath />
diff --git a/pom.xml b/pom.xml
index 573786f..af41068 100644
--- a/pom.xml
+++ b/pom.xml
@@ -138,6 +138,7 @@
     <forbiddenapis.version>2.3</forbiddenapis.version>
 
     <!-- Sonar -->
+    <jacoco.version>0.8.0</jacoco.version>
     <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
     <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
     <sonar.jacoco.reportPaths>${project.basedir}/../target/jacoco.exec</sonar.jacoco.reportPaths>
@@ -1139,7 +1140,7 @@
         <plugin>
           <groupId>org.jacoco</groupId>
           <artifactId>jacoco-maven-plugin</artifactId>
-          <version>0.8.0</version>
+          <version>${jacoco.version}</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>