Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Not able to build existing Maven project in Eclipse

Avatar

Level 4

Dear Team,

First time I am building my maven project in eclipse for CQ.

I have my existing maven project download from SVN.

I just imported my existing maven project in eclipse.

Already I have setup my settings.xml file in c/users/username/.m2 folder as below.

<profile>
  <id>common</id>
  <properties> 
    <crx.username>admin</crx.username>
    <crx.password>admin</crx.password>
  </properties> 
</profile> 

<profile>
  <id>localAuthor</id> 
  <properties> 
    <instance.url>http://localhost:4502</instance.url> 
  </properties>
</profile>

<profile>
  <id>localPublish</id> 
  <properties> 
    <instance.url>http://localhost:4503</instance.url> 
  </properties>
</profile>

<profile>
    <id>localSonar</id>
    <properties>
        <sonar.host.url>http://localhost:9000</sonar.host.url>
        <sonar.jdbc.url>jdbc:h2:tcp://localhost:9092/sonar</sonar.jdbc.url>
        <sonar.jdbc.username>sonar</sonar.jdbc.username>
        <sonar.jdbc.password>sonar</sonar.jdbc.password>
        <sonar.jdbc.driver>org.h2.Driver</sonar.jdbc.driver>
    </properties>
</profile>


But after run my pom.xml , I am getting below error.

[INFO] Scanning for projects...
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building sunitaproject - flextemplate portal webapp module 1.16.1
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.sunitaproject.dfac.sunitaprojectfoundation:sunitaprojectfoundation-webapp:jar:1.31.4 is missing, no dependency information available
[WARNING] The POM for com.cognifide.cq:framework-54-api:jar:2.3.0 is missing, no dependency information available
[WARNING] The POM for com.cognifide.cq:framework-54-core:jar:2.3.0 is missing, no dependency information available
[WARNING] The POM for com.cognifide.cq:framework-54-taglib:jar:2.3.0 is missing, no dependency information available
[WARNING] The POM for com.cognifide.cq:sling-dynamic-include:jar:0.6.2 is missing, no dependency information available
[WARNING] The POM for com.sunitaproject.dfac:rum-bundle:jar:1.22.3 is missing, no dependency information available
[WARNING] The POM for com.cognifide.sunitaproject:framework-extra-taglib:jar:0.1.14 is missing, no dependency information available
[WARNING] The POM for com.cognifide.cq.extra:framework-extra-core:jar:0.1.7 is missing, no dependency information available
[WARNING] The POM for rome:rome:jar:1.0-osgi-fixed is missing, no dependency information available
[WARNING] The POM for com.google.guava:guava:jar:15 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.316 s
[INFO] Finished at: 2016-02-05T08:07:07-05:00
[INFO] Final Memory: 12M/220M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project flextemplate-webapp: Could not resolve dependencies for project com.sunitaproject.dfac.flextemplate:flextemplate-webapp:bundle:1.16.1: The following artifacts could not be resolved: com.sunitaproject.dfac.sunitaprojectfoundation:sunitaprojectfoundation-webapp:jar:1.31.4, com.cognifide.cq:framework-54-api:jar:2.3.0, com.cognifide.cq:framework-54-core:jar:2.3.0, com.cognifide.cq:framework-54-taglib:jar:2.3.0, com.cognifide.cq:sling-dynamic-include:jar:0.6.2, com.sunitaproject.dfac:rum-bundle:jar:1.22.3, com.cognifide.sunitaproject:framework-extra-taglib:jar:0.1.14, com.cognifide.cq.extra:framework-extra-core:jar:0.1.7, rome:rome:jar:1.0-osgi-fixed, com.google.guava:guava:jar:15: Failure to find com.sunitaproject.dfac.sunitaprojectfoundation:sunitaprojectfoundation-webapp:jar:1.31.4 in http://repo.adobe.com/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of adobe has elapsed or updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

NOTE: My localhost:4502 is currently running.

Anything I need to setup in setting.xml file?

1 Accepted Solution

Avatar

Correct answer by
Employee

Sunita Choudhury wrote...

Yes I did all the steps whatever it is mentioned in https://helpx.adobe.com/experience-manager/using/first-osgi.html.

Still my dependency jars file are not automatically created in .m2 repo.

Anybody can help me on this. Thanks

 

The dependencies you are searching for are not available in the Adobe repo as they are Cognifide artifacts, so you would need to request help from Cognifide.

You need to search for the dependencies and include the correct version. For example I searched for:

        <dependency>
            <groupId>com.cognifide.cq</groupId>
            <artifactId>sling-dynamic-include</artifactId>
            <version>0.6.2</version>
        </dependency>

