https://pinot.apache.org/ logo
r

Ravi Teja Kanumula

01/29/2021, 8:44 PM
Hi Folks, I’m a newbie on pinot.. trying to add a new dependency to support service principal based access to ADL gen2
Copy code
<dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-identity</artifactId>
      <version>1.2.2</version>
    </dependency>
But It’s giving convergence errors
Copy code
[WARNING] 
Dependency convergence error for org.codehaus.woodstox:stax2-api:3.1.4 paths to dependency are:
+-org.apache.pinot:pinot-adls:0.7.0-SNAPSHOT
  +-com.azure:azure-identity:1.2.2
    +-com.azure:azure-core:1.12.0
      +-com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.8
        +-org.codehaus.woodstox:stax2-api:3.1.4
and
+-org.apache.pinot:pinot-adls:0.7.0-SNAPSHOT
  +-com.azure:azure-identity:1.2.2
    +-com.azure:azure-core:1.12.0
      +-com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.8
        +-com.fasterxml.woodstox:woodstox-core:5.0.3
          +-org.codehaus.woodstox:stax2-api:3.1.4
and
+-org.apache.pinot:pinot-adls:0.7.0-SNAPSHOT
  +-com.azure:azure-identity:1.2.2
    +-org.linguafranca.pwdb:KeePassJava2:2.1.4
      +-org.linguafranca.pwdb:KeePassJava2-simple:2.1.4
        +-com.fasterxml:aalto-xml:1.0.0
          +-org.codehaus.woodstox:stax2-api:4.0.0

[WARNING] 
Dependency convergence error for com.nimbusds:oauth2-oidc-sdk:7.4 paths to dependency are:
+-org.apache.pinot:pinot-adls:0.7.0-SNAPSHOT
  +-com.azure:azure-identity:1.2.2
    +-com.microsoft.azure:msal4j:1.8.0
      +-com.nimbusds:oauth2-oidc-sdk:7.4
and
+-org.apache.pinot:pinot-adls:0.7.0-SNAPSHOT
  +-com.azure:azure-identity:1.2.2
    +-com.nimbusds:oauth2-oidc-sdk:7.1.1

[WARNING] 
Dependency convergence error for com.microsoft.azure:msal4j:1.8.0 paths to dependency are:
+-org.apache.pinot:pinot-adls:0.7.0-SNAPSHOT
  +-com.azure:azure-identity:1.2.2
    +-com.microsoft.azure:msal4j:1.8.0
and
+-org.apache.pinot:pinot-adls:0.7.0-SNAPSHOT
  +-com.azure:azure-identity:1.2.2
    +-com.microsoft.azure:msal4j-persistence-extension:1.0.0
      +-com.microsoft.azure:msal4j:1.4.0

[WARNING] 
Dependency convergence error for net.java.dev.jna:jna-platform:5.5.0 paths to dependency are:
+-org.apache.pinot:pinot-adls:0.7.0-SNAPSHOT
  +-com.azure:azure-identity:1.2.2
    +-com.microsoft.azure:msal4j-persistence-extension:1.0.0
      +-net.java.dev.jna:jna-platform:5.5.0
and
+-org.apache.pinot:pinot-adls:0.7.0-SNAPSHOT
  +-com.azure:azure-identity:1.2.2
    +-net.java.dev.jna:jna-platform:5.6.0

[WARNING] Rule 1: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message:
Failed while enforcing releasability. See above detailed error message.
I tried few different things but none works What do we do in this case ? Thank you
x

Xiang Fu

01/29/2021, 8:50 PM
I think you need to exclude the conflict dependency and declare it explicitly in pom.xml
r

Ravi Teja Kanumula

01/29/2021, 8:51 PM
I tried to declare the conflict explicitly.. that didnt help.. can you tell more about the exclude ? appreciate if u can help me try that out
w

Will Briggs

01/29/2021, 8:55 PM
Another option is to use a
dependencyManagement
block in the pom, to override the various differing transitive dependency versions. This can be less invasive than trying to individually exclude + then explicitly re-add the necessary dependencies.
j

Jack

01/29/2021, 8:56 PM
e.g. exclude
org.codehaus.woodstox:stax2-api
from pinot-adls, since it uses a lower version
1
r

Ravi Teja Kanumula

01/29/2021, 8:56 PM
Thank you Will.. Ill try that out and update here..
x

Xiang Fu

01/29/2021, 8:56 PM
Copy code
<dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-storage-file-datalake</artifactId>
      <version>12.0.0-beta.12</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.woodstox</groupId>
          <artifactId>stax2-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-identity</artifactId>
      <version>1.2.2</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.woodstox</groupId>
          <artifactId>stax2-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.codehaus.woodstox</groupId>
      <artifactId>stax2-api</artifactId>
      <version>4.0.0</version>
    </dependency>
just one example
w

Will Briggs

01/29/2021, 9:00 PM
Or this, if the enforcer will let you (it’s been a while since I dealt with the Maven enforcer plugin, as I use sbt or mill for most of my builds now):
Copy code
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.codehaus.woodstox</groupId>
      <artifactId>stax2-api</artifactId>
      <version>4.0.0</version>
    </dependency>
  </dependencies>
</dependencyManagement>
👍 2
r

Ravi Teja Kanumula

01/29/2021, 9:01 PM
Will try out one after the other until it works for me 😄
m

Mayank

01/31/2021, 6:08 AM
@Ravi Teja Kanumula any luck?
r

Ravi Teja Kanumula

02/01/2021, 6:26 PM
Yes @Mayank.. It worked.. I tried the dependencyManagement block way.. seems much cleaner..
👍 1
Thank you @Will Briggs
1