Not able to use Auth0 in my AEM application | Community
Skip to main content
New Participant
August 10, 2023
Solved

Not able to use Auth0 in my AEM application

  • August 10, 2023
  • 2 replies
  • 1585 views

Hi Team,

I am trying to use this  dependency

 <dependency>
  <groupId>com.auth0</groupId>
  <artifactId>mvc-auth-commons</artifactId>
  <version>[1.0, 2.0)</version>
</dependency>
when I use this dependency in pom it is getting conlict with this import statement 
"import org.jetbrains.annotations.NotNull" from org.jetbrains.annotations and build is failed with error "package org.jetbrains.annotations does not exist". How to fix this issue?


Thanks Bala.
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mahedi_Sabuj

Hi @balasainikhilkacharla, Instead of relying on a version range, try explicitly specifying the version of mvc-auth-commons that works with your project's other dependencies.

<dependency> <groupId>com.auth0</groupId> <artifactId>mvc-auth-commons</artifactId> <version>1.0.1</version> <!-- Use the appropriate version --> </dependency>

If the conflict persists, you can use Maven's exclusion feature to exclude the conflicting transitive dependency. For example:

<dependency> <groupId>com.auth0</groupId> <artifactId>mvc-auth-commons</artifactId> <version>1.0.1</version> <exclusions> <exclusion> <groupId>org.jetbrains</groupId> <artifactId>annotations</artifactId> </exclusion> </exclusions> </dependency>

 

 

 

 

2 replies

Mahedi_Sabuj
Mahedi_SabujAccepted solution
New Participant
August 10, 2023

Hi @balasainikhilkacharla, Instead of relying on a version range, try explicitly specifying the version of mvc-auth-commons that works with your project's other dependencies.

<dependency> <groupId>com.auth0</groupId> <artifactId>mvc-auth-commons</artifactId> <version>1.0.1</version> <!-- Use the appropriate version --> </dependency>

If the conflict persists, you can use Maven's exclusion feature to exclude the conflicting transitive dependency. For example:

<dependency> <groupId>com.auth0</groupId> <artifactId>mvc-auth-commons</artifactId> <version>1.0.1</version> <exclusions> <exclusion> <groupId>org.jetbrains</groupId> <artifactId>annotations</artifactId> </exclusion> </exclusions> </dependency>

 

 

 

 

Mahedi Sabuj
New Participant
December 1, 2023

Can someone explain how to integrate AEM with Auth0 ? 

Sudheer_Sundalam
New Participant
August 10, 2023

@balasainikhilkacharla ,

 

This seems be a known issue with IntelliJ NotNull sub-class. Please see this thread regarding the work around here: https://stackoverflow.com/questions/64429995/org-jetbrains-annotations-notnull-instead-of-javax-annotation-nonnull-when-imple#

JetBrains Issue: https://youtrack.jetbrains.com/issue/IDEA-253324

New Participant
August 10, 2023

Hi @sudheer_sundalam 


Compile error occurs irrespective of IDE.


The build fails when I add "mvc-auth-commons" dependency in main pom.xml and core pom.xml and gave build in cmd prompt , irrespective of IDE, and gives "package org.jetbrains.annotations does not exist".


Here the build was success in cmd prompt when this dependency was not there,

 

<dependency>
  <groupId>com.auth0</groupId>
  <artifactId>mvc-auth-commons</artifactId>
  <version>[1.0, 2.0)</version>
</dependency>


Is it conflict between "mvc-auth-commons" dependency and org.jetbrains.annotations.