Skip to content

Commit c3b99a9

Browse files
committed
Add cleanupFeatures option
1 parent 1d98f73 commit c3b99a9

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Full plugin configuration below, optional properties can be omitted
1919
<plugin>
2020
<groupId>com.assertthat.plugins</groupId>
2121
<artifactId>assertthat-bdd-maven-plugin</artifactId>
22-
<version>1.7.0</version>
22+
<version>1.7.1</version>
2323
<configuration>
2424
<projectId>
2525
<!--Jira project id e.g. 10001-->
@@ -52,6 +52,8 @@ Full plugin configuration below, optional properties can be omitted
5252
<numbered>false</numbered>
5353
<!--Optional - whether the phase is enabled (default is true)-->
5454
<enabled>true</enabled>
55+
<!--Optional - Delete features in outputFolder directory before downloading (default is true)-->
56+
<ceanupFeatures>true</ceanupFeatures>
5557
</configuration>
5658
<id>features</id>
5759
<goals>

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<groupId>com.assertthat.plugins</groupId>
44
<artifactId>assertthat-bdd-maven-plugin</artifactId>
55
<packaging>maven-plugin</packaging>
6-
<version>1.7.0</version>
6+
<version>1.7.1</version>
77
<name>assertthat-bdd-maven-plugin</name>
88
<description>AssertThat BDD Jira maven plugin</description>
99
<url>http://www.assertthat.com</url>
@@ -77,7 +77,7 @@
7777
<dependency>
7878
<groupId>com.assertthat.plugins</groupId>
7979
<artifactId>assertthat-bdd-standalone</artifactId>
80-
<version>1.9.7</version>
80+
<version>1.9.8</version>
8181
</dependency>
8282
</dependencies>
8383
<build>

src/main/java/com/assertthat/FeaturesMojo.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@ public class FeaturesMojo extends AbstractMojo {
7272
private String secretMethod;
7373
@Parameter(property = "secretClassName")
7474
private String secretClassName;
75-
7675
@Parameter(property = "enabled", defaultValue = "true")
7776
private Boolean enabled;
77+
@Parameter(property = "cleanupFeatures", defaultValue = "true")
78+
private Boolean cleanupFeatures;
7879
public void execute()
7980
throws MojoExecutionException {
8081
if(!enabled) return;
@@ -91,7 +92,8 @@ public void execute()
9192
tags,
9293
jiraServerUrl,
9394
numbered,
94-
ignoreCertErrors
95+
ignoreCertErrors,
96+
cleanupFeatures
9597
);
9698
if(secretClassName!=null) {
9799
try {
@@ -117,7 +119,7 @@ public void execute()
117119
try {
118120
File inZip =
119121
apiUtil.download(new File(arguments.getOutputFolder()),
120-
arguments.getMode(), arguments.getJql(), arguments.getTags(), arguments.isNumbered());
122+
arguments.getMode(), arguments.getJql(), arguments.getTags(), arguments.isNumbered(), arguments.isCleanupFeatures());
121123
File zip = new FileUtil().unpackArchive(inZip, new File(arguments.getOutputFolder()));
122124
zip.delete();
123125
} catch (IOException e) {

0 commit comments

Comments
 (0)