and could only find the following in the central maven repository: http://mvnrepository.com/artifact/com.cognifide.cq/sling-dynamic-include which starts at version 1.0. Is the code you are trying to import from an old code repository?

Regards,

Opkar

View solution in original post

11 Replies

Avatar

Level 10

Make sure that dependencies for these files are added in your project pom.xml and are jar files are available in your local maven repository

[WARNING] The POM for com.sunitaproject.dfac.sunitaprojectfoundation:sunitaprojectfoundation-webapp:jar:1.31.4 is missing, no dependency information available
[WARNING] The POM for com.cognifide.cq:framework-54-api:jar:2.3.0 is missing, no dependency information available
[WARNING] The POM for com.cognifide.cq:framework-54-core:jar:2.3.0 is missing, no dependency information available
[WARNING] The POM for com.cognifide.cq:framework-54-taglib:jar:2.3.0 is missing, no dependency information available
[WARNING] The POM for com.cognifide.cq:sling-dynamic-include:jar:0.6.2 is missing, no dependency information available
[WARNING] The POM for com.sunitaproject.dfac:rum-bundle:jar:1.22.3 is missing, no dependency information available
[WARNING] The POM for com.cognifide.sunitaproject:framework-extra-taglib:jar:0.1.14 is missing, no dependency information available
[WARNING] The POM for com.cognifide.cq.extra:framework-extra-core:jar:0.1.7 is missing, no dependency information available
[WARNING] The POM for rome:rome:jar:1.0-osgi-fixed is missing, no dependency information available
[WARNING] The POM for com.google.guava:guava:jar:15 is missing, no dependency information available

Avatar

Level 4

Hi,

I added below dependency in my pom.xml. But still I am getting below error.

 

<!-- com.cognifide.cq -->
        <dependency>
            <groupId>com.cognifide.cq</groupId>
            <artifactId>framework-54-api</artifactId>
            <version>${framework.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.cognifide.cq</groupId>
            <artifactId>framework-54-core</artifactId>
            <version>${framework.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.cognifide.cq</groupId>
            <artifactId>framework-54-taglib</artifactId>
            <version>${framework.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.cognifide.cq</groupId>
            <artifactId>sling-dynamic-include</artifactId>
            <version>0.6.2</version>
        </dependency>
        

Avatar

Level 10

In which pom.xml you have added these?

You need to add in two places: project pom.xml and bundle one

Avatar

Level 4

Hi,

I have added both in project and bundle pom.xml , as shown in below screenshot.

Kindly let me know, If i need to change in setting.xml file "or" anywhere else.

Thanks....

Avatar

Level 10

only thing you need to include in the settings.xml is the Adobe Repository. 

You have to configure your settings.xml file to use Adobe’s public repository. For information, see Adobe Public Maven Repository at http://repo.adobe.com/.

Avatar

Level 10

can you also ensure that jar files are present in you .m2 repo as I mentioned

Avatar

Level 4

Ya jar files are not there in .m2 repo. From where can I get the jar files?

Avatar

Level 10

Maven downloads the JAR files when you run Maven.  Never add files to .m2. That is automatically done by Maven. 

Try building the OSGi bundle separate from Eclipse.

This will inform us whether your Maven tool is working properly - without worrying about if its working within Eclipse. 

Build the bundle using an Adobe Archetype command. Add the files to your project and update the POM. Then build the bundle using mvn clean install. 

See this article to learn how to build Bundle from the command line: 

https://helpx.adobe.com/experience-manager/using/first-osgi.html

Avatar

Level 4

Yes I did all the steps whatever it is mentioned in https://helpx.adobe.com/experience-manager/using/first-osgi.html.

Still my dependency jars file are not automatically created in .m2 repo.

Anybody can help me on this. Thanks

Avatar

Correct answer by
Employee

Sunita Choudhury wrote...

Yes I did all the steps whatever it is mentioned in https://helpx.adobe.com/experience-manager/using/first-osgi.html.

Still my dependency jars file are not automatically created in .m2 repo.

Anybody can help me on this. Thanks

 

The dependencies you are searching for are not available in the Adobe repo as they are Cognifide artifacts, so you would need to request help from Cognifide.

You need to search for the dependencies and include the correct version. For example I searched for:

        <dependency>
            <groupId>com.cognifide.cq</groupId>
            <artifactId>sling-dynamic-include</artifactId>
            <version>0.6.2</version>
        </dependency>

and could only find the following in the central maven repository: http://mvnrepository.com/artifact/com.cognifide.cq/sling-dynamic-include which starts at version 1.0. Is the code you are trying to import from an old code repository?

Regards,

Opkar

Avatar

Level 10

Ot you can download the required bundles from [1] and upload to felix console

[1] http://mvnrepository.com/artifact/com.cognifide.cq