Closed campionfellin closed 4 years ago
How'd you model such a dependency in pom.xml
?
The reason I as is because I see two ways of addressing this:
*
dependenciesI'd instinctively lean towards option 2, however I also don't like being more restrictive than needed (so if I can express *
in other languages, I don't see why I'd refrain from doing it).
Generally speaking however, jsii
packages are expected to adhere to semantic versioning, and having a *
dependency would mean you're accepting any major version (including incompatible ones) - that doesn't sound like something you'd want to be doing?
I think for (1), something like this could be acceptable for maven/Java at least:
<dependency>
<groupId>org.cdk8s</groupId>
<artifactId>cdk8s</artifactId>
<version>(0.0.0,]</version>
</dependency>
Alternatively, for (1), it looks like there are some plugins that could help (see here) but I'm not sure that's any better than just <version>(0.0.0,]</version>
(2) is also fine with me, if it can be added to the documentation somewhere!
@RomainMuller either option is fine with me, but I'd prefer (1). I can work on this if you'd like
I'm happy with option (1), however as I mentioned on the PR (thanks for that by the way), I feel 0.0.0
should be included.
Closing this issue since it seems to have been resolved. Feel free to reopen.
:question: Guidance
Affected Languages
TypeScript
orJavascript
Python
Java
C#
,F#
, ...)General Information
The Question
What is the expected behavior when compiling
*
dependencies into Java? Here's part of an examplepackage.json
:This leads to my dependencies in
pom.xml
looking like:Changing versions from
*
to a numbered version like2.0.1
or0.21.0
seems to fix the issue.Is this expected? Any solutions besides explicitly adding the version?