Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-5092] Add maven profile with code coverage report generation #2836

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion flink-connectors/flink-connector-cassandra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ under the License.
<properties>
<cassandra.version>2.2.5</cassandra.version>
<driver.version>3.0.0</driver.version>
<argLine>-Xms256m -Xmx2800m -XX:-UseGCOverheadLimit</argLine>
</properties>

<build>
Expand All @@ -49,7 +50,9 @@ under the License.
<configuration>
<reuseForks>true</reuseForks>
<forkCount>1</forkCount>
<argLine>-Xms256m -Xmx2800m -Dmvn.forkNumber=${surefire.forkNumber} -XX:-UseGCOverheadLimit</argLine>
<systemPropertyVariables>
<mvn.forkNumber>0${surefire.forkNumber}</mvn.forkNumber>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
Expand All @@ -65,6 +68,7 @@ under the License.
<goal>shade</goal>
</goals>
<configuration combine.self="override">
<shadedArtifactAttached>${shade.shadedArtifactAttached}</shadedArtifactAttached>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't we define this in the parent pom globally for all shade plugin instances?

<dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<artifactSet>
<includes>
Expand Down
5 changes: 4 additions & 1 deletion flink-connectors/flink-connector-kafka-0.10/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ under the License.
<!-- Allow users to pass custom connector versions -->
<properties>
<kafka.version>0.10.0.1</kafka.version>
<argLine>-Xms256m -Xmx1000m -Dlog4j.configuration=${log4j.configuration} -XX:-UseGCOverheadLimit</argLine>
</properties>

<dependencies>
Expand Down Expand Up @@ -196,7 +197,9 @@ under the License.
<configuration>
<!-- Enforce single fork execution due to heavy mini cluster use in the tests -->
<forkCount>1</forkCount>
<argLine>-Xms256m -Xmx1000m -Dlog4j.configuration=${log4j.configuration} -Dmvn.forkNumber=${surefire.forkNumber} -XX:-UseGCOverheadLimit</argLine>
<systemPropertyVariables>
<mvn.forkNumber>0${surefire.forkNumber}</mvn.forkNumber>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
Expand Down
1 change: 1 addition & 0 deletions flink-connectors/flink-connector-kafka-0.8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ under the License.
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>${shade.shadedArtifactAttached}</shadedArtifactAttached>
<artifactSet>
<includes combine.children="append">
<include>org.apache.flink:flink-shaded-curator-recipes</include>
Expand Down
5 changes: 4 additions & 1 deletion flink-connectors/flink-connector-kafka-0.9/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ under the License.
<!-- Allow users to pass custom connector versions -->
<properties>
<kafka.version>0.9.0.1</kafka.version>
<argLine>-Xms256m -Xmx1000m -Dlog4j.configuration=${log4j.configuration} -XX:-UseGCOverheadLimit</argLine>
</properties>

<dependencies>
Expand Down Expand Up @@ -192,7 +193,9 @@ under the License.
<configuration>
<!-- Enforce single fork execution due to heavy mini cluster use in the tests -->
<forkCount>1</forkCount>
<argLine>-Xms256m -Xmx1000m -Dlog4j.configuration=${log4j.configuration} -Dmvn.forkNumber=${surefire.forkNumber} -XX:-UseGCOverheadLimit</argLine>
<systemPropertyVariables>
<mvn.forkNumber>0${surefire.forkNumber}</mvn.forkNumber>
</systemPropertyVariables>
</configuration>
</plugin>
<!--
Expand Down
1 change: 1 addition & 0 deletions flink-connectors/flink-connector-kinesis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ under the License.
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>${shade.shadedArtifactAttached}</shadedArtifactAttached>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<artifactSet combine.children="append">
<includes>
Expand Down
1 change: 1 addition & 0 deletions flink-connectors/flink-connector-twitter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ under the License.
<execution>
<id>shade-flink</id>
<configuration>
<shadedArtifactAttached>${shade.shadedArtifactAttached}</shadedArtifactAttached>
<artifactSet>
<includes combine.children="append">
<!-- We include all dependencies that transitively depend on guava -->
Expand Down
1 change: 0 additions & 1 deletion flink-contrib/flink-storm-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ under the License.
</goals>
<configuration>
<finalName>WordCount-StormTopology</finalName>

