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

optional scope can't be ignored #4

Open
mikebell90 opened this issue Sep 19, 2023 · 0 comments
Open

optional scope can't be ignored #4

mikebell90 opened this issue Sep 19, 2023 · 0 comments

Comments

@mikebell90
Copy link

Opensearch-java has one of those open ended dependencies

<dependency>
      <groupId>software.amazon.awssdk</groupId>
      <artifactId>sdk-core</artifactId>
      <version>[2.15,3.0)</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>software.amazon.awssdk</groupId>
      <artifactId>auth</artifactId>
      <version>[2.15,3.0)</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>

This triggers loading ALL the versions. Even an exclusion in dependencyManagement like

<dependency>
			  <groupId>org.opensearch.client</groupId>
			  <artifactId>opensearch-java</artifactId>
			  <version>2.4.0</version>
              <!-- because the aws guys use an open range, you need to exclude this and optionally redeclare -->
              <exclusions>
                  <exclusion>
                      <groupId>software.amazon.awssdk</groupId>
                      <artifactId>sdk-core</artifactId>
                  </exclusion>
                  <exclusion>
                      <groupId>software.amazon.awssdk</groupId>
                      <artifactId>auth</artifactId>
                  </exclusion>
              </exclusions>
			</dependency>

doesn't work

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

No branches or pull requests

1 participant