Skip to content

Commit 1635df5

Browse files
committed
Use failsafe
Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
1 parent 1ca7f34 commit 1635df5

2 files changed

Lines changed: 37 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ Repgen is a general purpose report generation engine built on top of JasperRepor
1212
- The engine supports embedded fonts (PDF/A spec) for optimal rendering on every system.
1313
- The REST API can be used to request new report builds, search and download generated reports.
1414

15-
## Build and run
15+
## Build from source
1616

1717
```sh
18+
# build and run
1819
mvn package
1920
java -jar target/repgen-*.jar
2021

21-
# run unit/integration tests
22-
mvn test
23-
mvn test -Dtest=*IT
22+
# run tests
23+
mvn verify
2424

2525
# create binaries
2626
mvn package -Passembly

pom.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Licensed under the Apache License 2.0 (see LICENSE file).
2727
<json.version>20190722</json.version>
2828
<plugin.compiler.version>3.13.0</plugin.compiler.version>
2929
<plugin.surefire.version>3.0.0-M1</plugin.surefire.version>
30+
<plugin.failsafe.version>3.0.0-M1</plugin.failsafe.version>
3031
<plugin.assembly.version>3.3.0</plugin.assembly.version>
3132
<spotbugs.version>4.5.3</spotbugs.version>
3233
<plugin.spotbugs.version>4.5.3.0</plugin.spotbugs.version>
@@ -152,10 +153,42 @@ Licensed under the Apache License 2.0 (see LICENSE file).
152153
<groupId>org.apache.maven.plugins</groupId>
153154
<artifactId>maven-surefire-plugin</artifactId>
154155
<version>${plugin.surefire.version}</version>
156+
<configuration>
157+
<parallel>methods</parallel>
158+
<threadCount>4</threadCount>
159+
<forkCount>1C</forkCount>
160+
<reuseForks>true</reuseForks>
161+
<excludes>
162+
<exclude>**/*IT.java</exclude>
163+
</excludes>
164+
</configuration>
165+
</plugin>
166+
<plugin>
167+
<groupId>org.apache.maven.plugins</groupId>
168+
<artifactId>maven-failsafe-plugin</artifactId>
169+
<version>${plugin.failsafe.version}</version>
155170
<configuration>
156171
<forkCount>1</forkCount>
157172
<reuseForks>false</reuseForks>
173+
<includes>
174+
<include>**/*IT.java</include>
175+
</includes>
176+
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine>
177+
<classpathDependencyExcludes>
178+
<classpathDependencyExclude>org.springframework.boot:spring-boot-starter-tomcat</classpathDependencyExclude>
179+
</classpathDependencyExcludes>
180+
<additionalClasspathElements>
181+
<additionalClasspathElement>${project.build.outputDirectory}</additionalClasspathElement>
182+
</additionalClasspathElements>
158183
</configuration>
184+
<executions>
185+
<execution>
186+
<goals>
187+
<goal>integration-test</goal>
188+
<goal>verify</goal>
189+
</goals>
190+
</execution>
191+
</executions>
159192
</plugin>
160193
<plugin>
161194
<groupId>org.springframework.boot</groupId>

0 commit comments

Comments
 (0)