diff options
author | Evgeny Mandrikov <Godin@users.noreply.github.com> | 2017-02-05 19:16:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-05 19:16:38 +0100 |
commit | 2b1d4b279502b14e20363686c5d491d83aa4081d (patch) | |
tree | c95eacfc3e7ff1e9fdee6bceae2ee726ba255ac2 /jacoco-maven-plugin.test/it | |
parent | 4585416d2d60cfcb83611e20f74794da1947b3fd (diff) | |
download | platform_external_jacoco-2b1d4b279502b14e20363686c5d491d83aa4081d.tar.gz platform_external_jacoco-2b1d4b279502b14e20363686c5d491d83aa4081d.tar.bz2 platform_external_jacoco-2b1d4b279502b14e20363686c5d491d83aa4081d.zip |
"prepare-agent" should not overwrite property if execution skipped (#486)
Diffstat (limited to 'jacoco-maven-plugin.test/it')
-rw-r--r-- | jacoco-maven-plugin.test/it/it-prepend-property-skip/pom.xml | 46 | ||||
-rw-r--r-- | jacoco-maven-plugin.test/it/it-prepend-property-skip/src/test/java/ExampleTest.java | 23 |
2 files changed, 69 insertions, 0 deletions
diff --git a/jacoco-maven-plugin.test/it/it-prepend-property-skip/pom.xml b/jacoco-maven-plugin.test/it/it-prepend-property-skip/pom.xml new file mode 100644 index 00000000..027abbe1 --- /dev/null +++ b/jacoco-maven-plugin.test/it/it-prepend-property-skip/pom.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2009, 2017 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 +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>jacoco</groupId> + <artifactId>setup-parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>it-prepend-property-skip</artifactId> + + <properties> + <argLine>-Dfoo</argLine> + </properties> + + <build> + <plugins> + <plugin> + <groupId>@project.groupId@</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>prepare-agent</goal> + </goals> + <configuration> + <skip>true</skip> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> diff --git a/jacoco-maven-plugin.test/it/it-prepend-property-skip/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-prepend-property-skip/src/test/java/ExampleTest.java new file mode 100644 index 00000000..1c906fcb --- /dev/null +++ b/jacoco-maven-plugin.test/it/it-prepend-property-skip/src/test/java/ExampleTest.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright (c) 2009, 2017 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")); + } + +} |