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 9, 2024
1 parent d4e9a47 commit f9c3e29
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 46 deletions.
84 changes: 41 additions & 43 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>switchToLog4j2LoggingDependencies</name>
<value>!true</value>
</property>
</activation>
<dependencies>
Expand All @@ -515,15 +516,11 @@
<id>enable-log4j2-logging-dependencies</id>
<activation>
<property>
<name>enableLog4j2LoggingDependencies</name>
<name>switchToLog4j2LoggingDependencies</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 @@ -537,43 +534,13 @@
</dependencies>
</profile>
<profile>
<id>enable-test-jar-if-not-maven-skip-test</id>
<id>default-arch-unit-test</id>
<activation>
<property>
<name>maven.test.skip</name>
<name>skipDefaultProfileArchUnitTest</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>
</property>
</activation>
<dependencies>
<!-- https://www.archunit.org/ -->
<dependency>
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
6 changes: 3 additions & 3 deletions scripts/integration_test
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ mvu::mvn_cmd clean install
# test by multiply version jdks
########################################

readonly MVN_OPTS_FOR_JAVA8='-Dkotlin.version=1.6.0 -P!default-logging-dependencies -P!enable-arch-unit-test'
readonly MVN_OPTS_FOR_JAVA11='-Dkotlin.version=1.7.0 -P!default-logging-dependencies -P!enable-arch-unit-test -Dcffu.uncaught.exception.report=none'
readonly MVN_OPTS_FOR_JAVA17='-Dkotlin.version=1.8.0 -DenableLog4j2LoggingDependencies -Dcffu.uncaught.exception.report=full'
readonly MVN_OPTS_FOR_JAVA8='-Dkotlin.version=1.6.0 -P!default-logging-dependencies -P!default-arch-unit-test'
readonly MVN_OPTS_FOR_JAVA11='-Dkotlin.version=1.7.0 -P!default-logging-dependencies -P!default-arch-unit-test -Dcffu.uncaught.exception.report=none'
readonly MVN_OPTS_FOR_JAVA17='-Dkotlin.version=1.8.0 -DswitchToLog4j2LoggingDependencies -Dcffu.uncaught.exception.report=full'

# about CI env var
# https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
Expand Down

0 comments on commit f9c3e29

Please sign in to comment.