pavelhoral commented on PR #940:
URL: https://github.com/apache/maven/pull/940#issuecomment-1598178832

   > @pavelhoral Do you know if alpha 5 has this regression again? Testing 
alpha 4 here 
https://github.com/hazendaz/spotbugs-maven-plugin/actions/workflows/it-maven-4.0.0.yaml
 and it works, the prior runs for same job used alpha 5 and seems broken again. 
Just wonder if you are seeing same behaviour.
   
   It shouldn't be the same bug as that would have been caught by the unit 
tests (I hope).
   
   Interesting thing is that the enforcer rule fails only on Java 17 and not 
Java 11:
   
   <details><summary>Java 11 run</summary>
   
   ```console
   /tmp/spotbugs-maven-plugin$ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ 
/srv/repo/maven/apache-maven-4.0.0-alpha-5/bin/mvn  -B -V clean install 
-Dlicense.skip=true -Dmaven.min-version=4.0.0-alpha-5 --no-transfer-progress
   Apache Maven 4.0.0-alpha-5 (26d10a4bf9a2df75feef60da01d8706f2bf77a47)
   Maven home: /srv/repo/maven/apache-maven-4.0.0-alpha-5
   Java version: 11.0.19, vendor: Ubuntu, runtime: 
/usr/lib/jvm/java-11-openjdk-amd64
   Default locale: en_US, platform encoding: UTF-8
   OS name: "linux", version: "5.19.0-43-generic", arch: "amd64", family: "unix"
   [INFO] Scanning for projects...
   [INFO] 
   [INFO] --------------------------------------< 
com.github.spotbugs:spotbugs-maven-plugin 
>---------------------------------------
   [INFO] Building spotbugs-maven-plugin 4.7.3.6-SNAPSHOT
   [INFO]   from pom.xml
   [INFO] -----------------------------------------------------[ maven-plugin 
]-----------------------------------------------------
   [INFO] 
   [INFO] --- enforcer:3.3.0:enforce (enforce-clean) @ spotbugs-maven-plugin ---
   [INFO] Rule 0: org.apache.maven.enforcer.rules.dependency.BannedDependencies 
passed
   [INFO] Rule 1: 
org.apache.maven.enforcer.rules.BanDuplicatePomDependencyVersions passed
   [INFO] Adding ignore: module-info
   [INFO] Rule 2: 
org.codehaus.mojo.extraenforcer.dependencies.EnforceBytecodeVersion passed
   [INFO] Rule 3: org.apache.maven.enforcer.rules.ReactorModuleConvergence 
passed
   [INFO] Rule 4: org.apache.maven.enforcer.rules.version.RequireJavaVersion 
passed
   [INFO] Rule 5: org.apache.maven.enforcer.rules.version.RequireMavenVersion 
passed
   [INFO] Rule 6: org.apache.maven.enforcer.rules.RequirePluginVersions passed
   [INFO] Rule 7: org.apache.maven.plugins.enforcer.RestrictImports passed
   [INFO] 
   [INFO] --- clean:3.2.0:clean (default-clean) @ spotbugs-maven-plugin ---
   [INFO] Deleting /tmp/spotbugs-maven-plugin/target (includes = [**/*], 
excludes = [])
   [INFO]
   ...
   ```
   </details>
   
   <details><summary>Java 17 run</summary>
   
   ```console
   /tmp/spotbugs-maven-plugin$ $ JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/ 
/srv/repo/maven/apache-maven-4.0.0-alpha-5/bin/mvn  -B -V clean install 
-Dlicense.skip=true -Dmaven.min-version=4.0.0-alpha-5 --no-transfer-progress
   Apache Maven 4.0.0-alpha-5 (26d10a4bf9a2df75feef60da01d8706f2bf77a47)
   Maven home: /srv/repo/maven/apache-maven-4.0.0-alpha-5
   Java version: 17.0.7, vendor: Private Build, runtime: 
/usr/lib/jvm/java-17-openjdk-amd64
   Default locale: en_US, platform encoding: UTF-8
   OS name: "linux", version: "5.19.0-43-generic", arch: "amd64", family: "unix"
   [INFO] Scanning for projects...
   [INFO] 
   [INFO] --------------------------------------< 
com.github.spotbugs:spotbugs-maven-plugin 
>---------------------------------------
   [INFO] Building spotbugs-maven-plugin 4.7.3.6-SNAPSHOT
   [INFO]   from pom.xml
   [INFO] -----------------------------------------------------[ maven-plugin 
]-----------------------------------------------------
   [INFO] 
   [INFO] --- enforcer:3.3.0:enforce (enforce-clean) @ spotbugs-maven-plugin ---
   [INFO] Rule 0: org.apache.maven.enforcer.rules.dependency.BannedDependencies 
passed
   [INFO] Rule 1: 
org.apache.maven.enforcer.rules.BanDuplicatePomDependencyVersions passed
   [INFO] Adding ignore: module-info
   [INFO] Rule 2: 
org.codehaus.mojo.extraenforcer.dependencies.EnforceBytecodeVersion passed
   [INFO] Rule 3: org.apache.maven.enforcer.rules.ReactorModuleConvergence 
passed
   [INFO] Rule 4: org.apache.maven.enforcer.rules.version.RequireJavaVersion 
passed
   [INFO] Rule 5: org.apache.maven.enforcer.rules.version.RequireMavenVersion 
passed
   [INFO] Rule 7: org.apache.maven.plugins.enforcer.RestrictImports passed
   [INFO] 
--------------------------------------------------------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] 
--------------------------------------------------------------------------------------------------------------------------
   [INFO] Total time:  1.262 s
   [INFO] Finished at: 2023-06-20T08:09:42+02:00
   [INFO] 
--------------------------------------------------------------------------------------------------------------------------
   [ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-enforcer-plugin:3.3.0:enforce (enforce-clean) on 
project spotbugs-maven-plugin: 
   [ERROR] Rule 6: org.apache.maven.enforcer.rules.RequirePluginVersions failed 
with message:
   [ERROR] Some plugins are missing valid versions or depend on Maven 
4.0.0-alpha-5 defaults (LATEST, RELEASE, SNAPSHOT, TIMESTAMP SNAPSHOT as plugin 
version are not allowed)
   [ERROR]    org.apache.maven.plugins:maven-compiler-plugin.      The version 
currently in use is 3.11.0 via super POM or default lifecycle bindings
   [ERROR] [ERROR] Best Practice is to always define plugin versions!
   ```
   </details>
   
   
   So I am wondering if the issue is that you are defining 
maven-compiler-plugin in jdk17on profile without the version: 
   
   
https://github.com/hazendaz/base-parent/blob/5a57310ad94bbae655ea412e1c9e8a3c66abfec5/pom.xml#L1647-L1650
   
   I guess that plugin-management definitions are not merged (i.e. the version 
is not inherited from the other `pluginManagement/plugins` definition).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to