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

support for adding a BOM pom as dependency #63

Closed
aaronwalker opened this issue Feb 20, 2020 · 10 comments · Fixed by #673
Closed

support for adding a BOM pom as dependency #63

aaronwalker opened this issue Feb 20, 2020 · 10 comments · Fixed by #673

Comments

@aaronwalker
Copy link
Contributor

would be cool to be able to use a BOM pom to define the versions for related dependencies so you don't need to provide specific versions

//DEPS com.azure:azure-sdk-bom:1.0.0-beta.1 com.azure:azure-identity com.azure:azure-security-keyvault-secrets

maybe prefix it with something pom: or it should be possible to determine it from the type

@maxandersen
Copy link
Collaborator

maxandersen commented Feb 21, 2020 via email

@maxandersen
Copy link
Collaborator

com.azure:azure-sdk-bom:1.0.0-beta.1 doesn't seem to exist ?

@aaronwalker
Copy link
Contributor Author

@maxandersen hmm ok try 1.0.0.M1

@maxandersen
Copy link
Collaborator

so figured out the proper artifact names:

//DEPS com.microsoft.azure:azure-bom:1.0.0.M1@pom
//DEPS com.microsoft.azure:azure

unfortunately jcabi-aether does not seem to support import bom notion so will have to wait until I try again to get shrinkwrap to work which does seem to support it.

@maxandersen
Copy link
Collaborator

i've tried several ways to get shrinkwrap to honor import scope but no luck yet. If anyone have an idea do share :)

@quintesse
Copy link
Contributor

i've tried several ways to get shrinkwrap to honor import scope but no luck yet.

Could you elaborate? I'm not sure what the problem is.

@maxandersen
Copy link
Collaborator

shrinkwrap doesn't have support for straight up just resolving a pom and put it in importscope (like maven does).

what it does allow though is fetch the pom and have it load a pom into importscope thus that was my thinking to do this trick with each dep marked as @pom before resolving everything else.

@maxandersen
Copy link
Collaborator

writing this down so I dont forget:

shrinkwrap does not support fetching POM's (it actively filters it out of any result), see https://github.com/shrinkwrap/resolver/blob/master/maven/impl-maven/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/PostResolutionFilterApplicator.java#L51

A quick'n'dirty workaround would be to make a fork of shrinkwrap (jbang-shrinkwrap) that would not do this filtering for the cases jbang needs.

Then we could at least fetch the pom and get the managed dependencies to fill in versions when they are not specified.

@quintesse
Copy link
Contributor

quintesse commented Aug 23, 2020

And could we perhaps do a feature request for this in upstream? They might be willing.

Edit: for example, I see that it's nicely designed to apply "post filter" but then it just uses a single hard-coded one. So perhaps they wouldn't mind if someone extended that to a configurable list of filters (with the current one being the default).

@maxandersen
Copy link
Collaborator

Unfortunately not found much activity up there. But yes; idea is to get something upstream but don't want to keep wait :)

maxandersen added a commit to maxandersen/jbang that referenced this issue 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 jbangdev#63
maxandersen added a commit to maxandersen/jbang that referenced this issue 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 jbangdev#63
maxandersen added a commit to maxandersen/jbang that referenced this issue 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 jbangdev#63
maxandersen added a commit to maxandersen/jbang that referenced this issue 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 jbangdev#63
maxandersen added a commit to maxandersen/jbang that referenced this issue 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 jbangdev#63
maxandersen added a commit to maxandersen/jbang that referenced this issue 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 jbangdev#63
maxandersen added a commit that referenced this issue 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 added a commit to maxandersen/jbang that referenced this issue 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 jbangdev#63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants