Expand my Community achievements bar.

SOLVED

unable to fine dependency in pom.xml

Avatar

Level 4

Dear Team,

I am trying to build my existing maven project in eclipse. After importing existing maven project in my Eclipse work space, my pom.xml file is throwing error, as shown in below screenshot.

My pom.xml file is not able to get below dependency.

 

<dependency>
<groupId>org.springframework</groupId>
  <artifactId>org.springframework.context.support</artifactId>
  <version>3.2.4.RELEASE</version>
</dependency>

<dependency>
<groupId>com.day.cq</groupId>
<artifactId>cq-replication</artifactId>
<version>5.4.2</version>
<scope>compile</scope>
</dependency>

Can I put some jar files in my Eclipse build path?

Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Administrator

Adding to Scott's post, 

Please have a look at dffinder :-

Determine Maven Coordinates

To find the Maven coordinates for a class or package, you can use the Web Console's "Packages" screen athttp://<host>:<port>/system/console/depfinder.

Enter com.day.cq.wcm.msm.api into the "Packages / Classes" input field and click "Find". The Web Console will provide an XML fragment that can be used with Maven as shown in the screen below.

file

Reference link:- http://labs.6dglobal.com/blog/2012-05-04/new-cq-55-dependency-finder/



Kautuk Sahni

View solution in original post

8 Replies

Avatar

Level 10

I would try and build from Maven command line to make sure that the bundle works and POM dependencies can be resolved.

Once you know it works from command line - then you can hook into Eclipse. Using Maven from command line eliminates any Eclipse IDE plug-in errors. 

What Java package are you trying to use in the OSGi bundle? 

Avatar

Level 4

We are using below java packages in our OSGI Bundle.

com.xxx.dfac.xxxxxx.components

com.day.cq.xxxxxx

Avatar

Employee

<dependency>
<groupId>com.day.cq</groupId>
<artifactId>cq-replication</artifactId>
<version>5.4.2</version>
<scope>compile</scope>
</dependency>

does exist in the adobe repo

https://repo.adobe.com/nexus/content/groups/public/com/day/cq/cq-replication/5.4.2/

Is this the only AEM dependancy you have in your project?

Regards,

Opkar

Avatar

Level 10

try using AEM dependency finder - it will specify the POM dependency that you need for a given AEM package: 

http://localhost:4502/system/console/depfinder

To help you further - i would need a complete list of Java packages that you are having issues with. 

Avatar

Correct answer by
Administrator

Adding to Scott's post, 

Please have a look at dffinder :-

Determine Maven Coordinates

To find the Maven coordinates for a class or package, you can use the Web Console's "Packages" screen athttp://<host>:<port>/system/console/depfinder.

Enter com.day.cq.wcm.msm.api into the "Packages / Classes" input field and click "Find". The Web Console will provide an XML fragment that can be used with Maven as shown in the screen below.

file

Reference link:- http://labs.6dglobal.com/blog/2012-05-04/new-cq-55-dependency-finder/



Kautuk Sahni

Avatar

Level 4

another dependency is

<dependency>
<groupId>org.springframework</groupId>
  <artifactId>org.springframework.context.support</artifactId>
  <version>3.2.4.RELEASE</version>
</dependency>

Avatar

Level 4

Hi All,

Thanks a lot for all of your help.

I deleted the below dependency

<dependency>
<groupId>com.day.cq</groupId>
<artifactId>cq-replication</artifactId>
<version>5.4.2</version>
<scope>compile</scope>
</dependency>

After that my pom is working fine.

Avatar

Level 5

FYI since labs.6dglobal.com is down, here's the same blog post on the dependency finder on my personal blog: https://www.danklco.com/posts/2012/05/04/new-cq-55-dependency-finder/