pax_global_header 0000666 0000000 0000000 00000000064 13421740370 0014513 g ustar 00root root 0000000 0000000 52 comment=6cd3f0bd8e348f8fba7bffec5225407151f1cc91
jacoco-0.8.3/ 0000775 0000000 0000000 00000000000 13421740370 0012761 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/.appveyor.yml 0000664 0000000 0000000 00000001337 13421740370 0015433 0 ustar 00root root 0000000 0000000 cache:
- C:\Users\appveyor\apache-maven-3.3.9 -> appveyor.yml
- C:\Users\appveyor\.m2 -> **\pom.xml
install:
- if not exist C:\Users\appveyor\apache-maven-3.3.9 (
curl -LsS "http://www.apache.org/dyn/closer.cgi?action=download&filename=maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip" > apache-maven-3.3.9-bin.zip &&
unzip apache-maven-3.3.9-bin.zip -d C:\Users\appveyor
)
- SET PATH=C:\Users\appveyor\apache-maven-3.3.9\bin;%PATH%
build_script:
# Maven 3.3.9 requires Java >= 7, but generation of Javadocs requires Java <= 6 (https://github.com/jacoco/jacoco/issues/110)
- mvn -V -B -e verify -Djdk.version=6 --toolchains=.travis\appveyor-toolchains.xml
artifacts:
- path: jacoco\target\*.zip
jacoco-0.8.3/.github/ 0000775 0000000 0000000 00000000000 13421740370 0014321 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/.github/ISSUE_TEMPLATE.md 0000664 0000000 0000000 00000000563 13421740370 0017032 0 ustar 00root root 0000000 0000000 This is a issue tracker. Please use our mailing list for general questions:
https://groups.google.com/forum/?fromgroups=#!forum/jacoco
Also check FAQ before opening an issue: http://www.jacoco.org/jacoco/trunk/doc/faq.html
### Steps to reproduce
JaCoCo version:
Operating system:
Tool integration: Maven/Ant/API/Other
### Expected behaviour
### Actual behaviour
jacoco-0.8.3/.gitignore 0000664 0000000 0000000 00000000201 13421740370 0014742 0 ustar 00root root 0000000 0000000 target/
.settings/
!org.jacoco.core/.settings/
!org.jacoco.core.test/.settings/
org.jacoco.agent/src/jacocoagent.jar
.idea
*.iml
jacoco-0.8.3/.travis.sh 0000775 0000000 0000000 00000005072 13421740370 0014712 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -euo pipefail
# Prevent accidental execution outside of Travis:
if [ -z "${TRAVIS+false}" ]
then
echo "TRAVIS environment variable is not set"
exit 1
fi
function jdk_switcher {
DIR=$1
if [ ! -d "$DIR" ]; then
echo "Not found: $DIR"
exit 1
fi
export JAVA_HOME="$DIR"
export JDK_HOME="${JAVA_HOME}"
export JAVAC="${JAVA_HOME}/bin/javac"
export PATH="${JAVA_HOME}/bin:${PATH}"
}
# Switch to desired JDK, download if required:
function install_jdk {
JDK_URL=$1
FILENAME="${JDK_URL##*/}"
rm -rf /tmp/jdk/$JDK
mkdir -p /tmp/jdk/$JDK
if [ ! -f "/tmp/jdk/$FILENAME" ]
then
curl -L $JDK_URL -o /tmp/jdk/$FILENAME
fi
tar -xzf /tmp/jdk/$FILENAME -C /tmp/jdk/$JDK --strip-components 1
if [ -z "${2+false}" ]
then
jdk_switcher "/tmp/jdk/$JDK"
fi
}
# Preinstalled JDKs:
ls -lA /usr/lib/jvm/
case "$JDK" in
5)
install_jdk $JDK5_URL false
;;
6 | 7 | 8)
jdk_switcher /usr/lib/jvm/java-8-oracle
;;
9)
jdk_switcher /usr/lib/jvm/java-9-oracle
;;
10)
install_jdk $JDK10_URL
;;
11)
install_jdk $JDK11_URL
;;
12-ea)
install_jdk $JDK12_EA_URL
;;
esac
# Do not use "~/.mavenrc" set by Travis (https://github.com/travis-ci/travis-ci/issues/3893),
# because it prevents execution of JaCoCo during integration tests for jacoco-maven-plugin,
# and "-XMaxPermSize" not supported by JDK 9
export MAVEN_SKIP_RC=true
# Build:
case "$JDK" in
5)
if [[ ${TRAVIS_PULL_REQUEST} == 'false' && ${TRAVIS_BRANCH} == 'master' ]]
then
# Travis does shallow clone, but SonarQube performs "git blame" and so requires full history
git fetch --unshallow
# goal "deploy:deploy" used directly instead of "deploy" phase to avoid pollution of Maven repository by "install" phase
mvn -V -B -e -f org.jacoco.build verify sonar:sonar deploy:deploy -DdeployAtEnd -Djdk.version=5 --toolchains=./.travis/toolchains.xml --settings=./.travis/settings.xml -Dsonar.host.url=${SONARQUBE_URL} -Dsonar.login=${SONARQUBE_TOKEN}
python ./.travis/trigger-site-deployment.py
else
mvn -V -B -e verify -Djdk.version=5 --toolchains=./.travis/toolchains.xml \
--settings=./.travis/settings.xml
fi
;;
6 | 7 | 8 | 9)
mvn -V -B -e verify -Djdk.version=${JDK} -Dbytecode.version=${JDK} -Decj=${ECJ:-} --toolchains=./.travis/travis-toolchains.xml \
--settings=./.travis/settings.xml
;;
10 | 11)
mvn -V -B -e verify -Dbytecode.version=${JDK} \
--settings=./.travis/settings.xml
;;
12-ea)
mvn -V -B -e verify -Dbytecode.version=12 \
--settings=./.travis/settings.xml
;;
*)
echo "Incorrect JDK [$JDK]"
exit 1;
;;
esac
jacoco-0.8.3/.travis.yml 0000664 0000000 0000000 00000000610 13421740370 0015067 0 ustar 00root root 0000000 0000000 language: java
# Skip "install" stage:
install: true
# Use container-based infrastructure:
sudo: false
addons:
apt:
packages:
- openjdk-6-jdk
# Keep Maven local repository between builds:
cache:
directories:
- '$HOME/.m2/repository'
env:
- JDK=5
- JDK=6
- JDK=7
- JDK=8
- JDK=8
ECJ=true
- JDK=9
- JDK=10
- JDK=11
- JDK=12-ea
script: ./.travis.sh
jacoco-0.8.3/.travis/ 0000775 0000000 0000000 00000000000 13421740370 0014347 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/.travis/appveyor-toolchains.xml 0000664 0000000 0000000 00000001034 13421740370 0021075 0 ustar 00root root 0000000 0000000
jdkjava166oracleC:\Program Files\Java\jdk1.6.0
jacoco-0.8.3/.travis/settings.xml 0000664 0000000 0000000 00000001246 13421740370 0016734 0 ustar 00root root 0000000 0000000 sonatype-nexus-snapshots${env.SONATYPE_USERNAME}${env.SONATYPE_PASSWORD}defaultTLSv1default
jacoco-0.8.3/.travis/toolchains.xml 0000664 0000000 0000000 00000001005 13421740370 0017230 0 ustar 00root root 0000000 0000000
jdkjava155sun/tmp/jdk/5
jacoco-0.8.3/.travis/travis-toolchains.xml 0000664 0000000 0000000 00000002120 13421740370 0020535 0 ustar 00root root 0000000 0000000
jdk6/usr/lib/jvm/java-6-openjdk-amd64jdk7/usr/lib/jvm/java-7-openjdk-amd64jdk8/usr/lib/jvm/java-8-oraclejdk9/usr/lib/jvm/java-9-oracle
jacoco-0.8.3/.travis/trigger-site-deployment.py 0000664 0000000 0000000 00000001405 13421740370 0021504 0 ustar 00root root 0000000 0000000 import os
import urllib2
import json
def request(url, data, token = None):
req = urllib2.Request(url, data)
req.add_header('User-Agent', 'MyClient/1.0.0')
req.add_header('Accept', 'application/vnd.travis-ci.2+json')
req.add_header('Content-Type', 'application/json; charset=UTF-8')
if token:
req.add_header('Travis-API-Version', '3')
req.add_header('Authorization', 'token ' + travis_token)
p = urllib2.urlopen(req)
return json.loads(p.read())
travis_token = request('https://api.travis-ci.org/auth/github', '{"github_token":"' + os.environ['GH_TOKEN'] + '"}')['access_token']
print(request('https://api.travis-ci.org/repo/jacoco%2Fwww.eclemma.org/requests', '{ "request": { "branch": "master", "message": "New JaCoCo snapshot" } }', travis_token))
jacoco-0.8.3/LICENSE.md 0000664 0000000 0000000 00000001247 13421740370 0014371 0 ustar 00root root 0000000 0000000 License
=======
Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
The JaCoCo Java Code Coverage Library and all included documentation is made
available by Mountainminds GmbH & Co. KG, Munich. Except indicated below, the
Content is provided to you under the terms and conditions of the Eclipse Public
License Version 1.0 ("EPL"). A copy of the EPL is available at
[http://www.eclipse.org/legal/epl-v10.html](http://www.eclipse.org/legal/epl-v10.html).
Please visit
[http://www.jacoco.org/jacoco/trunk/doc/license.html](http://www.jacoco.org/jacoco/trunk/doc/license.html)
for the complete license information including third party licenses and trademarks.
jacoco-0.8.3/README.md 0000664 0000000 0000000 00000002171 13421740370 0014241 0 ustar 00root root 0000000 0000000 JaCoCo Java Code Coverage Library
=================================
[](https://travis-ci.org/jacoco/jacoco)
[](https://ci.appveyor.com/project/JaCoCo/jacoco/branch/master)
[](http://search.maven.org/#search|ga|1|g%3Aorg.jacoco)
JaCoCo is a free Java code coverage library distributed under the Eclipse Public
License. Check the [project homepage](http://www.jacoco.org/jacoco)
for downloads, documentation and feedback.
Please use our [mailing list](https://groups.google.com/forum/?fromgroups=#!forum/jacoco)
for questions regarding JaCoCo which are not already covered by the
[extensive documentation](http://www.jacoco.org/jacoco/trunk/doc/).
Note: We do not answer general questions in the project's issue tracker. Please use our [mailing list](https://groups.google.com/forum/?fromgroups=#!forum/jacoco) for this.
-------------------------------------------------------------------------
jacoco-0.8.3/jacoco-maven-plugin.test/ 0000775 0000000 0000000 00000000000 13421740370 0017575 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/.project 0000664 0000000 0000000 00000001073 13421740370 0021245 0 ustar 00root root 0000000 0000000
jacoco-maven-plugin.testorg.eclipse.m2e.core.maven2Builderorg.eclipse.m2e.core.maven2Nature.settings2PARENT-1-PROJECT_LOC/org.jacoco.core.test/.settings
jacoco-0.8.3/jacoco-maven-plugin.test/it/ 0000775 0000000 0000000 00000000000 13421740370 0020211 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-halt/ 0000775 0000000 0000000 00000000000 13421740370 0023722 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-halt/invoker.properties 0000664 0000000 0000000 00000000033 13421740370 0027511 0 ustar 00root root 0000000 0000000 invoker.buildResult=failure jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-halt/pom.xml 0000664 0000000 0000000 00000003671 13421740370 0025246 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-check-fails-halt@project.groupId@jacoco-maven-pluginprepare-agentcheckcheckCLASSExampleMETHODMISSEDCOUNT0
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-halt/src/ 0000775 0000000 0000000 00000000000 13421740370 0024511 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-halt/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0025435 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-halt/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0026356 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-halt/src/main/java/Example.java 0000664 0000000 0000000 00000001302 13421740370 0030610 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
*
*******************************************************************************/
public class Example {
public void sayHello() {
System.out.println("Hello world");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-halt/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0025470 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-halt/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0026411 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-halt/src/test/java/ExampleTest.java 0000664 0000000 0000000 00000001316 13421740370 0031510 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
*
*******************************************************************************/
import org.junit.Test;
public class ExampleTest {
@Test
public void test() {
new Example();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-halt/verify.bsh 0000664 0000000 0000000 00000002064 13421740370 0025726 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
*
*******************************************************************************/
import java.io.*;
import org.codehaus.plexus.util.*;
String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
if ( buildLog.indexOf( "Coverage checks have not been met." ) < 0 ) {
throw new RuntimeException( "Coverage checks should not have been met." );
}
if ( buildLog.indexOf( "methods missed count is 1, but expected maximum is 0" ) < 0 ) {
throw new RuntimeException( "Should have displayed insufficient code coverage messages." );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-no-halt/ 0000775 0000000 0000000 00000000000 13421740370 0024334 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-no-halt/pom.xml 0000664 0000000 0000000 00000003606 13421740370 0025656 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-check-fails-no-hault@project.groupId@jacoco-maven-pluginprepare-agentcheckcheckfalseBUNDLEMETHODMISSEDCOUNT0
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/ 0000775 0000000 0000000 00000000000 13421740370 0025123 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0026047 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0026770 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/main/java/Example.java 0000664 0000000 0000000 00000001302 13421740370 0031222 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
*
*******************************************************************************/
public class Example {
public void sayHello() {
System.out.println("Hello world");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0026102 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0027023 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/test/java/ExampleTest.java 0000664 0000000 0000000 00000001316 13421740370 0032122 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
*
*******************************************************************************/
import org.junit.Test;
public class ExampleTest {
@Test
public void test() {
new Example();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-fails-no-halt/verify.bsh 0000664 0000000 0000000 00000002063 13421740370 0026337 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
*
*******************************************************************************/
import java.io.*;
import org.codehaus.plexus.util.*;
String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
if ( buildLog.indexOf( "Coverage checks have not been met." ) < 0 ) {
throw new RuntimeException( "Coverage checks should not have been met." );
}
if ( buildLog.indexOf( "methods missed count is 1, but expected maximum is 0" ) < 0 ) {
throw new RuntimeException( "Should have displayed insufficient code coverage messages." );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-passes/ 0000775 0000000 0000000 00000000000 13421740370 0023174 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-passes/pom.xml 0000664 0000000 0000000 00000004031 13421740370 0024507 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-check-passes@project.groupId@jacoco-maven-pluginprepare-agentcheckcheckBUNDLEINSTRUCTIONCOVEREDRATIO0.90CLASSMISSEDCOUNT0
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-passes/src/ 0000775 0000000 0000000 00000000000 13421740370 0023763 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-passes/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0024707 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-passes/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0025630 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-passes/src/main/java/Example.java 0000664 0000000 0000000 00000001302 13421740370 0030062 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
*
*******************************************************************************/
public class Example {
public void sayHello() {
System.out.println("Hello world");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-passes/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0024742 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-passes/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0025663 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-passes/src/test/java/ExampleTest.java 0000664 0000000 0000000 00000001331 13421740370 0030757 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
*
*******************************************************************************/
import org.junit.Test;
public class ExampleTest {
@Test
public void test() {
new Example().sayHello();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-check-passes/verify.bsh 0000664 0000000 0000000 00000001554 13421740370 0025203 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
*
*******************************************************************************/
import java.io.*;
import org.codehaus.plexus.util.*;
String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
if ( buildLog.indexOf( "All coverage checks have been met." ) < 0 ) {
throw new RuntimeException( "Coverage checks were not met." );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-customize-agent/ 0000775 0000000 0000000 00000000000 13421740370 0023741 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-customize-agent/pom.xml 0000664 0000000 0000000 00000005107 13421740370 0025261 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-customize-agentcoverageAgent${project.build.directory}/coverage.execfalsesun.reflect.DelegatingClassLoader:MyClassLoadertruetruesessiontruefilelocalhost9999${project.build.directory}/classdumpstrue${jacoco.destFile}@project.groupId@jacoco-maven-pluginprepare-agentreport*java.*sun.*org.apache.maven.pluginsmaven-surefire-plugin${coverageAgent}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-customize-agent/src/ 0000775 0000000 0000000 00000000000 13421740370 0024530 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-customize-agent/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0025454 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-customize-agent/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0026375 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-customize-agent/src/main/java/Example.java 0000664 0000000 0000000 00000001222 13421740370 0030630 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
public class Example {
public void sayHello() {
System.out.println("Hello world");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-customize-agent/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0025507 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-customize-agent/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0026430 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-customize-agent/src/test/java/ExampleTest.java 0000664 0000000 0000000 00000001251 13421740370 0031525 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import org.junit.Test;
public class ExampleTest {
@Test
public void test() {
new Example().sayHello();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-customize-agent/verify.bsh 0000664 0000000 0000000 00000003403 13421740370 0025743 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import java.io.*;
import org.codehaus.plexus.util.*;
String agentOptions = "destfile=" + basedir + File.separator + "target" + File.separator + "coverage.exec"
+ ",append=false"
+ ",includes=*"
+ ",excludes=java.*:sun.*"
+ ",exclclassloader=sun.reflect.DelegatingClassLoader:MyClassLoader"
+ ",inclbootstrapclasses=true"
+ ",inclnolocationclasses=true"
+ ",sessionid=session"
+ ",dumponexit=true"
+ ",output=file"
+ ",address=localhost"
+ ",port=9999"
+ ",classdumpdir=" + basedir + File.separator + "target" + File.separator + "classdumps"
+ ",jmx=true";
//backslashes will be escaped
agentOptions = agentOptions.replace("\\","\\\\");
String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
if ( buildLog.indexOf( agentOptions ) < 0 ) {
throw new RuntimeException( "Property was not configured, expected " + agentOptions );
}
File file = new File( basedir, "target/coverage.exec" );
if ( !file.isFile() )
{
throw new FileNotFoundException( "Could not find generated dump: " + file );
}
File reportDir = new File( basedir, "target/site/jacoco" );
if ( !reportDir.isDirectory() )
{
throw new RuntimeException( "Could not find generated report" );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-dump/ 0000775 0000000 0000000 00000000000 13421740370 0021570 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-dump/pom.xml 0000664 0000000 0000000 00000006264 13421740370 0023115 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-dump@project.groupId@jacoco-maven-pluginprepare-agentprepare-agentdumpintegration-testdumpcheckcheckBUNDLECLASSCOVEREDCOUNT1org.apache.maven.pluginsmaven-antrun-plugin1.6launch-serverpre-integration-testrunstop-serverpost-integration-testrun
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-dump/src/ 0000775 0000000 0000000 00000000000 13421740370 0022357 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-dump/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0023303 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-dump/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0024224 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-dump/src/main/java/Server.java 0000664 0000000 0000000 00000002067 13421740370 0026342 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
import java.io.File;
/**
* Simple server which runs as long a termination file is created.
*/
public class Server {
public static void main(String[] args) throws Exception {
System.out.println("Test server started");
// Wait for termination file to turn up
// This option puts the target in a pseudo 'server' mode
if (args.length == 1) {
final File termFile = new File(args[0]);
while (!termFile.exists()) {
Thread.sleep(100);
}
}
System.out.println("Test server stopped");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-dump/verify.bsh 0000664 0000000 0000000 00000001554 13421740370 0023577 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
*
*******************************************************************************/
import java.io.*;
import org.codehaus.plexus.util.*;
String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
if ( buildLog.indexOf( "All coverage checks have been met." ) < 0 ) {
throw new RuntimeException( "Coverage checks were not met." );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-includes-excludes/ 0000775 0000000 0000000 00000000000 13421740370 0024243 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-includes-excludes/pom.xml 0000664 0000000 0000000 00000003075 13421740370 0025565 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-includes-excludes@project.groupId@jacoco-maven-plugin**/FileUtil***/TestUtil*prepare-agentprepare-agentreportreport
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-includes-excludes/src/ 0000775 0000000 0000000 00000000000 13421740370 0025032 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0025756 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0026677 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/ 0000775 0000000 0000000 00000000000 13421740370 0027466 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/ 0000775 0000000 0000000 00000000000 13421740370 0031134 5 ustar 00root root 0000000 0000000 DatabaseUtil.java 0000664 0000000 0000000 00000001265 13421740370 0034266 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
package org.project;
public class DatabaseUtil {
public void doStuff() {
System.out.println("Do DatabaseUtil Stuff");
}
}
FileUtil.java 0000664 0000000 0000000 00000001255 13421740370 0033440 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
package org.project;
public class FileUtil {
public void doStuff() {
System.out.println("Do FileUtil Stuff");
}
}
TestUtil.java 0000664 0000000 0000000 00000001255 13421740370 0033500 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
package org.project;
public class TestUtil {
public void doStuff() {
System.out.println("Do TestUtil Stuff");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-includes-excludes/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0026011 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-includes-excludes/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0026732 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-includes-excludes/src/test/java/org/ 0000775 0000000 0000000 00000000000 13421740370 0027521 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-includes-excludes/src/test/java/org/project/ 0000775 0000000 0000000 00000000000 13421740370 0031167 5 ustar 00root root 0000000 0000000 TestDatabaseUtil.java 0000664 0000000 0000000 00000001315 13421740370 0035155 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-includes-excludes/src/test/java/org/project /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
package org.project;
import org.junit.Test;
public class TestDatabaseUtil {
@Test
public void testDoStuff() {
new DatabaseUtil().doStuff();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-includes-excludes/verify.bsh 0000664 0000000 0000000 00000002511 13421740370 0026244 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import java.io.*;
import org.codehaus.plexus.util.*;
String agentOptions = "excludes=**/FileUtil*:**/TestUtil*";
String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
if ( buildLog.indexOf( agentOptions ) < 0 ) {
throw new RuntimeException("Include/Exclude was not configured correct" );
}
File databaseUtilReportFile = new File( basedir, "target/site/jacoco/org.project/DatabaseUtil.html" );
if ( !databaseUtilReportFile.isFile() )
{
throw new FileNotFoundException( "DatabaseUtil should NOT be excluded: " + databaseUtilReportFile );
}
File testUtilReportFile = new File( basedir, "target/site/jacoco/org.project/TestUtil.html" );
if ( testUtilReportFile.isFile() )
{
throw new RuntimeException( "TestUtil SHOULD be excluded: " + testUtilReportFile );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/ 0000775 0000000 0000000 00000000000 13421740370 0026516 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/invoker.properties 0000664 0000000 0000000 00000000034 13421740370 0032306 0 ustar 00root root 0000000 0000000 invoker.java.version = 1.9+
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/pom.xml 0000664 0000000 0000000 00000005107 13421740370 0030036 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-java9-offline-instrumentation@project.groupId@org.jacoco.agentruntime@project.version@testorg.apache.maven.pluginsmaven-compiler-plugin99@project.groupId@jacoco-maven-plugininstrument-classesinstrumentrestore-instrumented-classesrestore-instrumented-classesreportreport${project.build.directory}/coverage.execorg.apache.maven.pluginsmaven-surefire-plugin${project.build.directory}/coverage.exec
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/ 0000775 0000000 0000000 00000000000 13421740370 0027305 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0030231 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0031152 5 ustar 00root root 0000000 0000000 module-info.java 0000664 0000000 0000000 00000001110 13421740370 0034145 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/main/java /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
module org.example {
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/main/java/org/ 0000775 0000000 0000000 00000000000 13421740370 0031741 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/main/java/org/example/0000775 0000000 0000000 00000000000 13421740370 0033374 5 ustar 00root root 0000000 0000000 Example.java 0000664 0000000 0000000 00000001250 13421740370 0035551 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/main/java/org/example /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
package org.example;
public class Example {
public void sayHello() {
System.out.println("Hello world");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0030264 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0031205 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/test/java/org/ 0000775 0000000 0000000 00000000000 13421740370 0031774 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/test/java/org/example/0000775 0000000 0000000 00000000000 13421740370 0033427 5 ustar 00root root 0000000 0000000 ExampleTest.java 0000664 0000000 0000000 00000001277 13421740370 0036455 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/test/java/org/example /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
package org.example;
import org.junit.Test;
public class ExampleTest {
@Test
public void test() {
new Example().sayHello();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9/ 0000775 0000000 0000000 00000000000 13421740370 0021635 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9/invoker.properties 0000664 0000000 0000000 00000000034 13421740370 0025425 0 ustar 00root root 0000000 0000000 invoker.java.version = 1.9+
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9/pom.xml 0000664 0000000 0000000 00000004142 13421740370 0023153 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOT../setup-parentit-java9org.apache.maven.pluginsmaven-compiler-plugin99@project.groupId@jacoco-maven-pluginprepare-agentreportcheckcheckINSTRUCTIONCOVEREDCOUNT88
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9/src/ 0000775 0000000 0000000 00000000000 13421740370 0022424 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0023350 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0024271 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9/src/main/java/Example.java 0000664 0000000 0000000 00000001310 13421740370 0026522 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
public class Example {
public void sayHello(String name) {
// http://openjdk.java.net/jeps/280
System.out.println("Hello, " + name);
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0023403 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0024324 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-java9/src/test/java/ExampleTest.java 0000664 0000000 0000000 00000001257 13421740370 0027427 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import org.junit.Test;
public class ExampleTest {
@Test
public void test() {
new Example().sayHello("test");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/ 0000775 0000000 0000000 00000000000 13421740370 0023216 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-merge/ 0000775 0000000 0000000 00000000000 13421740370 0027320 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-merge/pom.xml 0000664 0000000 0000000 00000003177 13421740370 0030645 0 ustar 00root root 0000000 0000000
4.0.0jacocoit-merge-passes1.0-SNAPSHOTit-merge-passes-merge@project.groupId@jacoco-maven-pluginmergemerge${project.parent.build.directory}*.exec
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/ 0000775 0000000 0000000 00000000000 13421740370 0027750 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/pom.xml 0000664 0000000 0000000 00000001576 13421740370 0031276 0 ustar 00root root 0000000 0000000
4.0.0jacocoit-merge-passes1.0-SNAPSHOTit-merge-passes-project1
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/ 0000775 0000000 0000000 00000000000 13421740370 0030537 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0031463 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0032404 5 ustar 00root root 0000000 0000000 Example.java 0000664 0000000 0000000 00000001224 13421740370 0034562 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/main/java /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Mads Mohr Christensen - implementation of MergeMojo
*
*******************************************************************************/
public class Example {
public void sayHello() {
System.out.println("Hello world");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0031516 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0032437 5 ustar 00root root 0000000 0000000 ExampleTest.java 0000664 0000000 0000000 00000001253 13421740370 0035457 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/test/java /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Mads Mohr Christensen - implementation of MergeMojo
*
*******************************************************************************/
import org.junit.Test;
public class ExampleTest {
@Test
public void test() {
new Example().sayHello();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/ 0000775 0000000 0000000 00000000000 13421740370 0027751 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/pom.xml 0000664 0000000 0000000 00000001576 13421740370 0031277 0 ustar 00root root 0000000 0000000
4.0.0jacocoit-merge-passes1.0-SNAPSHOTit-merge-passes-project2
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/ 0000775 0000000 0000000 00000000000 13421740370 0030540 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0031464 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0032405 5 ustar 00root root 0000000 0000000 Example.java 0000664 0000000 0000000 00000001224 13421740370 0034563 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/main/java /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Mads Mohr Christensen - implementation of MergeMojo
*
*******************************************************************************/
public class Example {
public void sayHello() {
System.out.println("Hello world");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0031517 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0032440 5 ustar 00root root 0000000 0000000 ExampleTest.java 0000664 0000000 0000000 00000001253 13421740370 0035460 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/test/java /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Mads Mohr Christensen - implementation of MergeMojo
*
*******************************************************************************/
import org.junit.Test;
public class ExampleTest {
@Test
public void test() {
new Example().sayHello();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/pom.xml 0000664 0000000 0000000 00000003455 13421740370 0024542 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-merge-passespomit-merge-passes-project1it-merge-passes-project2it-merge-passes-merge@project.groupId@jacoco-maven-pluginprepare-agentprepare-agent${project.parent.build.directory}/${project.artifactId}.execorg.apache.maven.pluginsmaven-surefire-plugin${argLine}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-merge-passes/verify.bsh 0000664 0000000 0000000 00000001726 13421740370 0025226 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Mads Mohr Christensen - implementation of MergeMojo
*
*******************************************************************************/
import java.io.*;
import org.codehaus.plexus.util.*;
String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
if ( buildLog.indexOf( "Loading execution data file" ) < 0 ) {
throw new RuntimeException( "Could not load execution data file" );
}
if ( buildLog.indexOf( "Writing merged execution data to" ) < 0 ) {
throw new RuntimeException( "Could not write merged execution data" );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/ 0000775 0000000 0000000 00000000000 13421740370 0023240 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/child-jar-without-sources/ 0000775 0000000 0000000 00000000000 13421740370 0030257 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/child-jar-without-sources/pom.xml 0000664 0000000 0000000 00000001644 13421740370 0031601 0 ustar 00root root 0000000 0000000
4.0.0jacocoit-multi-module1.0-SNAPSHOTchild-jar-without-sources
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/child/ 0000775 0000000 0000000 00000000000 13421740370 0024323 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/child/pom.xml 0000664 0000000 0000000 00000001550 13421740370 0025641 0 ustar 00root root 0000000 0000000
4.0.0jacocoit-multi-module1.0-SNAPSHOTchild
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/child/src/ 0000775 0000000 0000000 00000000000 13421740370 0025112 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/child/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0026036 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/child/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0026757 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/child/src/main/java/Example.java 0000664 0000000 0000000 00000001222 13421740370 0031212 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
public class Example {
public void sayHello() {
System.out.println("Hello world");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/child/src/main/java/somepackage/ 0000775 0000000 0000000 00000000000 13421740370 0031236 5 ustar 00root root 0000000 0000000 Example.java 0000664 0000000 0000000 00000001250 13421740370 0033413 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/child/src/main/java/somepackage /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
package somepackage;
public class Example {
public void sayHello() {
System.out.println("Hello world");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/child/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0026071 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/child/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0027012 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/child/src/test/java/ExampleTest.java 0000664 0000000 0000000 00000001251 13421740370 0032107 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import org.junit.Test;
public class ExampleTest {
@Test
public void test() {
new Example().sayHello();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/pom.xml 0000664 0000000 0000000 00000003414 13421740370 0024557 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-multi-modulepomchildchild-jar-without-sourcesskip-child@project.groupId@jacoco-maven-pluginprepare-agentprepare-agentreportreportorg.apache.maven.pluginsmaven-surefire-plugin-ea ${argLine}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/skip-child/ 0000775 0000000 0000000 00000000000 13421740370 0025267 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/skip-child/pom.xml 0000664 0000000 0000000 00000001661 13421740370 0026610 0 ustar 00root root 0000000 0000000
4.0.0jacocoit-multi-module1.0-SNAPSHOTskip-childtrue
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/skip-child/src/ 0000775 0000000 0000000 00000000000 13421740370 0026056 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/skip-child/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0027035 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/skip-child/src/test/ExampleTest.java 0000664 0000000 0000000 00000001213 13421740370 0032130 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import org.junit.Test;
public class ExampleTest {
@Test
public void test() {
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multi-module/verify.bsh 0000664 0000000 0000000 00000003723 13421740370 0025247 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import java.io.*;
import org.codehaus.plexus.util.*;
String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
if ( buildLog.indexOf( "Skipping JaCoCo execution due to missing classes directory." ) < 0 ) {
throw new RuntimeException( "Execution should be skipped when target/classes does not exist." );
}
File dump2 = new File( basedir, "skip-child/target/jacoco.exec" );
if ( dump2.isFile() ) {
throw new RuntimeException( "Should not be executed for module 'skip-child', but dump found : " + dump2 );
}
if ( !buildLog.contains( "argLine set to empty" ) ) {
throw new RuntimeException( "Property not set to empty when skipping." );
}
File file = new File( basedir, "child/target/jacoco.exec" );
if ( !file.isFile() )
{
throw new FileNotFoundException( "Could not find generated dump: " + file );
}
File xmlReport = new File( basedir, "child/target/site/jacoco/jacoco.xml" );
if ( !xmlReport.isFile() )
{
throw new FileNotFoundException( "Could not find generated XML report: " + xmlReport );
}
File csvReport = new File( basedir, "child/target/site/jacoco/jacoco.csv" );
if ( !csvReport.isFile() )
{
throw new FileNotFoundException( "Could not find generated CSV report: " + csvReport );
}
File htmlReport = new File( basedir, "child/target/site/jacoco/index.html" );
if ( !htmlReport.isFile() )
{
throw new FileNotFoundException( "Could not find generated HTML report: " + htmlReport );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multiple-executions/ 0000775 0000000 0000000 00000000000 13421740370 0024642 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multiple-executions/pom.xml 0000664 0000000 0000000 00000004144 13421740370 0026162 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-multiple-executions"-Da=\"1\"" -Db=2@project.groupId@jacoco-maven-pluginfirstprepare-agent${project.build.directory}/nospace.execsecondprepare-agent${project.build.directory}/with space.exec"my" sessionthirdprepare-agent${project.build.directory}/third.exec
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multiple-executions/src/ 0000775 0000000 0000000 00000000000 13421740370 0025431 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multiple-executions/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0026355 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multiple-executions/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0027276 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multiple-executions/src/main/java/Example.java 0000664 0000000 0000000 00000001222 13421740370 0031531 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
public class Example {
public void sayHello() {
System.out.println("Hello world");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multiple-executions/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0026410 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multiple-executions/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0027331 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multiple-executions/src/test/java/ExampleTest.java 0000664 0000000 0000000 00000001251 13421740370 0032426 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import org.junit.Test;
public class ExampleTest {
@Test
public void test() {
new Example().sayHello();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-multiple-executions/verify.bsh 0000664 0000000 0000000 00000002441 13421740370 0026645 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import java.io.*;
import org.codehaus.plexus.util.*;
File file = new File( basedir, "target/nospace.exec" );
if ( file.isFile() )
{
throw new FileNotFoundException( "Found unwanted dump: " + file );
}
File file = new File( basedir, "target/with space.exec" );
if ( file.isFile() )
{
throw new FileNotFoundException( "Found unwanted dump: " + file );
}
file = new File( basedir, "target/third.exec" );
if ( !file.isFile() )
{
throw new FileNotFoundException( "Could not find generated dump: " + file );
}
String argLine = "\"-Da=\\\"1\\\"\" -Db=2";
String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
if ( buildLog.indexOf( argLine ) < 0 ) {
throw new RuntimeException( "Original argLine was overwritten" );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/ 0000775 0000000 0000000 00000000000 13421740370 0025506 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes/ 0000775 0000000 0000000 00000000000 13421740370 0032647 5 ustar 00root root 0000000 0000000 pom.xml 0000664 0000000 0000000 00000001611 13421740370 0034104 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes
4.0.0jacocoit-offline-instrumentation1.0-SNAPSHOTchild-without-main-classes
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes/src/ 0000775 0000000 0000000 00000000000 13421740370 0033436 5 ustar 00root root 0000000 0000000 test/ 0000775 0000000 0000000 00000000000 13421740370 0034336 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes/src java/ 0000775 0000000 0000000 00000000000 13421740370 0035257 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes/src/test ExampleTest.java 0000664 0000000 0000000 00000001213 13421740370 0040352 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes/src/test/java /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import org.junit.Test;
public class ExampleTest {
@Test
public void test() {
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/ 0000775 0000000 0000000 00000000000 13421740370 0026571 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/pom.xml 0000664 0000000 0000000 00000001564 13421740370 0030114 0 ustar 00root root 0000000 0000000
4.0.0jacocoit-offline-instrumentation1.0-SNAPSHOTchild
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/ 0000775 0000000 0000000 00000000000 13421740370 0027360 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0030304 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0031225 5 ustar 00root root 0000000 0000000 DoNotInstrument.java 0000664 0000000 0000000 00000001232 13421740370 0035123 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/main/java /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
public class DoNotInstrument {
public void sayHello() {
System.out.println("Hello world");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/main/java/Example.java0000664 0000000 0000000 00000001222 13421740370 0033460 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
public class Example {
public void sayHello() {
System.out.println("Hello world");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0030337 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0031260 5 ustar 00root root 0000000 0000000 ExampleTest.java 0000664 0000000 0000000 00000001251 13421740370 0034276 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/test/java /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import org.junit.Test;
public class ExampleTest {
@Test
public void test() {
new Example().sayHello();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/pom.xml 0000664 0000000 0000000 00000005166 13421740370 0027033 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-offline-instrumentationpomchildchild-without-main-classes@project.groupId@org.jacoco.agentruntime@project.version@test@project.groupId@jacoco-maven-plugininstrument-classesinstrument**/DoNotInstrument.classrestore-instrumented-classesrestore-instrumented-classesreportreport${project.build.directory}/coverage.execorg.apache.maven.pluginsmaven-surefire-plugin${project.build.directory}/coverage.exec
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-offline-instrumentation/verify.bsh 0000664 0000000 0000000 00000002244 13421740370 0027512 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import java.io.*;
import org.codehaus.plexus.util.*;
File file = new File( basedir, "child/target/generated-classes/jacoco/Example.class" );
if ( !file.isFile() ) {
throw new RuntimeException( "Could not find backup of instrumented class: " + file );
}
file = new File( basedir, "child/target/generated-classes/jacoco/DoNotInstrument.class" );
if ( file.isFile() ) {
throw new RuntimeException( "Excluded file should not be instrumented: " + file );
}
file = new File( basedir, "child/target/coverage.exec" );
if ( !file.isFile() )
{
throw new FileNotFoundException( "Could not find generated dump: " + file );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-prepend-property-skip/ 0000775 0000000 0000000 00000000000 13421740370 0025106 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-prepend-property-skip/pom.xml 0000664 0000000 0000000 00000002554 13421740370 0026431 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-prepend-property-skip-Dfoo@project.groupId@jacoco-maven-pluginprepare-agenttrue
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-prepend-property-skip/src/ 0000775 0000000 0000000 00000000000 13421740370 0025675 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-prepend-property-skip/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0026654 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-prepend-property-skip/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0027575 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-prepend-property-skip/src/test/java/ExampleTest.java 0000664 0000000 0000000 00000001350 13421740370 0032672 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import org.junit.Test;
import static org.junit.Assert.assertNotNull;
public class ExampleTest {
@Test
public void test() {
assertNotNull(System.getProperty("foo"));
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-prepend-property/ 0000775 0000000 0000000 00000000000 13421740370 0024142 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-prepend-property/pom.xml 0000664 0000000 0000000 00000002414 13421740370 0025460 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-prepend-property-ea@project.groupId@jacoco-maven-pluginprepare-agent
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-prepend-property/verify.bsh 0000664 0000000 0000000 00000001756 13421740370 0026155 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import java.io.*;
import org.codehaus.plexus.util.*;
String agentOptions = "jacoco.exec -ea";
String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
if ( buildLog.indexOf( agentOptions ) < 0 ) {
throw new RuntimeException( "Property was not configured" );
}
File file = new File( basedir, "target/jacoco.exec" );
if ( !file.isFile() )
{
throw new FileNotFoundException( "Could not find generated dump: " + file );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/ 0000775 0000000 0000000 00000000000 13421740370 0026770 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/ 0000775 0000000 0000000 00000000000 13421740370 0030134 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/pom.xml 0000664 0000000 0000000 00000002002 13421740370 0031443 0 ustar 00root root 0000000 0000000
4.0.0jacocoit-report-aggregate-customization1.0-SNAPSHOTchild1jartarget/child1.coverage
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/ 0000775 0000000 0000000 00000000000 13421740370 0030723 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0031647 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0032570 5 ustar 00root root 0000000 0000000 package1/ 0000775 0000000 0000000 00000000000 13421740370 0034165 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/main/java Example1.java 0000664 0000000 0000000 00000001203 13421740370 0036500 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/main/java/package1 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
*
*******************************************************************************/
package package1;
public class Example1 {
public void a() {
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0031702 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0032623 5 ustar 00root root 0000000 0000000 package1/ 0000775 0000000 0000000 00000000000 13421740370 0034220 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/test/java Example1Test.java 0000664 0000000 0000000 00000001302 13421740370 0037373 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/test/java/package1 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
*
*******************************************************************************/
package package1;
import org.junit.Test;
public class Example1Test {
@Test
public void test() {
new Example1().a();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/ 0000775 0000000 0000000 00000000000 13421740370 0030135 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/pom.xml 0000664 0000000 0000000 00000002002 13421740370 0031444 0 ustar 00root root 0000000 0000000
4.0.0jacocoit-report-aggregate-customization1.0-SNAPSHOTchild2jartarget/child2.coverage
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/ 0000775 0000000 0000000 00000000000 13421740370 0030724 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0031650 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0032571 5 ustar 00root root 0000000 0000000 package2/ 0000775 0000000 0000000 00000000000 13421740370 0034167 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/main/java Example2.java 0000664 0000000 0000000 00000001203 13421740370 0036503 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/main/java/package2 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
*
*******************************************************************************/
package package2;
public class Example2 {
public void a() {
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0031703 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0032624 5 ustar 00root root 0000000 0000000 package2/ 0000775 0000000 0000000 00000000000 13421740370 0034222 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/test/java Example2Test.java 0000664 0000000 0000000 00000001302 13421740370 0037376 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/test/java/package2 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
*
*******************************************************************************/
package package2;
import org.junit.Test;
public class Example2Test {
@Test
public void test() {
new Example2().a();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/pom.xml 0000664 0000000 0000000 00000002627 13421740370 0030314 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-report-aggregate-customizationpomchild1child2report@project.groupId@jacoco-maven-pluginprepare-agentprepare-agent
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/report/ 0000775 0000000 0000000 00000000000 13421740370 0030303 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/report/pom.xml 0000664 0000000 0000000 00000004133 13421740370 0031621 0 ustar 00root root 0000000 0000000
4.0.0jacocoit-report-aggregate-customization1.0-SNAPSHOTreportAggregate Report${project.groupId}child1${project.version}${project.groupId}child2${project.version}@project.groupId@jacoco-maven-pluginreport-aggregateverifyreport-aggregatetarget/*.coveragetarget/child2.coveragetarget/jacoco-aggregate-customization
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate-customization/verify.bsh 0000664 0000000 0000000 00000003122 13421740370 0030770 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
*
*******************************************************************************/
import org.codehaus.plexus.util.*;
import java.util.regex.*;
String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
// Test customization of dataFileIncludes and dataFileExcludes
if ( !Pattern.compile( "Loading execution data file \\S*child1.target.child1.coverage").matcher( buildLog ).find() ) {
throw new RuntimeException( "Execution data from child1 was not loaded." );
}
if ( Pattern.compile( "Loading execution data file \\S*child2").matcher( buildLog ).find() ) {
throw new RuntimeException( "Execution data from child2 was loaded." );
}
// Test customization of outputDirectory
File reportChild1 = new File( basedir, "report/target/jacoco-aggregate-customization/child1/index.html" );
if ( !reportChild1.isFile() ) {
throw new RuntimeException( "Report for child1 was not created." );
}
File reportChild2 = new File( basedir, "report/target/jacoco-aggregate-customization/child2/index.html" );
if ( !reportChild2.isFile() ) {
throw new RuntimeException( "Report for child2 was not created." );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/ 0000775 0000000 0000000 00000000000 13421740370 0024062 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/ 0000775 0000000 0000000 00000000000 13421740370 0026203 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/pom.xml 0000664 0000000 0000000 00000002126 13421740370 0027521 0 ustar 00root root 0000000 0000000
4.0.0jacocoit-report-aggregate1.0-SNAPSHOTchild1-testjarjacocochild1${project.version}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/src/ 0000775 0000000 0000000 00000000000 13421740370 0026772 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0027751 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0030672 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/src/test/java/package1/ 0000775 0000000 0000000 00000000000 13421740370 0032346 5 ustar 00root root 0000000 0000000 Example1bTest.java 0000664 0000000 0000000 00000001304 13421740370 0035606 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/src/test/java/package1 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
*
*******************************************************************************/
package package1;
import org.junit.Test;
public class Example1bTest {
@Test
public void test() {
new Example1b().b();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1/ 0000775 0000000 0000000 00000000000 13421740370 0025226 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1/pom.xml 0000664 0000000 0000000 00000001630 13421740370 0026543 0 ustar 00root root 0000000 0000000
4.0.0jacocoit-report-aggregate1.0-SNAPSHOTchild1jar
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/ 0000775 0000000 0000000 00000000000 13421740370 0026015 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0026741 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0027662 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/main/java/package1/ 0000775 0000000 0000000 00000000000 13421740370 0031336 5 ustar 00root root 0000000 0000000 Example1a.java 0000664 0000000 0000000 00000001204 13421740370 0033734 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/main/java/package1 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
*
*******************************************************************************/
package package1;
public class Example1a {
public void a() {
}
}
Example1b.java 0000664 0000000 0000000 00000001204 13421740370 0033735 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/main/java/package1 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
*
*******************************************************************************/
package package1;
public class Example1b {
public void b() {
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0026774 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0027715 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/test/java/package1/ 0000775 0000000 0000000 00000000000 13421740370 0031371 5 ustar 00root root 0000000 0000000 Example1aTest.java 0000664 0000000 0000000 00000001304 13421740370 0034630 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/test/java/package1 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
*
*******************************************************************************/
package package1;
import org.junit.Test;
public class Example1aTest {
@Test
public void test() {
new Example1a().a();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2/ 0000775 0000000 0000000 00000000000 13421740370 0025227 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2/pom.xml 0000664 0000000 0000000 00000001630 13421740370 0026544 0 ustar 00root root 0000000 0000000
4.0.0jacocoit-report-aggregate1.0-SNAPSHOTchild2jar
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/ 0000775 0000000 0000000 00000000000 13421740370 0026016 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0026742 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0027663 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/main/java/package2/ 0000775 0000000 0000000 00000000000 13421740370 0031340 5 ustar 00root root 0000000 0000000 Example2.java 0000664 0000000 0000000 00000001203 13421740370 0033575 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/main/java/package2 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
*
*******************************************************************************/
package package2;
public class Example2 {
public void a() {
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0026775 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0027716 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/test/java/package2/ 0000775 0000000 0000000 00000000000 13421740370 0031373 5 ustar 00root root 0000000 0000000 Example2Test.java 0000664 0000000 0000000 00000001302 13421740370 0034470 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/test/java/package2 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
*
*******************************************************************************/
package package2;
import org.junit.Test;
public class Example2Test {
@Test
public void test() {
new Example2().a();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/ 0000775 0000000 0000000 00000000000 13421740370 0025477 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/pom.xml 0000664 0000000 0000000 00000001633 13421740370 0027017 0 ustar 00root root 0000000 0000000
4.0.0jacocoit-report-aggregate1.0-SNAPSHOTchild22.0-SNAPSHOT
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/ 0000775 0000000 0000000 00000000000 13421740370 0026266 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0027212 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0030133 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/main/java/package2/ 0000775 0000000 0000000 00000000000 13421740370 0031610 5 ustar 00root root 0000000 0000000 Example2.java 0000664 0000000 0000000 00000001203 13421740370 0034045 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/main/java/package2 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
*
*******************************************************************************/
package package2;
public class Example2 {
public void a() {
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0027245 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0030166 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/test/java/package2/ 0000775 0000000 0000000 00000000000 13421740370 0031643 5 ustar 00root root 0000000 0000000 Example2Test.java 0000664 0000000 0000000 00000001302 13421740370 0034740 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/test/java/package2 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
*
*******************************************************************************/
package package2;
import org.junit.Test;
public class Example2Test {
@Test
public void test() {
new Example2().a();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/pom.xml 0000664 0000000 0000000 00000002710 13421740370 0025377 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-report-aggregatepomchild1child1-testchild2child2v2report@project.groupId@jacoco-maven-pluginprepare-agentprepare-agent
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/report/ 0000775 0000000 0000000 00000000000 13421740370 0025375 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/report/pom.xml 0000664 0000000 0000000 00000003571 13421740370 0026720 0 ustar 00root root 0000000 0000000
4.0.0jacocoit-report-aggregate1.0-SNAPSHOTreportAggregate Reportjacocochild1${project.version}compilejacocochild1-test${project.version}testjacocochild2[2-SNAPSHOT,)runtime@project.groupId@jacoco-maven-pluginreport-aggregateverifyreport-aggregate
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/report/src/ 0000775 0000000 0000000 00000000000 13421740370 0026164 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/report/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0027143 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/report/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0030064 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/report/src/test/java/packagereport/ 0000775 0000000 0000000 00000000000 13421740370 0032713 5 ustar 00root root 0000000 0000000 ReportTest.java 0000664 0000000 0000000 00000001242 13421740370 0035611 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/report/src/test/java/packagereport /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
package packagereport;
import org.junit.Test;
public class ReportTest {
@Test
public void test() {
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-aggregate/verify.bsh 0000664 0000000 0000000 00000004720 13421740370 0026067 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
*
*******************************************************************************/
import org.codehaus.plexus.util.*;
import java.util.regex.*;
String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
if ( !Pattern.compile( "Loading execution data file \\S*child1.target.jacoco.exec").matcher( buildLog ).find() ) {
throw new RuntimeException( "Execution data from child1 was not loaded." );
}
if ( !Pattern.compile( "Loading execution data file \\S*child1-test.target.jacoco.exec").matcher( buildLog ).find() ) {
throw new RuntimeException( "Execution data from child1-test was not loaded." );
}
if ( !new File( basedir, "child2/target/jacoco.exec" ).isFile()) {
throw new RuntimeException( "No execution data in child2." );
}
if ( Pattern.compile( "Loading execution data file \\S*child2.target.jacoco.exec").matcher( buildLog ).find() ) {
throw new RuntimeException( "Execution data from child2 was loaded, whereas range should exclude it." );
}
if ( !Pattern.compile( "Loading execution data file \\S*child2v2.target.jacoco.exec").matcher( buildLog ).find() ) {
throw new RuntimeException( "Execution data from child2v2 was not loaded." );
}
if ( !Pattern.compile( "Loading execution data file \\S*report.target.jacoco.exec").matcher( buildLog ).find() ) {
throw new RuntimeException( "Execution data from report was not loaded." );
}
File reportChild1 = new File( basedir, "report/target/site/jacoco-aggregate/child1/index.html" );
if ( !reportChild1.isFile() ) {
throw new RuntimeException( "Report for child1 was not created." );
}
File reportChild1test = new File( basedir, "report/target/site/jacoco-aggregate/child1-test/index.html" );
if ( reportChild1test.isFile() ) {
throw new RuntimeException( "Report for child1-test should not be created." );
}
File reportChild2 = new File( basedir, "report/target/site/jacoco-aggregate/child2/index.html" );
if ( !reportChild2.isFile() ) {
throw new RuntimeException( "Report for child2 was not created." );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-nomatch/ 0000775 0000000 0000000 00000000000 13421740370 0023565 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-nomatch/nomatch.exec 0000664 0000000 0000000 00000000030 13421740370 0026055 0 ustar 00root root 0000000 0000000 ÀÀ Example jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-nomatch/pom.xml 0000664 0000000 0000000 00000002515 13421740370 0025105 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-report-nomatch@project.groupId@jacoco-maven-pluginreportreportnomatch.exec
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-nomatch/src/ 0000775 0000000 0000000 00000000000 13421740370 0024354 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-nomatch/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0025300 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-nomatch/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0026221 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-nomatch/src/main/java/Example.java 0000664 0000000 0000000 00000001113 13421740370 0030453 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
public class Example {
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-nomatch/verify.bsh 0000664 0000000 0000000 00000002246 13421740370 0025573 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import java.io.*;
import org.codehaus.plexus.util.*;
String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
if ( buildLog.indexOf( "Classes in bundle " ) < 0 || buildLog.indexOf(" do no match with execution data." ) < 0 ) {
throw new RuntimeException( "Warning 1 was not printed" );
}
if ( buildLog.indexOf( "For report generation the same class files must be used as at runtime." ) < 0 ) {
throw new RuntimeException( "Warning 2 was not printed" );
}
if ( buildLog.indexOf( "Execution data for class Example does not match." ) < 0 ) {
throw new RuntimeException( "Warning 3 was not printed" );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-unreadable-dump/ 0000775 0000000 0000000 00000000000 13421740370 0025201 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-unreadable-dump/data.txt 0000664 0000000 0000000 00000000015 13421740370 0026647 0 ustar 00root root 0000000 0000000 Invalid data
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-unreadable-dump/invoker.properties 0000664 0000000 0000000 00000000036 13421740370 0030773 0 ustar 00root root 0000000 0000000 invoker.buildResult = failure
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-unreadable-dump/pom.xml 0000664 0000000 0000000 00000002521 13421740370 0026516 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-report-unreadable-dump@project.groupId@jacoco-maven-pluginreportreportdata.txt
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-unreadable-dump/src/ 0000775 0000000 0000000 00000000000 13421740370 0025770 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-unreadable-dump/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0026714 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-unreadable-dump/src/main/resources/ 0000775 0000000 0000000 00000000000 13421740370 0030726 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-unreadable-dump/src/main/resources/empty-file.txt0000664 0000000 0000000 00000000000 13421740370 0033530 0 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-unreadable-dump/verify.bsh 0000664 0000000 0000000 00000001456 13421740370 0027211 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import java.io.*;
import org.codehaus.plexus.util.*;
String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
if ( buildLog.indexOf( "Invalid execution data file." ) < 0 ) {
throw new RuntimeException( "Error was not printed" );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-without-debug/ 0000775 0000000 0000000 00000000000 13421740370 0024723 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-without-debug/pom.xml 0000664 0000000 0000000 00000003215 13421740370 0026241 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-report-without-debug@project.groupId@jacoco-maven-pluginprepare-agentprepare-agentreportreportorg.apache.maven.pluginsmaven-compiler-plugintruenone
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-without-debug/src/ 0000775 0000000 0000000 00000000000 13421740370 0025512 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-without-debug/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0026436 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-without-debug/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0027357 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-without-debug/src/main/java/Example.java 0000664 0000000 0000000 00000001222 13421740370 0031612 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
public class Example {
public void sayHello() {
System.out.println("Hello world");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-without-debug/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0026471 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-without-debug/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0027412 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-without-debug/src/test/java/ExampleTest.java 0000664 0000000 0000000 00000001251 13421740370 0032507 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import org.junit.Test;
public class ExampleTest {
@Test
public void test() {
new Example().sayHello();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-without-debug/verify.bsh 0000664 0000000 0000000 00000001465 13421740370 0026733 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import java.io.*;
import org.codehaus.plexus.util.*;
String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
if ( buildLog.indexOf( "with debug information" ) < 0 ) {
throw new RuntimeException( "No warning about debug information" );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-without-dump/ 0000775 0000000 0000000 00000000000 13421740370 0024602 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-without-dump/pom.xml 0000664 0000000 0000000 00000002351 13421740370 0026120 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-report-without-dump@project.groupId@jacoco-maven-pluginreportreport
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-report-without-dump/verify.bsh 0000664 0000000 0000000 00000001522 13421740370 0026604 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import java.io.*;
import org.codehaus.plexus.util.*;
String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
if ( buildLog.indexOf( "Skipping JaCoCo execution due to missing execution data file" ) < 0 ) {
throw new RuntimeException( "Execution was not skipped" );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site-failsafe/ 0000775 0000000 0000000 00000000000 13421740370 0023337 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site-failsafe/invoker.properties 0000664 0000000 0000000 00000000173 13421740370 0027133 0 ustar 00root root 0000000 0000000 invoker.goals = clean verify site
# maven-site-plugin 3.3 works with at least Maven 2.2.1+
invoker.maven.version = 2.2.1+
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site-failsafe/pom.xml 0000664 0000000 0000000 00000005667 13421740370 0024672 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-site-failsafeorg.apache.maven.pluginsmaven-failsafe-plugin2.14.1org.apache.maven.pluginsmaven-surefire-plugin2.14.1@project.groupId@jacoco-maven-plugindefault-prepare-agentprepare-agentdefault-prepare-agent-integrationprepare-agent-integrationdefault-report-integrationreport-integrationorg.apache.maven.pluginsmaven-failsafe-plugindefault-integration-testintegration-testorg.apache.maven.pluginsmaven-site-plugin3.3true@project.groupId@jacoco-maven-plugin@project.version@
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site-failsafe/src/ 0000775 0000000 0000000 00000000000 13421740370 0024126 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site-failsafe/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0025052 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site-failsafe/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0025773 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site-failsafe/src/main/java/Example.java 0000664 0000000 0000000 00000001333 13421740370 0030231 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
public class Example {
public void sayHello() {
System.out.println("Hello world");
}
public void sayHelloIT() {
System.out.println("Hello world");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site-failsafe/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0025105 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site-failsafe/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0026026 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site-failsafe/src/test/java/ExampleIT.java 0000664 0000000 0000000 00000001251 13421740370 0030520 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import org.junit.Test;
public class ExampleIT {
@Test
public void test() {
new Example().sayHelloIT();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site-failsafe/src/test/java/ExampleTest.java 0000664 0000000 0000000 00000001251 13421740370 0031123 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import org.junit.Test;
public class ExampleTest {
@Test
public void test() {
new Example().sayHello();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site-failsafe/verify.bsh 0000664 0000000 0000000 00000004177 13421740370 0025352 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import java.io.*;
import org.codehaus.plexus.util.*;
String projectReportsPage = FileUtils.fileRead( new File( basedir, "target/site/project-reports.html" ) );
if ( projectReportsPage.indexOf( "JaCoCo Coverage Report." ) < 0 ) {
throw new RuntimeException( "project-reports.html does not contain link to JaCoCo report" );
}
File htmlReportFile = new File( basedir, "target/site/jacoco/index.html" );
if ( !htmlReportFile.isFile() ) {
throw new RuntimeException( "HTML report was not created" );
}
File xmlReportFile = new File( basedir, "target/site/jacoco/jacoco.xml" );
if ( !xmlReportFile.isFile() ) {
throw new RuntimeException( "XML report was not created" );
}
File csvReportFile = new File( basedir, "target/site/jacoco/jacoco.csv" );
if ( !csvReportFile.isFile() ) {
throw new RuntimeException( "CSV report was not created" );
}
if ( projectReportsPage.indexOf( "JaCoCo IT Coverage Report." ) < 0 ) {
throw new RuntimeException( "project-reports.html does not contain link to JaCoCo Integration report" );
}
File htmlReportFile = new File( basedir, "target/site/jacoco-it/index.html" );
if ( !htmlReportFile.isFile() ) {
throw new RuntimeException( "Integration HTML report was not created" );
}
File xmlReportFile = new File( basedir, "target/site/jacoco-it/jacoco.xml" );
if ( !xmlReportFile.isFile() ) {
throw new RuntimeException( "Integration XML report was not created" );
}
File csvReportFile = new File( basedir, "target/site/jacoco-it/jacoco.csv" );
if ( !csvReportFile.isFile() ) {
throw new RuntimeException( "Integration CSV report was not created" );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site/ 0000775 0000000 0000000 00000000000 13421740370 0021567 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site/invoker.properties 0000664 0000000 0000000 00000000166 13421740370 0025365 0 ustar 00root root 0000000 0000000 invoker.goals = clean test site
# maven-site-plugin 3.0 requires at least Maven 2.2.0
invoker.maven.version = 2.2.0+
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site/pom.xml 0000664 0000000 0000000 00000003177 13421740370 0023114 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTit-site@project.groupId@jacoco-maven-pluginprepare-agentorg.apache.maven.pluginsmaven-site-plugin3.3true@project.groupId@jacoco-maven-plugin@project.version@
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site/src/ 0000775 0000000 0000000 00000000000 13421740370 0022356 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site/src/main/ 0000775 0000000 0000000 00000000000 13421740370 0023302 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site/src/main/java/ 0000775 0000000 0000000 00000000000 13421740370 0024223 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site/src/main/java/Example.java 0000664 0000000 0000000 00000001222 13421740370 0026456 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
public class Example {
public void sayHello() {
System.out.println("Hello world");
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site/src/test/ 0000775 0000000 0000000 00000000000 13421740370 0023335 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site/src/test/java/ 0000775 0000000 0000000 00000000000 13421740370 0024256 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site/src/test/java/ExampleTest.java 0000664 0000000 0000000 00000001251 13421740370 0027353 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import org.junit.Test;
public class ExampleTest {
@Test
public void test() {
new Example().sayHello();
}
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/it-site/verify.bsh 0000664 0000000 0000000 00000002612 13421740370 0023572 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
import java.io.*;
import org.codehaus.plexus.util.*;
String projectReportsPage = FileUtils.fileRead( new File( basedir, "target/site/project-reports.html" ) );
if ( projectReportsPage.indexOf( "JaCoCo Coverage Report." ) < 0 ) {
throw new RuntimeException( "project-reports.html does not contain link to JaCoCo report" );
}
File htmlReportFile = new File( basedir, "target/site/jacoco/index.html" );
if ( !htmlReportFile.isFile() ) {
throw new RuntimeException( "HTML report was not created" );
}
File xmlReportFile = new File( basedir, "target/site/jacoco/jacoco.xml" );
if ( !xmlReportFile.isFile() ) {
throw new RuntimeException( "XML report was not created" );
}
File csvReportFile = new File( basedir, "target/site/jacoco/jacoco.csv" );
if ( !csvReportFile.isFile() ) {
throw new RuntimeException( "CSV report was not created" );
}
jacoco-0.8.3/jacoco-maven-plugin.test/it/settings.xml 0000664 0000000 0000000 00000002420 13421740370 0022571 0 ustar 00root root 0000000 0000000
it-repotruelocal.central@localRepositoryUrl@truetruelocal.central@localRepositoryUrl@truetrue
jacoco-0.8.3/jacoco-maven-plugin.test/it/setup-parent/ 0000775 0000000 0000000 00000000000 13421740370 0022640 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin.test/it/setup-parent/invoker.properties 0000664 0000000 0000000 00000000117 13421740370 0026432 0 ustar 00root root 0000000 0000000 invoker.goals = org.jacoco:jacoco-maven-plugin:${project.version}:help install
jacoco-0.8.3/jacoco-maven-plugin.test/it/setup-parent/pom.xml 0000664 0000000 0000000 00000003734 13421740370 0024164 0 ustar 00root root 0000000 0000000
4.0.0jacocosetup-parent1.0-SNAPSHOTpomjunitjunit4.8.2test@project.groupId@jacoco-maven-plugin@project.version@org.apache.maven.pluginsmaven-compiler-plugin2.3.2@maven.compiler.source@@maven.compiler.target@org.apache.maven.pluginsmaven-surefire-plugin2.9org.apache.maven.pluginsmaven-jar-plugin2.3.1
jacoco-0.8.3/jacoco-maven-plugin.test/pom.xml 0000664 0000000 0000000 00000004712 13421740370 0021116 0 ustar 00root root 0000000 0000000
4.0.0org.jacocoorg.jacoco.tests0.8.3../org.jacoco.testsjacoco-maven-plugin.testjarJaCoCo :: Test :: Maven Plugininvoker.mavenOptsorg.jacoco.maven.*org.apache.maven.pluginsmaven-invoker-plugin${skipTests}it${project.build.directory}/it*/pom.xmlverify${project.build.directory}/local-repocleaninstallit/settings.xmlorg.jacoco:org.jacoco.agent:${project.version}:jar:runtimeinstallrun
jacoco-0.8.3/jacoco-maven-plugin/ 0000775 0000000 0000000 00000000000 13421740370 0016617 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin/.classpath 0000664 0000000 0000000 00000001415 13421740370 0020603 0 ustar 00root root 0000000 0000000
jacoco-0.8.3/jacoco-maven-plugin/.project 0000664 0000000 0000000 00000001327 13421740370 0020271 0 ustar 00root root 0000000 0000000
jacoco-maven-pluginorg.eclipse.jdt.core.javabuilderorg.eclipse.m2e.core.maven2Builderorg.eclipse.m2e.core.maven2Natureorg.eclipse.jdt.core.javanature.settings2PARENT-1-PROJECT_LOC/org.jacoco.core/.settings
jacoco-0.8.3/jacoco-maven-plugin/META-INF/ 0000775 0000000 0000000 00000000000 13421740370 0017757 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin/META-INF/m2e/ 0000775 0000000 0000000 00000000000 13421740370 0020442 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin/META-INF/m2e/lifecycle-mapping-metadata.xml 0000664 0000000 0000000 00000002043 13421740370 0026331 0 ustar 00root root 0000000 0000000
prepare-agentprepare-agent-integrationmergereportreport-integrationreport-aggregatecheckdumpinstrumentrestore-instrumented-classes
jacoco-0.8.3/jacoco-maven-plugin/pom.xml 0000664 0000000 0000000 00000010444 13421740370 0020137 0 ustar 00root root 0000000 0000000
4.0.0org.jacocoorg.jacoco.build0.8.3../org.jacoco.buildjacoco-maven-pluginmaven-pluginJaCoCo :: Maven PluginThe JaCoCo Maven Plugin provides the JaCoCo runtime agent to your tests and allows basic report creation.3.0org.apache.maven.reportingmaven-reporting-impl2.1commons-collectionscommons-collections3.2.2org.apache.mavenmaven-plugin-api${project.prerequisites.maven}org.apache.mavenmaven-core${project.prerequisites.maven}org.codehaus.plexusplexus-utils3.0.22org.apache.maven.sharedfile-management1.2.1org.apache.maven.reportingmaven-reporting-api${project.prerequisites.maven}org.apache.maven.reportingmaven-reporting-impl${project.groupId}org.jacoco.agentruntime${project.groupId}org.jacoco.core${project.groupId}org.jacoco.reportorg.apache.maven.plugin-toolsmaven-plugin-annotations3.4providedsrcMETA-INFMETA-INForg.apache.maven.pluginsmaven-plugin-plugindefault-descriptorprocess-classeshelp-goalhelpmojoreportpackagereport
jacoco-0.8.3/jacoco-maven-plugin/src/ 0000775 0000000 0000000 00000000000 13421740370 0017406 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin/src/org/ 0000775 0000000 0000000 00000000000 13421740370 0020175 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/ 0000775 0000000 0000000 00000000000 13421740370 0021433 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/maven/ 0000775 0000000 0000000 00000000000 13421740370 0022541 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/maven/AbstractAgentMojo.java 0000664 0000000 0000000 00000020271 13421740370 0026755 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
package org.jacoco.maven;
import java.io.File;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugins.annotations.Parameter;
import org.codehaus.plexus.util.StringUtils;
import org.jacoco.core.runtime.AgentOptions;
/**
* Base class for preparing a property pointing to the JaCoCo runtime agent that
* can be passed as a VM argument to the application under test.
*/
public abstract class AbstractAgentMojo extends AbstractJacocoMojo {
/**
* Name of the JaCoCo Agent artifact.
*/
static final String AGENT_ARTIFACT_NAME = "org.jacoco:org.jacoco.agent";
/**
* Name of the property used in maven-osgi-test-plugin.
*/
static final String TYCHO_ARG_LINE = "tycho.testArgLine";
/**
* Name of the property used in maven-surefire-plugin.
*/
static final String SUREFIRE_ARG_LINE = "argLine";
/**
* Map of plugin artifacts.
*/
@Parameter(property = "plugin.artifactMap", required = true, readonly = true)
Map pluginArtifactMap;
/**
* Allows to specify property which will contains settings for JaCoCo Agent.
* If not specified, then "argLine" would be used for "jar" packaging and
* "tycho.testArgLine" for "eclipse-test-plugin".
*/
@Parameter(property = "jacoco.propertyName")
String propertyName;
/**
* If set to true and the execution data file already exists, coverage data
* is appended to the existing file. If set to false, an existing execution
* data file will be replaced.
*/
@Parameter(property = "jacoco.append")
Boolean append;
/**
* A list of class names to include in instrumentation. May use wildcard
* characters (* and ?). When not specified everything will be included.
*/
@Parameter
private List includes;
/**
* A list of class names to exclude from instrumentation. May use wildcard
* characters (* and ?). When not specified nothing will be excluded.
*/
@Parameter
private List excludes;
/**
* A list of class loader names, that should be excluded from execution
* analysis. The list entries are separated by a colon (:) and may use
* wildcard characters (* and ?). This option might be required in case of
* special frameworks that conflict with JaCoCo code instrumentation, in
* particular class loaders that do not have access to the Java runtime
* classes.
*/
@Parameter(property = "jacoco.exclClassLoaders")
String exclClassLoaders;
/**
* Specifies whether also classes from the bootstrap classloader should be
* instrumented. Use this feature with caution, it needs heavy
* includes/excludes tuning.
*/
@Parameter(property = "jacoco.inclBootstrapClasses")
Boolean inclBootstrapClasses;
/**
* Specifies whether classes without source location should be instrumented.
*/
@Parameter(property = "jacoco.inclNoLocationClasses")
Boolean inclNoLocationClasses;
/**
* A session identifier that is written with the execution data. Without
* this parameter a random identifier is created by the agent.
*/
@Parameter(property = "jacoco.sessionId")
String sessionId;
/**
* If set to true coverage data will be written on VM shutdown.
*/
@Parameter(property = "jacoco.dumpOnExit")
Boolean dumpOnExit;
/**
* Output method to use for writing coverage data. Valid options are:
*
*
file: At VM termination execution data is written to a file.
*
tcpserver: The agent listens for incoming connections on the TCP port
* specified by the {@link #address} and {@link #port}. Execution data is
* written to this TCP connection.
*
tcpclient: At startup the agent connects to the TCP port specified by
* the {@link #address} and {@link #port}. Execution data is written to this
* TCP connection.
*
none: Do not produce any output.
*
*/
@Parameter(property = "jacoco.output")
String output;
/**
* IP address or hostname to bind to when the output method is tcpserver or
* connect to when the output method is tcpclient. In tcpserver mode the
* value "*" causes the agent to accept connections on any local address.
*/
@Parameter(property = "jacoco.address")
String address;
/**
* Port to bind to when the output method is tcpserver or connect to when
* the output method is tcpclient. In tcpserver mode the port must be
* available, which means that if multiple JaCoCo agents should run on the
* same machine, different ports have to be specified.
*/
@Parameter(property = "jacoco.port")
Integer port;
/**
* If a directory is specified for this parameter the JaCoCo agent dumps all
* class files it processes to the given location. This can be useful for
* debugging purposes or in case of dynamically created classes for example
* when scripting engines are used.
*/
@Parameter(property = "jacoco.classDumpDir")
File classDumpDir;
/**
* If set to true the agent exposes functionality via JMX.
*/
@Parameter(property = "jacoco.jmx")
Boolean jmx;
@Override
public void executeMojo() {
final String name = getEffectivePropertyName();
final Properties projectProperties = getProject().getProperties();
final String oldValue = projectProperties.getProperty(name);
final String newValue = createAgentOptions().prependVMArguments(
oldValue, getAgentJarFile());
getLog().info(name + " set to " + newValue);
projectProperties.setProperty(name, newValue);
}
@Override
protected void skipMojo() {
final String name = getEffectivePropertyName();
final Properties projectProperties = getProject().getProperties();
final String oldValue = projectProperties.getProperty(name);
if (oldValue == null) {
getLog().info(name + " set to empty");
projectProperties.setProperty(name, "");
}
}
File getAgentJarFile() {
final Artifact jacocoAgentArtifact = pluginArtifactMap
.get(AGENT_ARTIFACT_NAME);
return jacocoAgentArtifact.getFile();
}
AgentOptions createAgentOptions() {
final AgentOptions agentOptions = new AgentOptions();
agentOptions.setDestfile(getDestFile().getAbsolutePath());
if (append != null) {
agentOptions.setAppend(append.booleanValue());
}
if (includes != null && !includes.isEmpty()) {
agentOptions
.setIncludes(StringUtils.join(includes.iterator(), ":"));
}
if (excludes != null && !excludes.isEmpty()) {
agentOptions
.setExcludes(StringUtils.join(excludes.iterator(), ":"));
}
if (exclClassLoaders != null) {
agentOptions.setExclClassloader(exclClassLoaders);
}
if (inclBootstrapClasses != null) {
agentOptions.setInclBootstrapClasses(inclBootstrapClasses
.booleanValue());
}
if (inclNoLocationClasses != null) {
agentOptions.setInclNoLocationClasses(inclNoLocationClasses
.booleanValue());
}
if (sessionId != null) {
agentOptions.setSessionId(sessionId);
}
if (dumpOnExit != null) {
agentOptions.setDumpOnExit(dumpOnExit.booleanValue());
}
if (output != null) {
agentOptions.setOutput(output);
}
if (address != null) {
agentOptions.setAddress(address);
}
if (port != null) {
agentOptions.setPort(port.intValue());
}
if (classDumpDir != null) {
agentOptions.setClassDumpDir(classDumpDir.getAbsolutePath());
}
if (jmx != null) {
agentOptions.setJmx(jmx.booleanValue());
}
return agentOptions;
}
String getEffectivePropertyName() {
if (isPropertyNameSpecified()) {
return propertyName;
}
if (isEclipseTestPluginPackaging()) {
return TYCHO_ARG_LINE;
}
return SUREFIRE_ARG_LINE;
}
boolean isPropertyNameSpecified() {
return propertyName != null && !"".equals(propertyName);
}
boolean isEclipseTestPluginPackaging() {
return "eclipse-test-plugin".equals(getProject().getPackaging());
}
/**
* @return the destFile
*/
abstract File getDestFile();
}
jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/maven/AbstractJacocoMojo.java 0000664 0000000 0000000 00000004106 13421740370 0027114 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
package org.jacoco.maven;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
/**
* Base class for JaCoCo Mojos.
*/
public abstract class AbstractJacocoMojo extends AbstractMojo {
/**
* Maven project.
*/
@Parameter(property = "project", readonly = true)
private MavenProject project;
/**
* Flag used to suppress execution.
*/
@Parameter(property = "jacoco.skip", defaultValue = "false")
private boolean skip;
public final void execute() throws MojoExecutionException,
MojoFailureException {
if (skip) {
getLog().info(
"Skipping JaCoCo execution because property jacoco.skip is set.");
skipMojo();
return;
}
executeMojo();
}
/**
* Executes Mojo.
*
* @throws MojoExecutionException
* if an unexpected problem occurs. Throwing this exception
* causes a "BUILD ERROR" message to be displayed.
* @throws MojoFailureException
* if an expected problem (such as a compilation failure)
* occurs. Throwing this exception causes a "BUILD FAILURE"
* message to be displayed.
*/
protected abstract void executeMojo() throws MojoExecutionException,
MojoFailureException;
/**
* Skips Mojo.
*/
protected void skipMojo() {
}
/**
* @return Maven project
*/
protected final MavenProject getProject() {
return project;
}
}
jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/maven/AbstractReportMojo.java 0000664 0000000 0000000 00000012036 13421740370 0027172 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
package org.jacoco.maven;
import java.io.IOException;
import java.util.List;
import java.util.Locale;
import org.apache.maven.doxia.siterenderer.Renderer;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.apache.maven.reporting.AbstractMavenReport;
import org.apache.maven.reporting.MavenReportException;
import org.jacoco.report.IReportGroupVisitor;
import org.jacoco.report.IReportVisitor;
/**
* Base class for creating a code coverage report for tests of a single project
* in multiple formats (HTML, XML, and CSV).
*/
public abstract class AbstractReportMojo extends AbstractMavenReport {
/**
* Encoding of the generated reports.
*/
@Parameter(property = "project.reporting.outputEncoding", defaultValue = "UTF-8")
String outputEncoding;
/**
* Name of the root node HTML report pages.
*
* @since 0.7.7
*/
@Parameter(defaultValue = "${project.name}")
String title;
/**
* Footer text used in HTML report pages.
*
* @since 0.7.7
*/
@Parameter
String footer;
/**
* Encoding of the source files.
*/
@Parameter(property = "project.build.sourceEncoding", defaultValue = "UTF-8")
String sourceEncoding;
/**
* A list of class files to include in the report. May use wildcard
* characters (* and ?). When not specified everything will be included.
*/
@Parameter
List includes;
/**
* A list of class files to exclude from the report. May use wildcard
* characters (* and ?). When not specified nothing will be excluded.
*/
@Parameter
List excludes;
/**
* Flag used to suppress execution.
*/
@Parameter(property = "jacoco.skip", defaultValue = "false")
boolean skip;
/**
* Maven project.
*/
@Parameter(property = "project", readonly = true)
MavenProject project;
/**
* Doxia Site Renderer.
*/
@Component
Renderer siteRenderer;
public String getDescription(final Locale locale) {
return getName(locale) + " Coverage Report.";
}
@Override
public boolean isExternalReport() {
return true;
}
@Override
protected MavenProject getProject() {
return project;
}
@Override
protected Renderer getSiteRenderer() {
return siteRenderer;
}
/**
* Returns the list of class files to include in the report.
*
* @return class files to include, may contain wildcard characters
*/
List getIncludes() {
return includes;
}
/**
* Returns the list of class files to exclude from the report.
*
* @return class files to exclude, may contain wildcard characters
*/
List getExcludes() {
return excludes;
}
@Override
public boolean canGenerateReport() {
if (skip) {
getLog().info(
"Skipping JaCoCo execution because property jacoco.skip is set.");
return false;
}
if (!canGenerateReportRegardingDataFiles()) {
getLog().info(
"Skipping JaCoCo execution due to missing execution data file.");
return false;
}
if (!canGenerateReportRegardingClassesDirectory()) {
getLog().info(
"Skipping JaCoCo execution due to missing classes directory.");
return false;
}
return true;
}
abstract boolean canGenerateReportRegardingDataFiles();
abstract boolean canGenerateReportRegardingClassesDirectory();
/**
* This method is called when the report generation is invoked directly as a
* standalone Mojo.
*/
@Override
public void execute() throws MojoExecutionException {
if (!canGenerateReport()) {
return;
}
try {
executeReport(Locale.getDefault());
} catch (final MavenReportException e) {
throw new MojoExecutionException("An error has occurred in "
+ getName(Locale.ENGLISH) + " report generation.", e);
}
}
@Override
protected void executeReport(final Locale locale)
throws MavenReportException {
try {
final ReportSupport support = new ReportSupport(getLog());
loadExecutionData(support);
addFormatters(support, locale);
final IReportVisitor visitor = support.initRootVisitor();
createReport(visitor, support);
visitor.visitEnd();
} catch (final IOException e) {
throw new MavenReportException("Error while creating report: "
+ e.getMessage(), e);
}
}
abstract void loadExecutionData(final ReportSupport support)
throws IOException;
abstract void addFormatters(final ReportSupport support, final Locale locale)
throws IOException;
abstract void createReport(final IReportGroupVisitor visitor,
final ReportSupport support) throws IOException;
}
jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/maven/AgentITMojo.java 0000664 0000000 0000000 00000003146 13421740370 0025530 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
*
*******************************************************************************/
package org.jacoco.maven;
import java.io.File;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
/**
* Same as prepare-agent, but provides default values suitable for
* integration-tests:
*
*
bound to pre-integration-test phase
*
different destFile
*
*
* @since 0.6.4
*/
@Mojo(name = "prepare-agent-integration", defaultPhase = LifecyclePhase.PRE_INTEGRATION_TEST, requiresDependencyResolution = ResolutionScope.RUNTIME, threadSafe = true)
public class AgentITMojo extends AbstractAgentMojo {
/**
* Path to the output file for execution data.
*/
@Parameter(property = "jacoco.destFile", defaultValue = "${project.build.directory}/jacoco-it.exec")
private File destFile;
/**
* @return the destFile
*/
@Override
File getDestFile() {
return destFile;
}
}
jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/maven/AgentMojo.java 0000664 0000000 0000000 00000006413 13421740370 0025273 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
package org.jacoco.maven;
import java.io.File;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
/**
*
* Prepares a property pointing to the JaCoCo runtime agent that can be passed
* as a VM argument to the application under test. Depending on the project
* packaging type by default a property with the following name is set:
*
*
*
*
tycho.testArgLine for packaging type eclipse-test-plugin and
*
argLine otherwise.
*
*
*
* If your project already defines VM arguments for test execution, be sure that
* they will include property defined by JaCoCo.
*
*
*
* One of the ways to do this in case of maven-surefire-plugin - is to use
* syntax for late property evaluation:
*
* You can define empty property to avoid JVM startup error Could not find or load main class @{argLine}
* when using late property evaluation and jacoco-maven-plugin not executed.
*
*
*
* Another way is to define "argLine" as a Maven property rather than
* as part of the configuration of maven-surefire-plugin:
*
* Resulting coverage information is collected during execution and by default
* written to a file when the process terminates.
*
*
* @since 0.5.3
*/
@Mojo(name = "prepare-agent", defaultPhase = LifecyclePhase.INITIALIZE, requiresDependencyResolution = ResolutionScope.RUNTIME, threadSafe = true)
public class AgentMojo extends AbstractAgentMojo {
/**
* Path to the output file for execution data.
*/
@Parameter(property = "jacoco.destFile", defaultValue = "${project.build.directory}/jacoco.exec")
private File destFile;
/**
* @return the destFile
*/
@Override
File getDestFile() {
return destFile;
}
}
jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/maven/CheckMojo.java 0000664 0000000 0000000 00000014053 13421740370 0025251 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
* Marc Hoffmann - redesign using report APIs
*
*******************************************************************************/
package org.jacoco.maven;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.jacoco.core.analysis.ICoverageNode;
import org.jacoco.report.IReportVisitor;
import org.jacoco.report.check.IViolationsOutput;
import org.jacoco.report.check.Limit;
import org.jacoco.report.check.Rule;
/**
* Checks that the code coverage metrics are being met.
*
* @since 0.6.1
*/
@Mojo(name = "check", defaultPhase = LifecyclePhase.VERIFY, threadSafe = true)
public class CheckMojo extends AbstractJacocoMojo implements IViolationsOutput {
private static final String MSG_SKIPPING = "Skipping JaCoCo execution due to missing execution data file:";
private static final String CHECK_SUCCESS = "All coverage checks have been met.";
private static final String CHECK_FAILED = "Coverage checks have not been met. See log for details.";
/**
*
* Check configuration used to specify rules on element types (BUNDLE,
* PACKAGE, CLASS, SOURCEFILE or METHOD) with a list of limits. Each limit
* applies to a certain counter (INSTRUCTION, LINE, BRANCH, COMPLEXITY,
* METHOD, CLASS) and defines a minimum or maximum for the corresponding
* value (TOTALCOUNT, COVEREDCOUNT, MISSEDCOUNT, COVEREDRATIO, MISSEDRATIO).
* If a limit refers to a ratio the range is from 0.0 to 1.0 where the
* number of decimal places will also determine the precision in error
* messages. A limit ratio may optionally be declared as a percentage
* where 0.80 and 80% represent the same value, the value must end with %.
*
*
*
* If not specified the following defaults are assumed:
*
*
*
*
rule element: BUNDLE
*
limit counter: INSTRUCTION
*
limit value: COVEREDRATIO
*
*
*
* This example requires an overall instruction coverage of 80% and no class
* must be missed:
*
*/
@Parameter(required = true)
private List rules;
/**
* Halt the build if any of the checks fail.
*/
@Parameter(property = "jacoco.haltOnFailure", defaultValue = "true", required = true)
private boolean haltOnFailure;
/**
* File with execution data.
*/
@Parameter(defaultValue = "${project.build.directory}/jacoco.exec")
private File dataFile;
/**
* A list of class files to include into analysis. May use wildcard
* characters (* and ?). When not specified everything will be included.
*/
@Parameter
private List includes;
/**
* A list of class files to exclude from analysis. May use wildcard
* characters (* and ?). When not specified nothing will be excluded.
*/
@Parameter
private List excludes;
private boolean violations;
private boolean canCheckCoverage() {
if (!dataFile.exists()) {
getLog().info(MSG_SKIPPING + dataFile);
return false;
}
final File classesDirectory = new File(getProject().getBuild()
.getOutputDirectory());
if (!classesDirectory.exists()) {
getLog().info(
"Skipping JaCoCo execution due to missing classes directory:"
+ classesDirectory);
return false;
}
return true;
}
@Override
public void executeMojo() throws MojoExecutionException,
MojoExecutionException {
if (!canCheckCoverage()) {
return;
}
executeCheck();
}
private void executeCheck() throws MojoExecutionException {
violations = false;
final ReportSupport support = new ReportSupport(getLog());
final List checkerrules = new ArrayList();
for (final RuleConfiguration r : rules) {
checkerrules.add(r.rule);
}
support.addRulesChecker(checkerrules, this);
try {
final IReportVisitor visitor = support.initRootVisitor();
support.loadExecutionData(dataFile);
support.processProject(visitor, getProject(), includes, excludes);
visitor.visitEnd();
} catch (final IOException e) {
throw new MojoExecutionException(
"Error while checking code coverage: " + e.getMessage(), e);
}
if (violations) {
if (this.haltOnFailure) {
throw new MojoExecutionException(CHECK_FAILED);
} else {
this.getLog().warn(CHECK_FAILED);
}
} else {
this.getLog().info(CHECK_SUCCESS);
}
}
public void onViolation(final ICoverageNode node, final Rule rule,
final Limit limit, final String message) {
this.getLog().warn(message);
violations = true;
}
}
jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/maven/DumpMojo.java 0000664 0000000 0000000 00000007354 13421740370 0025147 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Chas Honton, Marc R. Hoffmann - initial implementation
*
*******************************************************************************/
package org.jacoco.maven;
import static java.lang.String.format;
import java.io.File;
import java.io.IOException;
import java.net.InetAddress;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.jacoco.core.tools.ExecDumpClient;
import org.jacoco.core.tools.ExecFileLoader;
/**
*
* Request a dump over TCP/IP from a JaCoCo agent running in
* tcpserver mode.
*
*
*
* Note concerning parallel builds: While the dump goal as such is thread safe,
* it has to be considered that TCP/IP server ports of the agents are a shared
* resource.
*
*
* @since 0.6.4
*/
@Mojo(name = "dump", defaultPhase = LifecyclePhase.POST_INTEGRATION_TEST, threadSafe = true)
public class DumpMojo extends AbstractJacocoMojo {
/**
* Path to the output file for execution data.
*/
@Parameter(property = "jacoco.destFile", defaultValue = "${project.build.directory}/jacoco.exec")
private File destFile;
/**
* If set to true and the execution data file already exists, coverage data
* is appended to the existing file. If set to false, an existing execution
* data file will be replaced.
*/
@Parameter(property = "jacoco.append", defaultValue = "true")
private boolean append;
/**
* Sets whether execution data should be downloaded from the remote host.
*/
@Parameter(property = "jacoco.dump", defaultValue = "true")
private boolean dump;
/**
* Sets whether a reset command should be sent after the execution data has
* been dumped.
*/
@Parameter(property = "jacoco.reset", defaultValue = "false")
private boolean reset;
/**
* IP address or hostname to connect to.
*/
@Parameter(property = "jacoco.address")
private String address;
/**
* Port number to connect to. If multiple JaCoCo agents should run on the
* same machine, different ports have to be specified for the agents.
*/
@Parameter(property = "jacoco.port", defaultValue = "6300")
private int port;
/**
* Number of retries which the goal will attempt to establish a connection.
* This can be used to wait until the target JVM is successfully launched.
*/
@Parameter(property = "jacoco.retryCount", defaultValue = "10")
private int retryCount;
@Override
public void executeMojo() throws MojoExecutionException {
final ExecDumpClient client = new ExecDumpClient() {
@Override
protected void onConnecting(final InetAddress address,
final int port) {
getLog().info(
format("Connecting to %s:%s", address,
Integer.valueOf(port)));
}
@Override
protected void onConnectionFailure(final IOException exception) {
getLog().info(exception.getMessage());
}
};
client.setDump(dump);
client.setReset(reset);
client.setRetryCount(retryCount);
try {
final ExecFileLoader loader = client.dump(address, port);
if (dump) {
getLog().info(
format("Dumping execution data to %s",
destFile.getAbsolutePath()));
loader.save(destFile, append);
}
} catch (final IOException e) {
throw new MojoExecutionException("Unable to dump coverage data", e);
}
}
}
jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/maven/FileFilter.java 0000664 0000000 0000000 00000005247 13421740370 0025441 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
*
*******************************************************************************/
package org.jacoco.maven;
import java.io.File;
import java.io.IOException;
import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.StringUtils;
/**
* A file filter using includes/excludes patterns.
*/
public class FileFilter {
private static final String DEFAULT_INCLUDES = "**";
private static final String DEFAULT_EXCLUDES = "";
private final List includes;
private final List excludes;
/**
* Construct a new FileFilter
*
* @param includes
* list of includes patterns
* @param excludes
* list of excludes patterns
*/
public FileFilter(final List includes, final List excludes) {
this.includes = includes;
this.excludes = excludes;
}
/**
* Returns a list of file names.
*
* @param directory
* the directory to scan
* @return a list of files
* @throws IOException
* if file system access fails
*/
public List getFileNames(final File directory) throws IOException {
return FileUtils.getFileNames(directory, getIncludes(), getExcludes(),
false);
}
/**
* Returns a list of files.
*
* @param directory
* the directory to scan
* @return a list of files
* @throws IOException
* if file system access fails
*/
public List getFiles(final File directory) throws IOException {
return FileUtils.getFiles(directory, getIncludes(), getExcludes());
}
/**
* Get the includes pattern
*
* @return the pattern
*/
public String getIncludes() {
return this.buildPattern(this.includes, DEFAULT_INCLUDES);
}
/**
* Get the excludes pattern
*
* @return the pattern
*/
public String getExcludes() {
return this.buildPattern(this.excludes, DEFAULT_EXCLUDES);
}
private String buildPattern(final List patterns,
final String defaultPattern) {
String pattern = defaultPattern;
if (CollectionUtils.isNotEmpty(patterns)) {
pattern = StringUtils.join(patterns.iterator(), ",");
}
return pattern;
}
}
jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/maven/InstrumentMojo.java 0000664 0000000 0000000 00000007455 13421740370 0026414 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
package org.jacoco.maven;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.IOUtil;
import org.jacoco.core.instr.Instrumenter;
import org.jacoco.core.runtime.OfflineInstrumentationAccessGenerator;
/**
* Performs offline instrumentation. Note that after execution of test you must
* restore original classes with help of "restore-instrumented-classes" goal.
*
* Warning: The preferred way for code coverage analysis with
* JaCoCo is on-the-fly instrumentation. Offline instrumentation has several
* drawbacks and should only be used if a specific scenario explicitly requires
* this mode. Please consult documentation about
* offline instrumentation before using this mode.
*
*
* @since 0.6.2
*/
@Mojo(name = "instrument", defaultPhase = LifecyclePhase.PROCESS_CLASSES, threadSafe = true)
public class InstrumentMojo extends AbstractJacocoMojo {
/**
* A list of class files to include in instrumentation. May use wildcard
* characters (* and ?). When not specified everything will be included.
*/
@Parameter
private List includes;
/**
* A list of class files to exclude from instrumentation. May use wildcard
* characters (* and ?). When not specified nothing will be excluded.
*/
@Parameter
private List excludes;
@Override
public void executeMojo() throws MojoExecutionException,
MojoFailureException {
final File originalClassesDir = new File(getProject().getBuild()
.getDirectory(), "generated-classes/jacoco");
originalClassesDir.mkdirs();
final File classesDir = new File(
getProject().getBuild().getOutputDirectory());
if (!classesDir.exists()) {
getLog().info(
"Skipping JaCoCo execution due to missing classes directory:" +
classesDir);
return;
}
final List fileNames;
try {
fileNames = new FileFilter(includes, excludes)
.getFileNames(classesDir);
} catch (final IOException e1) {
throw new MojoExecutionException(
"Unable to get list of files to instrument.", e1);
}
final Instrumenter instrumenter = new Instrumenter(
new OfflineInstrumentationAccessGenerator());
for (final String fileName : fileNames) {
if (fileName.endsWith(".class")) {
final File source = new File(classesDir, fileName);
final File backup = new File(originalClassesDir, fileName);
InputStream input = null;
OutputStream output = null;
try {
FileUtils.copyFile(source, backup);
input = new FileInputStream(backup);
output = new FileOutputStream(source);
instrumenter.instrument(input, output, source.getPath());
} catch (final IOException e2) {
throw new MojoExecutionException(
"Unable to instrument file.", e2);
} finally {
IOUtil.close(input);
IOUtil.close(output);
}
}
}
}
}
jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/maven/MergeMojo.java 0000664 0000000 0000000 00000007260 13421740370 0025275 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Mads Mohr Christensen - implementation of MergeMojo
*
*******************************************************************************/
package org.jacoco.maven;
import java.io.File;
import java.io.IOException;
import java.util.List;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.shared.model.fileset.FileSet;
import org.apache.maven.shared.model.fileset.util.FileSetManager;
import org.jacoco.core.tools.ExecFileLoader;
/**
* Mojo for merging a set of execution data files (*.exec) into a single file
*
* @since 0.6.4
*/
@Mojo(name = "merge", defaultPhase = LifecyclePhase.GENERATE_RESOURCES, threadSafe = true)
public class MergeMojo extends AbstractJacocoMojo {
private static final String MSG_SKIPPING = "Skipping JaCoCo merge execution due to missing execution data files";
/**
* Path to the output file for execution data.
*/
@Parameter(property = "jacoco.destFile", defaultValue = "${project.build.directory}/jacoco.exec")
private File destFile;
/**
* This mojo accepts any number of execution data file sets.
*
*
*/
@Parameter(required = true)
private List fileSets;
@Override
protected void executeMojo() throws MojoExecutionException,
MojoFailureException {
if (!canMergeReports()) {
return;
}
executeMerge();
}
private boolean canMergeReports() {
if (fileSets == null || fileSets.isEmpty()) {
getLog().info(MSG_SKIPPING);
return false;
}
return true;
}
private void executeMerge() throws MojoExecutionException {
final ExecFileLoader loader = new ExecFileLoader();
load(loader);
save(loader);
}
private void load(final ExecFileLoader loader)
throws MojoExecutionException {
final FileSetManager fileSetManager = new FileSetManager(getLog());
for (final FileSet fileSet : fileSets) {
for (final String includedFilename : fileSetManager
.getIncludedFiles(fileSet)) {
final File inputFile = new File(fileSet.getDirectory(),
includedFilename);
if (inputFile.isDirectory()) {
continue;
}
try {
getLog().info(
"Loading execution data file "
+ inputFile.getAbsolutePath());
loader.load(inputFile);
} catch (final IOException e) {
throw new MojoExecutionException("Unable to read "
+ inputFile.getAbsolutePath(), e);
}
}
}
}
private void save(final ExecFileLoader loader)
throws MojoExecutionException {
if (loader.getExecutionDataStore().getContents().isEmpty()) {
getLog().info(MSG_SKIPPING);
return;
}
getLog().info(
"Writing merged execution data to "
+ destFile.getAbsolutePath());
try {
loader.save(destFile, false);
} catch (final IOException e) {
throw new MojoExecutionException("Unable to write merged file "
+ destFile.getAbsolutePath(), e);
}
}
}
jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/maven/ReportAggregateMojo.java 0000664 0000000 0000000 00000015751 13421740370 0027324 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* John Oliver, Marc R. Hoffmann, Jan Wloka - initial API and implementation
*
*******************************************************************************/
package org.jacoco.maven;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
import org.apache.maven.artifact.versioning.VersionRange;
import org.apache.maven.model.Dependency;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.jacoco.report.IReportGroupVisitor;
/**
*
* Creates a structured code coverage report (HTML, XML, and CSV) from multiple
* projects within reactor. The report is created from all modules this project
* depends on. From those projects class and source files as well as JaCoCo
* execution data files will be collected. In addition execution data is
* collected from the project itself. This also allows to create coverage
* reports when tests are in separate projects than the code under test, for
* example in case of integration tests.
*
*
*
* Using the dependency scope allows to distinguish projects which contribute
* execution data but should not become part of the report:
*
*
*
*
compile, runtime, provided:
* Project source and execution data is included in the report.
*
test: Only execution data is considered for the report.
*
*
* @since 0.7.7
*/
@Mojo(name = "report-aggregate", threadSafe = true)
public class ReportAggregateMojo extends AbstractReportMojo {
/**
* A list of execution data files to include in the report from each
* project. May use wildcard characters (* and ?). When not specified all
* *.exec files from the target folder will be included.
*/
@Parameter
List dataFileIncludes;
/**
* A list of execution data files to exclude from the report. May use
* wildcard characters (* and ?). When not specified nothing will be
* excluded.
*/
@Parameter
List dataFileExcludes;
/**
* Output directory for the reports. Note that this parameter is only
* relevant if the goal is run from the command line or from the default
* build lifecycle. If the goal is run indirectly as part of a site
* generation, the output directory configured in the Maven Site Plugin is
* used instead.
*/
@Parameter(defaultValue = "${project.reporting.outputDirectory}/jacoco-aggregate")
private File outputDirectory;
/**
* The projects in the reactor.
*/
@Parameter(property = "reactorProjects", readonly = true)
private List reactorProjects;
@Override
boolean canGenerateReportRegardingDataFiles() {
return true;
}
@Override
boolean canGenerateReportRegardingClassesDirectory() {
return true;
}
@Override
void loadExecutionData(final ReportSupport support) throws IOException {
// https://issues.apache.org/jira/browse/MNG-5440
if (dataFileIncludes == null) {
dataFileIncludes = Arrays.asList("target/*.exec");
}
final FileFilter filter = new FileFilter(dataFileIncludes,
dataFileExcludes);
loadExecutionData(support, filter, getProject().getBasedir());
for (final MavenProject dependency : findDependencies(
Artifact.SCOPE_COMPILE, Artifact.SCOPE_RUNTIME,
Artifact.SCOPE_PROVIDED, Artifact.SCOPE_TEST)) {
loadExecutionData(support, filter, dependency.getBasedir());
}
}
private void loadExecutionData(final ReportSupport support,
final FileFilter filter, final File basedir) throws IOException {
for (final File execFile : filter.getFiles(basedir)) {
support.loadExecutionData(execFile);
}
}
@Override
void addFormatters(final ReportSupport support, final Locale locale)
throws IOException {
support.addAllFormatters(outputDirectory, outputEncoding, footer,
locale);
}
@Override
void createReport(final IReportGroupVisitor visitor,
final ReportSupport support) throws IOException {
final IReportGroupVisitor group = visitor.visitGroup(title);
for (final MavenProject dependency : findDependencies(
Artifact.SCOPE_COMPILE, Artifact.SCOPE_RUNTIME,
Artifact.SCOPE_PROVIDED)) {
support.processProject(group, dependency.getArtifactId(),
dependency, getIncludes(), getExcludes(), sourceEncoding);
}
}
@Override
protected String getOutputDirectory() {
return outputDirectory.getAbsolutePath();
}
@Override
public void setReportOutputDirectory(final File reportOutputDirectory) {
if (reportOutputDirectory != null
&& !reportOutputDirectory.getAbsolutePath().endsWith(
"jacoco-aggregate")) {
outputDirectory = new File(reportOutputDirectory,
"jacoco-aggregate");
} else {
outputDirectory = reportOutputDirectory;
}
}
public String getOutputName() {
return "jacoco-aggregate/index";
}
public String getName(final Locale locale) {
return "JaCoCo Aggregate";
}
private List findDependencies(final String... scopes) {
final List result = new ArrayList();
final List scopeList = Arrays.asList(scopes);
for (final Object dependencyObject : getProject().getDependencies()) {
final Dependency dependency = (Dependency) dependencyObject;
if (scopeList.contains(dependency.getScope())) {
final MavenProject project = findProjectFromReactor(dependency);
if (project != null) {
result.add(project);
}
}
}
return result;
}
/**
* Note that if dependency specified using version range and reactor
* contains multiple modules with same artifactId and groupId but of
* different versions, then first dependency which matches range will be
* selected. For example in case of range [0,2] if version 1 is
* before version 2 in reactor, then version 1 will be selected.
*/
private MavenProject findProjectFromReactor(final Dependency d) {
final VersionRange depVersionAsRange;
try {
depVersionAsRange = VersionRange
.createFromVersionSpec(d.getVersion());
} catch (InvalidVersionSpecificationException e) {
throw new AssertionError(e);
}
for (final MavenProject p : reactorProjects) {
final DefaultArtifactVersion pv = new DefaultArtifactVersion(
p.getVersion());
if (p.getGroupId().equals(d.getGroupId())
&& p.getArtifactId().equals(d.getArtifactId())
&& depVersionAsRange.containsVersion(pv)) {
return p;
}
}
return null;
}
}
jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/maven/ReportITMojo.java 0000664 0000000 0000000 00000006236 13421740370 0025750 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
*
*******************************************************************************/
package org.jacoco.maven;
import java.io.File;
import java.io.IOException;
import java.util.Locale;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.jacoco.report.IReportGroupVisitor;
/**
* Same as report, but provides default values suitable for
* integration-tests:
*
*
bound to report-integration phase
*
different dataFile
*
*
* @since 0.6.4
*/
@Mojo(name = "report-integration", defaultPhase = LifecyclePhase.VERIFY, threadSafe = true)
public class ReportITMojo extends AbstractReportMojo {
/**
* Output directory for the reports. Note that this parameter is only
* relevant if the goal is run from the command line or from the default
* build lifecycle. If the goal is run indirectly as part of a site
* generation, the output directory configured in the Maven Site Plugin is
* used instead.
*/
@Parameter(defaultValue = "${project.reporting.outputDirectory}/jacoco-it")
private File outputDirectory;
/**
* File with execution data.
*/
@Parameter(defaultValue = "${project.build.directory}/jacoco-it.exec")
private File dataFile;
@Override
boolean canGenerateReportRegardingDataFiles() {
return dataFile.exists();
}
@Override
boolean canGenerateReportRegardingClassesDirectory() {
return new File(getProject().getBuild().getOutputDirectory()).exists();
}
@Override
void loadExecutionData(final ReportSupport support) throws IOException {
support.loadExecutionData(dataFile);
}
@Override
void addFormatters(final ReportSupport support, final Locale locale)
throws IOException {
support.addAllFormatters(outputDirectory, outputEncoding, footer,
locale);
}
@Override
void createReport(final IReportGroupVisitor visitor,
final ReportSupport support) throws IOException {
support.processProject(visitor, title, getProject(), getIncludes(),
getExcludes(), sourceEncoding);
}
@Override
protected String getOutputDirectory() {
return outputDirectory.getAbsolutePath();
}
@Override
public void setReportOutputDirectory(final File reportOutputDirectory) {
if (reportOutputDirectory != null
&& !reportOutputDirectory.getAbsolutePath().endsWith(
"jacoco-it")) {
outputDirectory = new File(reportOutputDirectory, "jacoco-it");
} else {
outputDirectory = reportOutputDirectory;
}
}
public String getOutputName() {
return "jacoco-it/index";
}
public String getName(final Locale locale) {
return "JaCoCo IT";
}
}
jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/maven/ReportMojo.java 0000664 0000000 0000000 00000005773 13421740370 0025520 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
package org.jacoco.maven;
import java.io.File;
import java.io.IOException;
import java.util.Locale;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.jacoco.report.IReportGroupVisitor;
/**
* Creates a code coverage report for tests of a single project in multiple
* formats (HTML, XML, and CSV).
*
* @since 0.5.3
*/
@Mojo(name = "report", defaultPhase = LifecyclePhase.VERIFY, threadSafe = true)
public class ReportMojo extends AbstractReportMojo {
/**
* Output directory for the reports. Note that this parameter is only
* relevant if the goal is run from the command line or from the default
* build lifecycle. If the goal is run indirectly as part of a site
* generation, the output directory configured in the Maven Site Plugin is
* used instead.
*/
@Parameter(defaultValue = "${project.reporting.outputDirectory}/jacoco")
private File outputDirectory;
/**
* File with execution data.
*/
@Parameter(property = "jacoco.dataFile", defaultValue = "${project.build.directory}/jacoco.exec")
private File dataFile;
@Override
boolean canGenerateReportRegardingDataFiles() {
return dataFile.exists();
}
@Override
boolean canGenerateReportRegardingClassesDirectory() {
return new File(getProject().getBuild().getOutputDirectory()).exists();
}
@Override
void loadExecutionData(final ReportSupport support) throws IOException {
support.loadExecutionData(dataFile);
}
@Override
void addFormatters(final ReportSupport support, final Locale locale)
throws IOException {
support.addAllFormatters(outputDirectory, outputEncoding, footer,
locale);
}
@Override
void createReport(final IReportGroupVisitor visitor,
final ReportSupport support) throws IOException {
support.processProject(visitor, title, getProject(), getIncludes(),
getExcludes(), sourceEncoding);
}
@Override
protected String getOutputDirectory() {
return outputDirectory.getAbsolutePath();
}
@Override
public void setReportOutputDirectory(final File reportOutputDirectory) {
if (reportOutputDirectory != null
&& !reportOutputDirectory.getAbsolutePath().endsWith("jacoco")) {
outputDirectory = new File(reportOutputDirectory, "jacoco");
} else {
outputDirectory = reportOutputDirectory;
}
}
public String getOutputName() {
return "jacoco/index";
}
public String getName(final Locale locale) {
return "JaCoCo";
}
}
jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/maven/ReportSupport.java 0000664 0000000 0000000 00000022742 13421740370 0026263 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
*
*******************************************************************************/
package org.jacoco.maven;
import static java.lang.String.format;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.project.MavenProject;
import org.jacoco.core.analysis.Analyzer;
import org.jacoco.core.analysis.CoverageBuilder;
import org.jacoco.core.analysis.IBundleCoverage;
import org.jacoco.core.analysis.IClassCoverage;
import org.jacoco.core.tools.ExecFileLoader;
import org.jacoco.report.FileMultiReportOutput;
import org.jacoco.report.IReportGroupVisitor;
import org.jacoco.report.IReportVisitor;
import org.jacoco.report.ISourceFileLocator;
import org.jacoco.report.MultiReportVisitor;
import org.jacoco.report.check.IViolationsOutput;
import org.jacoco.report.check.Rule;
import org.jacoco.report.check.RulesChecker;
import org.jacoco.report.csv.CSVFormatter;
import org.jacoco.report.html.HTMLFormatter;
import org.jacoco.report.xml.XMLFormatter;
/**
* Encapsulates the tasks to create reports for Maven projects. Instances are
* supposed to be used in the following sequence:
*
*
*
Create an instance
*
Load one or multiple exec files with loadExecutionData()
*
Add one or multiple formatters with addXXX() methods
*
Create the root visitor with initRootVisitor()
*
Process one or multiple projects with processProject()
*
*/
final class ReportSupport {
private final Log log;
private final ExecFileLoader loader;
private final List formatters;
/**
* Construct a new instance with the given log output.
*
* @param log
* for log output
*/
public ReportSupport(final Log log) {
this.log = log;
this.loader = new ExecFileLoader();
this.formatters = new ArrayList();
}
/**
* Loads the given execution data file.
*
* @param execFile
* execution data file to load
* @throws IOException
* if the file can't be loaded
*/
public void loadExecutionData(final File execFile) throws IOException {
log.info("Loading execution data file " + execFile);
loader.load(execFile);
}
public void addXmlFormatter(final File targetfile, final String encoding)
throws IOException {
final XMLFormatter xml = new XMLFormatter();
xml.setOutputEncoding(encoding);
formatters.add(xml.createVisitor(new FileOutputStream(targetfile)));
}
public void addCsvFormatter(final File targetfile, final String encoding)
throws IOException {
final CSVFormatter csv = new CSVFormatter();
csv.setOutputEncoding(encoding);
formatters.add(csv.createVisitor(new FileOutputStream(targetfile)));
}
public void addHtmlFormatter(final File targetdir, final String encoding,
final String footer, final Locale locale) throws IOException {
final HTMLFormatter htmlFormatter = new HTMLFormatter();
htmlFormatter.setOutputEncoding(encoding);
htmlFormatter.setLocale(locale);
if (footer != null) {
htmlFormatter.setFooterText(footer);
}
formatters.add(htmlFormatter.createVisitor(new FileMultiReportOutput(
targetdir)));
}
public void addAllFormatters(final File targetdir, final String encoding,
final String footer, final Locale locale) throws IOException {
targetdir.mkdirs();
addXmlFormatter(new File(targetdir, "jacoco.xml"), encoding);
addCsvFormatter(new File(targetdir, "jacoco.csv"), encoding);
addHtmlFormatter(targetdir, encoding, footer, locale);
}
public void addRulesChecker(final List rules,
final IViolationsOutput output) {
final RulesChecker checker = new RulesChecker();
checker.setRules(rules);
formatters.add(checker.createVisitor(output));
}
public IReportVisitor initRootVisitor() throws IOException {
final IReportVisitor visitor = new MultiReportVisitor(formatters);
visitor.visitInfo(loader.getSessionInfoStore().getInfos(), loader
.getExecutionDataStore().getContents());
return visitor;
}
/**
* Calculates coverage for the given project and emits it to the report
* group without source references
*
* @param visitor
* group visitor to emit the project's coverage to
* @param project
* the MavenProject
* @param includes
* list of includes patterns
* @param excludes
* list of excludes patterns
* @throws IOException
* if class files can't be read
*/
public void processProject(final IReportGroupVisitor visitor,
final MavenProject project, final List includes,
final List excludes) throws IOException {
processProject(visitor, project.getArtifactId(), project, includes,
excludes, new NoSourceLocator());
}
/**
* Calculates coverage for the given project and emits it to the report
* group including source references
*
* @param visitor
* group visitor to emit the project's coverage to
* @param bundeName
* name for this project in the report
* @param project
* the MavenProject
* @param includes
* list of includes patterns
* @param excludes
* list of excludes patterns
* @param srcEncoding
* encoding of the source files within this project
* @throws IOException
* if class files can't be read
*/
public void processProject(final IReportGroupVisitor visitor,
final String bundeName, final MavenProject project,
final List includes, final List excludes,
final String srcEncoding) throws IOException {
processProject(visitor, bundeName, project, includes, excludes,
new SourceFileCollection(project, srcEncoding));
}
private void processProject(final IReportGroupVisitor visitor,
final String bundeName, final MavenProject project,
final List includes, final List excludes,
final ISourceFileLocator locator) throws IOException {
final CoverageBuilder builder = new CoverageBuilder();
final File classesDir = new File(project.getBuild()
.getOutputDirectory());
if (classesDir.isDirectory()) {
final Analyzer analyzer = new Analyzer(
loader.getExecutionDataStore(), builder);
final FileFilter filter = new FileFilter(includes, excludes);
for (final File file : filter.getFiles(classesDir)) {
analyzer.analyzeAll(file);
}
}
final IBundleCoverage bundle = builder.getBundle(bundeName);
logBundleInfo(bundle, builder.getNoMatchClasses());
visitor.visitBundle(bundle, locator);
}
private void logBundleInfo(final IBundleCoverage bundle,
final Collection nomatch) {
log.info(format("Analyzed bundle '%s' with %s classes",
bundle.getName(),
Integer.valueOf(bundle.getClassCounter().getTotalCount())));
if (!nomatch.isEmpty()) {
log.warn(format(
"Classes in bundle '%s' do no match with execution data. "
+ "For report generation the same class files must be used as at runtime.",
bundle.getName()));
for (final IClassCoverage c : nomatch) {
log.warn(format("Execution data for class %s does not match.",
c.getName()));
}
}
if (bundle.containsCode()
&& bundle.getLineCounter().getTotalCount() == 0) {
log.warn(
"To enable source code annotation class files have to be compiled with debug information.");
}
}
private class NoSourceLocator implements ISourceFileLocator {
public Reader getSourceFile(final String packageName,
final String fileName) {
return null;
}
public int getTabWidth() {
return 0;
}
}
private class SourceFileCollection implements ISourceFileLocator {
private final List sourceRoots;
private final String encoding;
public SourceFileCollection(final MavenProject project,
final String encoding) {
this.sourceRoots = getCompileSourceRoots(project);
this.encoding = encoding;
}
public Reader getSourceFile(final String packageName,
final String fileName) throws IOException {
final String r;
if (packageName.length() > 0) {
r = packageName + '/' + fileName;
} else {
r = fileName;
}
for (final File sourceRoot : sourceRoots) {
final File file = new File(sourceRoot, r);
if (file.exists() && file.isFile()) {
return new InputStreamReader(new FileInputStream(file),
encoding);
}
}
return null;
}
public int getTabWidth() {
return 4;
}
}
private static List getCompileSourceRoots(final MavenProject project) {
final List result = new ArrayList();
for (final Object path : project.getCompileSourceRoots()) {
result.add(resolvePath(project, (String) path));
}
return result;
}
private static File resolvePath(final MavenProject project,
final String path) {
File file = new File(path);
if (!file.isAbsolute()) {
file = new File(project.getBasedir(), path);
}
return file;
}
}
jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/maven/RestoreMojo.java 0000664 0000000 0000000 00000003173 13421740370 0025660 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
*
*******************************************************************************/
package org.jacoco.maven;
import java.io.File;
import java.io.IOException;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.codehaus.plexus.util.FileUtils;
/**
* Restores original classes as they were before offline instrumentation.
*
* @since 0.6.2
*/
@Mojo(name = "restore-instrumented-classes", defaultPhase = LifecyclePhase.PREPARE_PACKAGE, threadSafe = true)
public class RestoreMojo extends AbstractJacocoMojo {
@Override
protected void executeMojo() throws MojoExecutionException,
MojoFailureException {
final File originalClassesDir = new File(getProject().getBuild()
.getDirectory(), "generated-classes/jacoco");
final File classesDir = new File(getProject().getBuild()
.getOutputDirectory());
try {
FileUtils.copyDirectoryStructure(originalClassesDir, classesDir);
} catch (final IOException e) {
throw new MojoFailureException("Unable to restore classes.", e);
}
}
}
jacoco-0.8.3/jacoco-maven-plugin/src/org/jacoco/maven/RuleConfiguration.java 0000664 0000000 0000000 00000003622 13421740370 0027046 0 ustar 00root root 0000000 0000000 /*******************************************************************************
* Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
* Marc Hoffmann - redesign using report APIs
*
*******************************************************************************/
package org.jacoco.maven;
import java.util.List;
import org.codehaus.plexus.util.StringUtils;
import org.jacoco.core.analysis.ICoverageNode.ElementType;
import org.jacoco.report.check.Limit;
import org.jacoco.report.check.Rule;
/**
* Wrapper for {@link Rule} objects to allow Maven style includes/excludes lists
*
*/
public class RuleConfiguration {
final Rule rule;
/**
* Create a new configuration instance.
*/
public RuleConfiguration() {
rule = new Rule();
}
/**
* @param element
* element type this rule applies to
* TODO: use ElementType directly once Maven 3 is required.
*/
public void setElement(final String element) {
rule.setElement(ElementType.valueOf(element));
}
/**
* @param includes
* includes patterns
*/
public void setIncludes(final List includes) {
rule.setIncludes(StringUtils.join(includes.iterator(), ":"));
}
/**
*
* @param excludes
* excludes patterns
*/
public void setExcludes(final List excludes) {
rule.setExcludes(StringUtils.join(excludes.iterator(), ":"));
}
/**
* @param limits
* list of {@link Limit}s configured for this rule
*/
public void setLimits(final List limits) {
rule.setLimits(limits);
}
}
jacoco-0.8.3/jacoco/ 0000775 0000000 0000000 00000000000 13421740370 0014217 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/jacoco/.project 0000664 0000000 0000000 00000000561 13421740370 0015670 0 ustar 00root root 0000000 0000000
jacocoorg.eclipse.m2e.core.maven2Builderorg.eclipse.m2e.core.maven2Nature
jacoco-0.8.3/jacoco/assembly.xml 0000664 0000000 0000000 00000010201 13421740370 0016552 0 ustar 00root root 0000000 0000000
distributionzipfalse${basedir}/../org.jacoco.doc/docroot/true**/*.html${basedir}/../org.jacoco.doc/target/generated-resources/xml/xslt/docfalse*.html${basedir}/../org.jacoco.doc/docroot/**/*.html${basedir}/../org.jacoco.doc/target/site/jacoco-aggregate/coverage${basedir}/../org.jacoco.doc/target/junit/test${basedir}/../org.jacoco.report/src/org/jacoco/report/xml/report.dtd/coveragelibjacocoant.jarfalse${project.groupId}:org.jacoco.ant:jar:nodepslibjacococli.jarfalse${project.groupId}:org.jacoco.cli:jar:nodepslibjacocoagent.jarfalse${project.groupId}:org.jacoco.agent:*:runtimelib${artifact.artifactId}-${qualified.bundle.version}.${artifact.extension}false${project.groupId}:org.jacoco.core${project.groupId}:org.jacoco.report${project.groupId}:org.jacoco.agent${project.groupId}:org.jacoco.ant${project.groupId}:org.jacoco.agent:*:runtime${project.groupId}:org.jacoco.ant:*:nodeps/doctruefalse${project.groupId}:org.jacoco.examples:zip/doc/apitruefalseMETA-INF/${project.groupId}:org.jacoco.doc:*:javadoc
jacoco-0.8.3/jacoco/pom.xml 0000664 0000000 0000000 00000007776 13421740370 0015555 0 ustar 00root root 0000000 0000000
4.0.0org.jacocoorg.jacoco.build0.8.3../org.jacoco.buildjacocopomJaCoCo :: DistributionJaCoCo Standalone Distribution${project.groupId}org.jacoco.core${project.groupId}org.jacoco.report${project.groupId}org.jacoco.agent${project.groupId}org.jacoco.agent${project.version}runtime${project.groupId}org.jacoco.ant${project.groupId}org.jacoco.antnodeps${project.groupId}org.jacoco.cli${project.version}nodeps${project.groupId}org.jacoco.examples${project.version}zip${project.groupId}org.jacoco.doc${project.version}javadocsrcorg.apache.maven.pluginsmaven-assembly-pluginpackagesinglejacoco-${qualified.bundle.version}falseassembly.xmlorg.apache.maven.pluginsmaven-enforcer-pluginenforce-distribution-sizeenforceverify44000003400000${project.build.directory}/jacoco-${qualified.bundle.version}.zip
jacoco-0.8.3/org.jacoco.agent.rt.test/ 0000775 0000000 0000000 00000000000 13421740370 0017504 5 ustar 00root root 0000000 0000000 jacoco-0.8.3/org.jacoco.agent.rt.test/.classpath 0000664 0000000 0000000 00000001415 13421740370 0021470 0 ustar 00root root 0000000 0000000
jacoco-0.8.3/org.jacoco.agent.rt.test/.project 0000664 0000000 0000000 00000001377 13421740370 0021163 0 ustar 00root root 0000000 0000000
org.jacoco.agent.rt.testorg.eclipse.jdt.core.javabuilderorg.eclipse.m2e.core.maven2Builderorg.eclipse.m2e.core.maven2Natureorg.eclipse.jdt.core.javanature.settings2PARENT-1-PROJECT_LOC/org.jacoco.core.test/.settings
jacoco-0.8.3/org.jacoco.agent.rt.test/about.html 0000664 0000000 0000000 00000001476 13421740370 0021514 0 ustar 00root root 0000000 0000000
About
About This Content
@build.date@
License
All Content in this plug-in is made available by Mountainminds GmbH & Co.
KG, Munich. Unless otherwise indicated below, the Content is provided to you
under the terms and conditions of the Eclipse Public License Version 1.0
("EPL"). A copy of the EPL is available at
http://www.eclipse.org/legal/epl-v10.html.
For purposes of the EPL, "Program" will mean the Content.