Skip to content

Commit

Permalink
chore: update extra-enforcer-rules maven plugin config, and improve…
Browse files Browse the repository at this point in the history
… profile config
  • Loading branch information
oldratlee committed Aug 7, 2024
1 parent f3bcc6c commit a5bd379
Showing 1 changed file with 40 additions and 42 deletions.
82 changes: 40 additions & 42 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,8 @@
<id>default-logging-dependencies</id>
<activation>
<property>
<name>!enableLog4j2LoggingDependencies</name>
<name>enableLog4j2LoggingDependencies</name>
<value>!true</value>
</property>
</activation>
<dependencies>
Expand All @@ -516,14 +517,10 @@
<activation>
<property>
<name>enableLog4j2LoggingDependencies</name>
<value>true</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
Expand All @@ -536,42 +533,12 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>enable-test-jar-if-not-maven-skip-test</id>
<activation>
<property>
<name>maven.test.skip</name>
<value>!true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<!--
Guide to using attached tests
reuse the tests that you have created for one project in another
https://maven.apache.org/guides/mini/guide-attached-tests.html
How to create a jar containing test classes
https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html
-->
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>enable-arch-unit-test</id>
<activation>
<property>
<name>!skipDefaultProfileArchUnitTest</name>
<name>skipDefaultProfileArchUnitTest</name>
<value>!true</value>
</property>
</activation>
<dependencies>
Expand Down Expand Up @@ -617,6 +584,37 @@
</plugins>
</build>
</profile>
<profile>
<id>enable-test-jar-if-not-maven-skip-test</id>
<activation>
<property>
<name>maven.test.skip</name>
<value>!true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<!--
Guide to using attached tests
reuse the tests that you have created for one project in another
https://maven.apache.org/guides/mini/guide-attached-tests.html
How to create a jar containing test classes
https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html
-->
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>disable-javac-options-warning-for-java21+</id>
<activation>
Expand Down Expand Up @@ -658,12 +656,12 @@
<requireJavaVersion>
<version>21</version>
</requireJavaVersion>
<!-- https://www.mojohaus.org/extra-enforcer-rules/enforceBytecodeVersion.html -->
<enforceBytecodeVersion>
<!-- https://www.mojohaus.org/extra-enforcer-rules/enforceBytecodeVersion.html -->
<maxJdkVersion>${maven.compiler.source}</maxJdkVersion>
<ignoredScopes>
<ignoredScope>test</ignoredScope>
</ignoredScopes>
<excludes>
<exclude>com.tngtech.archunit:archunit</exclude>
</excludes>
</enforceBytecodeVersion>
</rules>
</configuration>
Expand Down

0 comments on commit a5bd379

Please sign in to comment.