Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support for BOM POM's i.e. maven dependencyManagement #673

Merged
merged 1 commit into from Jan 17, 2021

Conversation

@maxandersen
Copy link
Collaborator

@maxandersen maxandersen commented Jan 17, 2021

jbang will now if and only if the very first dependency has a @pom
classifier, download it and load it as pom file in shrinkwrap.

Example:

//DEPS io.quarkus:quarkus-bom:1.11.0.Final@pom
//DEPS io.quarkus:quarkus-resteasy
//DEPS io.quarkus:quarkus-smallrye-openapi
//DEPS io.quarkus:quarkus-swagger-ui

Then that pom file dependency management (and dependencies) gets listened to.

Fixes #63

Caveats:

  • I would prefer if could load arbitrary amount of bom/pom's but I haven't found
    a way to do that with shrinkwrap; we could potentially if more than one found generate
    a temporary one that has them all listed (TBD)
  • This also means that we can't support the sequence being arbitrary; basically @pom's has to come first
    Should add check that for now is only one @pom and reject otherwise we risk breaking users in future when we have it.
  • I had to create a fork of shrinkwrap resolver, to circumvent it so it would not filter out pom files.
    Could probably find a way to call maven directly to get it but for now this is what we got :)
@maxandersen maxandersen marked this pull request as draft Jan 17, 2021
@maxandersen maxandersen force-pushed the maxandersen:bompoms branch 4 times, most recently from 0254568 to 147ba33 Jan 17, 2021
jbang will now if and only if the very first dependency has a `@pom`
classifier, download it and load it as pom file in shrinkwrap.

Example:

```java
//DEPS io.quarkus:quarkus-bom:1.11.0.Final@pom
//DEPS io.quarkus:quarkus-resteasy
//DEPS io.quarkus:quarkus-smallrye-openapi
//DEPS io.quarkus:quarkus-swagger-ui
```

Then that pom file dependency management (and dependencies) gets listened to.

Fixes #63
@maxandersen maxandersen marked this pull request as ready for review Jan 17, 2021
@maxandersen maxandersen force-pushed the maxandersen:bompoms branch from 147ba33 to d45ba48 Jan 17, 2021
readme.adoc Show resolved Hide resolved
readme.adoc Show resolved Hide resolved
@maxandersen maxandersen merged commit 2d81c74 into jbangdev:master Jan 17, 2021
6 checks passed
6 checks passed
build-and-testing (ubuntu-latest)
Details
build-and-testing (windows-latest)
Details
testing (ubuntu-latest, 8)
Details
testing (ubuntu-latest, 11)
Details
testing (ubuntu-latest, 13)
Details
Semantic Pull Request ready to be squashed
Details
@maxandersen maxandersen deleted the maxandersen:bompoms branch Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.