Skip to content

Commit b49b7e6

Browse files
Add skip flags (#186)
* Add skip flags - build-helper:add-source - build-helper:add-test-source - build-helper:add-resource - build-helper:add-test-resource --------- Co-authored-by: Slawomir Jaranowski <[email protected]>
1 parent 2237441 commit b49b7e6

File tree

17 files changed

+248
-0
lines changed

17 files changed

+248
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
invoker.goals = -X generate-sources
2+
invoker.buildResult = success

src/it/add-resource-skip/pom.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<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/maven-v4_0_0.xsd">
2+
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<groupId>build-helper</groupId>
6+
<artifactId>integration-test</artifactId>
7+
<version>1.0-SNAPSHOT</version>
8+
9+
<build>
10+
<plugins>
11+
<plugin>
12+
<groupId>@project.groupId@</groupId>
13+
<artifactId>@project.artifactId@</artifactId>
14+
<version>@project.version@</version>
15+
<executions>
16+
<execution>
17+
<id>integration-test</id>
18+
<phase>generate-sources</phase>
19+
<goals>
20+
<goal>add-resource</goal>
21+
</goals>
22+
<configuration>
23+
<resources>
24+
<resource>
25+
<directory>${project.basedir}/not-existing</directory>
26+
<targetPath>does-not-matter</targetPath>
27+
</resource>
28+
</resources>
29+
<skipAddResource>true</skipAddResource>
30+
</configuration>
31+
</execution>
32+
</executions>
33+
</plugin>
34+
</plugins>
35+
</build>
36+
</project>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
File file = new File( basedir, "build.log" );
2+
assert file.exists();
3+
4+
String text = file.getText("utf-8");
5+
6+
assert text.contains("skipAddResource = true");
7+
assert text.contains("Skipping plugin execution!");
8+
9+
return true;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
invoker.goals = -X generate-sources
2+
invoker.buildResult = success

src/it/add-source-skip/pom.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<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/maven-v4_0_0.xsd">
2+
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<groupId>build-helper</groupId>
6+
<artifactId>integration-test</artifactId>
7+
<version>1.0-SNAPSHOT</version>
8+
9+
<build>
10+
<plugins>
11+
<plugin>
12+
<groupId>@project.groupId@</groupId>
13+
<artifactId>@project.artifactId@</artifactId>
14+
<version>@project.version@</version>
15+
<executions>
16+
<execution>
17+
<id>integration-test</id>
18+
<phase>generate-sources</phase>
19+
<goals>
20+
<goal>add-source</goal>
21+
</goals>
22+
<configuration>
23+
<sources>
24+
<source>${project.basedir}/not-existing</source>
25+
</sources>
26+
<skipAddSource>true</skipAddSource>
27+
</configuration>
28+
</execution>
29+
</executions>
30+
</plugin>
31+
</plugins>
32+
</build>
33+
</project>

src/it/add-source-skip/verify.groovy

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
File file = new File( basedir, "build.log" );
2+
assert file.exists();
3+
4+
String text = file.getText("utf-8");
5+
6+
assert text.contains("skipAddSource = true");
7+
assert text.contains("Skipping plugin execution!");
8+
9+
return true;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
invoker.goals = -X generate-sources
2+
invoker.buildResult = success

src/it/add-test-resource-skip/pom.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<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/maven-v4_0_0.xsd">
2+
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<groupId>build-helper</groupId>
6+
<artifactId>integration-test</artifactId>
7+
<version>1.0-SNAPSHOT</version>
8+
9+
<build>
10+
<plugins>
11+
<plugin>
12+
<groupId>@project.groupId@</groupId>
13+
<artifactId>@project.artifactId@</artifactId>
14+
<version>@project.version@</version>
15+
<executions>
16+
<execution>
17+
<id>integration-test</id>
18+
<phase>generate-sources</phase>
19+
<goals>
20+
<goal>add-test-resource</goal>
21+
</goals>
22+
<configuration>
23+
<resources>
24+
<resource>
25+
<directory>${project.basedir}/not-existing</directory>
26+
<targetPath>does-not-matter</targetPath>
27+
</resource>
28+
</resources>
29+
<skipAddTestResource>true</skipAddTestResource>
30+
</configuration>
31+
</execution>
32+
</executions>
33+
</plugin>
34+
</plugins>
35+
</build>
36+
</project>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
File file = new File( basedir, "build.log" );
2+
assert file.exists();
3+
4+
String text = file.getText("utf-8");
5+
6+
assert text.contains("skipAddTestResource = true");
7+
assert text.contains("Skipping plugin execution!");
8+
9+
return true;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
invoker.goals = -X generate-sources
2+
invoker.buildResult = success

0 commit comments

Comments
 (0)