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

tweaks to make jacoco work / cleanup cobertura error spam #197

Merged
merged 1 commit into from Jan 24, 2015
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -6,4 +6,5 @@ target
*.log
dependency-reduced-pom.xml
*.imls
*.iml
.idea/
6 changes: 4 additions & 2 deletions .travis.yml
Expand Up @@ -17,10 +17,12 @@ cache:
directories:
- $HOME/.m2
install: "mvn -q clean install javadoc:aggregate -Daccumulo.version=${ACCUMULO_VERSION} -Dhadoop.version=${HADOOP_VERSION} -Dgeotools.version=${GEOTOOLS_VERSION} -Dgeoserver.version=${GEOSERVER_VERSION} -DskipITs=true -DskipTests=true"
script: "mvn -q verify cobertura:cobertura -Daccumulo.version=${ACCUMULO_VERSION} -Dhadoop.version=${HADOOP_VERSION} -Dgeotools.version=${GEOTOOLS_VERSION} -Dgeoserver.version=${GEOSERVER_VERSION}"
script: "mvn -q verify -Daccumulo.version=${ACCUMULO_VERSION} -Dhadoop.version=${HADOOP_VERSION} -Dgeotools.version=${GEOTOOLS_VERSION} -Dgeoserver.version=${GEOSERVER_VERSION}"
before_install:
- export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=192m"
- chmod +x .utility/push-javadoc-to-gh-pages.sh
- mkdir mcp; cd mcp; git clone --branch=maven-munge-hack git://github.com/chrisbennight/coveralls-maven-plugin.git; cd coveralls-maven-plugin; git submodule init; git submodule update; mvn -q clean install; cd ../..;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The combination of munge + jacoco multi-module aggregation was breaking. Strangely only on the travis-ci build slaves, not on win 8.1 or ubuntu 14.04 LTS or OS X 10.10. I patched a version of the coveralls-maven-plugin to not error out on this (and print out the messages to the log) - we are loosing coverage on one file (GeowaveInputFormat); I think as soon as Accumulo releases 1.7 and we can deprecate 1.5 we can get rid of the munge support and this issue will go away.

This fix I made isn't really appropriate to issue a pull request on, and isn't needed to build generally, just for travis to develop code coverage reports, so I figure just leave it until munge does - then this line can die as well.

after_success:
- .utility/push-javadoc-to-gh-pages.sh
- mvn coveralls:report
- mvn coveralls:report -Daccumulo.version=${ACCUMULO_VERSION} -Dhadoop.version=${HADOOP_VERSION} -Dgeotools.version=${GEOTOOLS_VERSION} -Dgeoserver.version=${GEOSERVER_VERSION}

5 changes: 2 additions & 3 deletions geowave-test/pom.xml
Expand Up @@ -50,6 +50,7 @@
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand Down Expand Up @@ -91,7 +92,7 @@
<type>war</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/geoserver</outputDirectory>
<excludes>**/commons-dbcp-1.4.jar,**/*1.7-SNAPSHOT.jar,**/*2.7-SNAPSHOT.jar,**/*20140915*.jar,**/*13-SNAPSHOT.jar</excludes>
<excludes>**/commons-dbcp-1.4.jar,**/*1.7-SNAPSHOT.jar,**/*2.7-SNAPSHOT.jar,**/*20140915*.jar,**/*13-SNAPSHOT.jar,**/slf4j*.jar</excludes>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to add ,*/slf4j.jar to the exclusions list here as older versions of geoserver were bringing in an older version that conflicted with some hadoop dependencies

</artifactItem>
</artifactItems>
</configuration>
Expand Down Expand Up @@ -168,8 +169,6 @@
thinking they are surefire reports -->
<reportsDirectory>${sonar.surefire.reportsPath}</reportsDirectory>
<argLine>${test.args} ${jacoco.failsafe.argline}</argLine>
<runOrder>reversealphabetical</runOrder>

<excludes>
<exclude>**/*IT.java</exclude>
</excludes>
Expand Down
34 changes: 18 additions & 16 deletions pom.xml
Expand Up @@ -33,12 +33,13 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<sonar.language>java</sonar.language>
<!-- Feed Sonar with the JaCoCo integration tests coverage report (that
<!-- Feed Sonar with the JaCoCo integration tests coverage report (that
you have previously generated) -->
<jacoco.it.reportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</jacoco.it.reportPath>
<jacoco.ut.reportPath>${project.build.directory}/coverage-reports/jacoco-ut.exec</jacoco.ut.reportPath>
<it.reportPath>${project.reporting.outputDirectory}/jacoco-it</it.reportPath>
<ut.reportPath>${project.reporting.outputDirectory}/jacoco-ut</ut.reportPath>
<jacoco.version>0.7.2.201409121644</jacoco.version>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
<test.args>-Xms256m -Xmx1024m -XX:MaxPermSize=256m</test.args>
Expand Down Expand Up @@ -203,7 +204,7 @@
jacoco-maven-plugin
</artifactId>
<versionRange>
[0.7.1.201405082137,)
[${jacoco.version},)
</versionRange>
<goals>
<goal>prepare-agent</goal>
Expand All @@ -223,7 +224,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.1.201405082137</version>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>pre-unit-test</id>
Expand Down Expand Up @@ -343,22 +344,23 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
<configuration>
<format>xml</format>
<maxmem>256m</maxmem>
<!-- aggregated reports for multi-module projects -->
<aggregate>true</aggregate>
<check/>
</configuration>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>3.0.1</version>
<version>3.1.0-munge-hack-SNAPSHOT</version>
<configuration>
<jacocoReports>
<jacocoReport>${project.basedir}/geowave-index/target/site/jacoco-ut/jacoco.xml</jacocoReport>
<jacocoReport>${project.basedir}/geowave-analytics/target/site/jacoco-ut/jacoco.xml</jacocoReport>
<jacocoReport>${project.basedir}/geowave-ingest/target/site/jacoco-ut/jacoco.xml</jacocoReport>
<jacocoReport>${project.basedir}/geowave-raster/target/site/jacoco-ut/jacoco.xml</jacocoReport>
<jacocoReport>${project.basedir}/geowave-store/target/site/jacoco-ut/jacoco.xml</jacocoReport>
<jacocoReport>${project.basedir}/geowave-types/target/site/jacoco-ut/jacoco.xml</jacocoReport> -
<jacocoReport>${project.basedir}/geowave-vector/target/site/jacoco-ut/jacoco.xml</jacocoReport>
<jacocoReport>${project.basedir}/geowave-accumulo/target/site/jacoco-ut/jacoco.xml</jacocoReport>
<jacocoReport>${project.basedir}/geowave-test/target/site/jacoco-it/jacoco.xml</jacocoReport>
</jacocoReports>
</configuration>
</plugin>
</plugins>
</build>
Expand Down