0

I am beginning to work with IntelliJ and have not worked with Java for many years. I've been working in the .Net world. I am creating an Atlassian Crowd Custom Connector using IntelliJ. I need to add a dependency to the pom.xml file for the com.atlassian.crowd.manager.directory package. I believe the dependency block below is correct except for the version. Is the artifactid correct? I used other dependencies to derive this. How do I find the correct version?

<dependency>
    <groupId>com.atlassian.crowd</groupId>
    <artifactId>manager-directory</artifactId>
    <version>2.8.8</version>
</dependency>
Zoe
  • 27,060
  • 21
  • 118
  • 148
  • impossible to answer. You'd have to check the repository you're getting the dependency from to see what's available, and the product documentation to see which version you need/want depending on other dependencies and requirements. – jwenting Jan 03 '17 at 15:13

1 Answers1

1

It seems you're looking for the following dependency atlassian-crowd-components.

To be able to use it, you've to add the following section into your pom.xml

<repositories>
    <repository>
        <id>pentaho-releases</id>
        <url>http://repository.pentaho.org/artifactory/repo/</url>
    </repository>
</repositories>

An replace your dependency section by the following one:

<dependencyManagement>
 <dependency>
    <groupId>com.atlassian.crowd</groupId>
    <artifactId>atlassian-crowd-components</artifactId>
    <version>2.9.5</version>
    <type>pom</type>
 </dependency>
</dependencyManagement>

Then, within the <dependencies> section of the POM add the desired dependency without indication of the version like follow:

 <dependencies>
   <!-- other dependencies ... -->
   <dependency>
     <groupId>com.atlassian.crowd</groupId>
     <artifactId>crowd-core</artifactId>
   </dependency>
  </dependencies>

You can find all dependencies from this URL

Zoe
  • 27,060
  • 21
  • 118
  • 148
Abderrazak BOUADMA
  • 1,526
  • 2
  • 16
  • 38
  • Thanks for responding. I added the repository and changed the dependency in my pom file. I reimported the Maven projects. In my class, I'm trying to use the class - DirectoryManagerGeneric which can be found in the package - com.atlassian.crowd.manager.directory. I still get "Cannot resolve symbol" when I add the following import statement in my class: – Thomas DeVoe Jan 03 '17 at 19:26
  • The external library is not listed in IntelliJ so there must be an issue with my pom file or the way I'm refreshing the Maven projects. Your information is extremely helpful. Little by little, I'm better understanding how this IntelliJ/Maven/artifacts ecosystem works. – Thomas DeVoe Jan 03 '17 at 19:33
  • I checked my newly added/modified pom file entries and they look good. I went to the IntelliJ structure tab and see that the definitions are the same as the other external libraries. I've reimported the Maven projects but the library does not appear in the IntelliJ external library list. Any troubleshooting suggestions? Thanks again. – Thomas DeVoe Jan 03 '17 at 19:48
  • you can better thanks me by accepting the answer and up vote the answer. – Abderrazak BOUADMA Jan 03 '17 at 21:38
  • It appears that when building, the corresponding jar file is not being downloaded to my lib folder. I've gone into File->Project Structure->Libraries and the local jar files do not exist. I have been looking for the jar file on the .net but cannot find it. I've looked on mvnrepository where it appears most of the Atlassian jar files live but the crowd-components jar is not there. Can you tell me where I can find it? Once I have the jar file, my issue should be resolved. Thanks. – Thomas DeVoe Jan 04 '17 at 14:16
  • which jar are you looking for ? – Abderrazak BOUADMA Jan 04 '17 at 14:36
  • atlassian/crowd/atlassian-crowd-components - I ran the mvn compile from the command line and grabbed the path for the jar file it was attempting to download - https://maven.atlassian.com/repository/public/com/atlassian/crowd/atlassian-crowd-components/2.8.8/atlassian-crowd-components-2.8.8.jar. If I go to the url the jar file is not there. There is the Parent Directory, pom, pom.md5 and pom.sha1 but no jar. – Thomas DeVoe Jan 04 '17 at 14:53
  • Oh ! the dependency is of type POM , it's not a jar, if you want have the JAR you have to specify it, I edited my answer – Abderrazak BOUADMA Jan 04 '17 at 15:17
  • It looks like this allowed me access to the crowd-components package. I did, however have to add a version in the pom dependency. Maven was flagging the lack of the version as an error. I'm good for now. Thanks. – Thomas DeVoe Jan 04 '17 at 20:14
  • The official Atlassian source ([Atlassian Maven repositories](https://developer.atlassian.com/server/framework/atlassian-sdk/atlassian-maven-repositories-2818705/)) would be a significantly better choice of repository here. – Joe Jan 11 '22 at 10:38