unable to fine dependency in pom.xml | Community
Skip to main content
Level 4
February 3, 2016
Solved

unable to fine dependency in pom.xml

  • February 3, 2016
  • 8 replies
  • 1989 views

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.

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 kautuk_sahni

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/

8 replies

smacdonald2008
Level 10
February 3, 2016

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? 

Level 4
February 3, 2016

We are using below java packages in our OSGI Bundle.

com.xxx.dfac.xxxxxx.components

com.day.cq.xxxxxx

Adobe Employee
February 3, 2016

<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

smacdonald2008
Level 10
February 3, 2016

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. 

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
February 4, 2016

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
Level 4
February 4, 2016

another dependency is

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

Level 4
February 4, 2016

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.

dan_klco
Level 4
February 22, 2018

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/