Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Maven configuration by running DiktatSaveSmokeTest as an integration test #1482

Merged
merged 1 commit into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 60 additions & 11 deletions diktat-rules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,21 +164,71 @@

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/DiktatSaveSmokeTest.*</exclude>
</excludes>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<includes>
<include>**/DiktatSaveSmokeTest.*</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<!-- Don't produce the JAR during the `package` phase. -->
<!-- These executions complement those defined in the parent pom.xml. -->
<execution>
<id>default-jar</id>
<phase>none</phase>
<id>default-prepare-agent-integration</id>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
</execution>
<!-- Instead, create it immediately before the `test` phase
so that the shade plug-in may use it. -->
<execution>
<id>fat-jar-for-smoke-tests</id>
<phase>process-test-classes</phase>
<id>default-merge</id>
<phase>post-integration-test</phase>
<goals>
<goal>merge</goal>
</goals>
<configuration>
<fileSets>
<fileSet>
<directory>${project.build.directory}</directory>
<includes>
<include>jacoco.exec</include>
<include>jacoco-it.exec</include>
</includes>
</fileSet>
</fileSets>
<destFile>${project.build.directory}/jacoco-merged.exec</destFile>
</configuration>
</execution>
<execution>
<id>default-report-merged</id>
<goals>
<goal>jar</goal>
<goal>report-integration</goal>
</goals>
<configuration>
<outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
<dataFile>${project.build.directory}/jacoco-merged.exec</dataFile>
</configuration>
</execution>
</executions>
</plugin>
Expand All @@ -188,7 +238,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<!-- Suppress the generation of `dependency-reduced-pom.xml`,
because it will also get installed under `~/.m2`,
Expand Down Expand Up @@ -221,7 +270,7 @@
<executions>
<execution>
<id>fat-jar-for-smoke-tests</id>
<phase>process-test-classes</phase>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M7</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
Expand Down