Skip to content

Commit

Permalink
[MPOM-270] Fix enforcer plugin (#32)
Browse files Browse the repository at this point in the history
Enforcer as is causes that downstream in case of update
POM must completely redefine plugin, thus, loosing all
the benefits of parent POM pluginMgmt.

Move plugin definition to pluginMgmt instead to fully
define it and it's dependents in plugin section. Keep
execution in plugin section.

Update to latest enforcer as well.
  • Loading branch information
cstamas authored Oct 15, 2021
1 parent 1bc4d27 commit 1429337
Showing 1 changed file with 28 additions and 23 deletions.
51 changes: 28 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,34 @@ under the License.
</environmentVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0</version>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>enforce-bytecode-version</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<enforceBytecodeVersion>
<maxJdkVersion>${maven.compiler.target}</maxJdkVersion>
</enforceBytecodeVersion>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand All @@ -1122,29 +1150,6 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-bytecode-version</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<enforceBytecodeVersion>
<maxJdkVersion>${maven.compiler.target}</maxJdkVersion>
</enforceBytecodeVersion>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
Expand Down

0 comments on commit 1429337

Please sign in to comment.