<artifactSet>
<includes>
<include>org.apache.storm:storm-core</include>
Expand Down
12 changes: 12 additions & 0 deletions flink-contrib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,16 @@ under the License.
<module>flink-connector-wikiedits</module>
<module>flink-statebackend-rocksdb</module>
</modules>
<profiles>
<profile>
<id>coverage</id>
<modules>
<module>flink-storm</module>
<module>flink-streaming-contrib</module>
<module>flink-tweet-inputformat</module>
<module>flink-connector-wikiedits</module>
<module>flink-statebackend-rocksdb</module>
</modules>
</profile>
</profiles>
</project>
2 changes: 1 addition & 1 deletion flink-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ under the License.
</goals>
<configuration combine.self="override">
<createDependencyReducedPom>false</createDependencyReducedPom>
<shadedArtifactAttached>false</shadedArtifactAttached>
<shadedArtifactAttached>${shade.shadedArtifactAttached}</shadedArtifactAttached>
<finalName>${project.artifactId}-${project.version}</finalName>
<filters>
<!-- Globally exclude log4j.properties from our JAR files. -->
Expand Down
2 changes: 0 additions & 2 deletions flink-examples/flink-examples-streaming/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ under the License.
</goals>
<configuration>
<shadeTestJar>false</shadeTestJar>
<shadedArtifactAttached>false</shadedArtifactAttached>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
Expand Down Expand Up @@ -537,7 +536,6 @@ under the License.
</goals>
<configuration>
<shadeTestJar>false</shadeTestJar>
<shadedArtifactAttached>false</shadedArtifactAttached>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
Expand Down
8 changes: 8 additions & 0 deletions flink-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,12 @@ under the License.
<module>flink-examples-batch</module>
<module>flink-examples-streaming</module>
</modules>
<profiles>
<profile>
<id>coverage</id>
<modules>
<module>flink-examples-batch</module>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are the streaming examples not in the module list?

</modules>
</profile>
</profiles>
</project>
1 change: 1 addition & 0 deletions flink-libraries/flink-table/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ under the License.
<execution>
<id>shade-flink</id>
<configuration>
<shadedArtifactAttached>${shade.shadedArtifactAttached}</shadedArtifactAttached>
<filters>
<filter>
<excludes>
Expand Down
1 change: 1 addition & 0 deletions flink-mesos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ under the License.
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>${shade.shadedArtifactAttached}</shadedArtifactAttached>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<artifactSet>
<includes combine.children="append">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ under the License.
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>${shade.shadedArtifactAttached}</shadedArtifactAttached>
<artifactSet>
<excludes combine.self="override"></excludes>
</artifactSet>
Expand Down
1 change: 1 addition & 0 deletions flink-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ under the License.
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>${shade.shadedArtifactAttached}</shadedArtifactAttached>
<artifactSet>
<includes combine.children="append">
<include>org.apache.flink:flink-shaded-curator-recipes</include>
Expand Down
1 change: 1 addition & 0 deletions flink-shaded-curator/flink-shaded-curator-recipes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ under the License.
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>${shade.shadedArtifactAttached}</shadedArtifactAttached>
<artifactSet combine.self="override">
<includes>
<include>com.google.guava:*</include>
Expand Down
1 change: 1 addition & 0 deletions flink-shaded-curator/flink-shaded-curator-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>${shade.shadedArtifactAttached}</shadedArtifactAttached>
<artifactSet combine.self="override">
<excludes>
<exclude>log4j</exclude>
Expand Down
2 changes: 1 addition & 1 deletion flink-shaded-hadoop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ under the License.
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>false</shadedArtifactAttached>
<shadedArtifactAttached>${shade.shadedArtifactAttached}</shadedArtifactAttached>
<createDependencyReducedPom>true</createDependencyReducedPom>
<dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
Expand Down