eclipse-ee4j / glassfish-hk2

Dynamic dependency injection framework

Home Page:https://eclipse-ee4j.github.io/glassfish-hk2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Broken hk2-bom (missing asm.version property)

joschi opened this issue · comments

The hk2-bom POM defines dependencies for ASM in its dependencyManagement section but it doesn't provide a valid version for them.
https://github.com/eclipse-ee4j/glassfish-hk2/blob/2.6.1/bom/pom.xml#L158-L182

The ${asm.version} property is neither defined in hk2-bom nor in its parent POM (org.eclipse.ee4j:project:1.0.5).

This is causing problems for downstream projects which are using hk2-bom: dropwizard/dropwizard#3212

Since ${asm.version} is defined in org.glassfish.hk2:hk2-parent, hk2-bom should either use that as its parent POM or remove the dependency declarations for ASM.

Refs #470
Refs #471

Details to reproduce

Minimal POM to reproduce the issue:
https://github.com/joschi/hk2-bom-dependency-asm/blob/master/pom.xml

Error messages:

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.ow2.asm:asm:jar must be a valid version but is '${asm.version}'. @ org.glassfish.hk2:hk2-bom:2.6.1, /home/runner/.m2/repository/org/glassfish/hk2/hk2-bom/2.6.1/hk2-bom-2.6.1.pom, line 161, column 26
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.github.joschi.bugs:hk2-bom-dependency-asm:1.0.0-SNAPSHOT (/home/runner/work/hk2-bom-dependency-asm/hk2-bom-dependency-asm/pom.xml) has 1 error
[ERROR]     'dependencies.dependency.version' for org.ow2.asm:asm:jar must be a valid version but is '${asm.version}'. @ org.glassfish.hk2:hk2-bom:2.6.1, /home/runner/.m2/repository/org/glassfish/hk2/hk2-bom/2.6.1/hk2-bom-2.6.1.pom, line 161, column 26
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

Repository to demonstrate the issue:
https://github.com/joschi/hk2-bom-dependency-asm/

Build output to demonstrate the issue:
https://github.com/joschi/hk2-bom-dependency-asm/runs/539495087?check_suite_focus=true#step:4:34