Closed Icetea1991 closed 9 months ago
I did a quick review, it seems to me an issue with how json-io
publishes the jar. The dependency in java-cfenv
is correctly set as compile
but json-io
is published as packaging=bundle which is not standard Maven.
I see that not only mvn dependency:tree
does not list the dependency, but Maven does not even try to pull it, not a single file or directory for json-io in local .m2
. But at the same time I see no issue or docs mentioning any particular method for Maven (Gradle seems to work fine) 🤔
I think json-io is not the root issue but the spring-boot-starter-test dependency in java-cfenv. Maven with -X option prints:
[WARNING] The POM for io.pivotal.cfenv:java-cfenv:jar:3.1.0 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for io.pivotal.cfenv:java-cfenv:3.1.0
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-test:jar is missing. @
In the generated pom.xml of java-cfenv there is a version for json-io and jmockit, but not for spring-boot-starter-test.
I'm not using gradle, but maybe it could be fixed by adding the :${springBootVersion}
in
https://github.com/pivotal-cf/java-cfenv/blob/471305d89a37af2c8a47250e9d260936dde40e13/java-cfenv/build.gradle#L11
and
https://github.com/pivotal-cf/java-cfenv/blob/471305d89a37af2c8a47250e9d260936dde40e13/java-cfenv/build.gradle#L20
@jensmatw is on point! I tested adding the version to the local pom and the resolution works fine. Also tested with the main branch (./gradlew :java-cfenv:publishToMavenLocal
) after this fix https://github.com/pivotal-cf/java-cfenv/commit/b161c4e459273db7cc800f0add4ace24d7ea9208 and seems to be already solved 🎉
hello, Yes, it was fixed recently, but rather in this commit https://github.com/pivotal-cf/java-cfenv/pull/227/commits/a4a30e2cfa547a6c9d3747441d12c13f3647c70e - anyways, sorry for the trouble, version 3.1.1 just got out with the fix., https://github.com/pivotal-cf/java-cfenv/releases/tag/v3.1.1
Enjoy!
Describe the bug
The pom seems to be invalid and no transitive dependencies are available. I have to import
Otherweise it would not work
Reproduction steps
Expected behavior
I expect the dependency:
To work properly without any workarounds from my side
Additional context
No response