hi, im trying to follow this tutorial to create a basic AEM service
http://helpx.adobe.com/experience-manager/using/first-osgi.html
in the section Create an Adobe CQ archetype project im getting an error when i try to run the command:
mvn eclipse:eclipse
im getting this error:
Could any one suggest what changes in POM are needed to fix this?
Many Thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
The issue is finally resolved. The problem is not with the version of maven.
Here is the solution:
Go to content folder of your project. Open up the pom.xml from content. In the plugins for group id: com.day.jcr.vault change the filter source to filter.xml
<filterSource>src/main/content/META-INF/vault/filter.xml</filterSource>
This will resolve the issue.
Thanks all.
Views
Replies
Total Likes
Check if Adobe Maven repository configured. You have to do that before this goal will work . Also, you should use version 0.0.20 of the plugin as the current version.
Also make sure that you have changed the directory path to where the pom.xml (your project directory) is situated and then try mvn eclipse:eclipse
Views
Replies
Total Likes
Maven repository configuration is in place but still am getting the error.
And this is where from I am building the maven project. In the same path POM is present.
D:\Dex\Key\key>mvn eclipse:eclipse
[INFO] Scanning for projects...
Please find the screen prints attached for the same.
Views
Replies
Total Likes
It seems that your content-maven-package plugin is not downloaded or is invalid in your path. Have you followed this (from the link)
Next, copy the Maven configuration file named settings.xml from [install location]\apache-maven-3.0.4\conf\ to your user profile. For example, C:\Users\scottm\.m2\.
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/.
Pls make sure you have this jar in C:\Users\<your_username>\.m2\repository\com\day\jcr\vault\content-package-maven-plugin\0.0.20 and it is valid
If it doesn't work, delete this folder and run maven build again, check whether the folder is created again and downloaded with necessary jar files.
Views
Replies
Total Likes
@Ahmed Now I get different error message after following your steps:
D:\Dex\Key\key>mvn eclipse:eclipse
[INFO] Scanning for projects...
[WARNING] The POM for com.day.jcr.vault:content-package-maven-plugin:jar:0.0.14
is missing, no dependency information available
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.adobe.cq:key-content:1.0-SNAPSHOT (D:\Dex\Key\key\cont
ent\pom.xml) has 2 errors
[ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:content-pack
age-maven-plugin:0.0.20 or one of its dependencies could not be resolved: Failur
e to find com.day.jcr.vault:content-package-maven-plugin:jar:0.0.20 in http://re
po1.maven.org/maven2 was cached in the local repository, resolution will not be
reattempted until the update interval of central has elapsed or updates are forc
ed -> [Help 2]
[ERROR] Unknown packaging: content-package @ line 20, column 16
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
Please suggest.
Thanks.
Views
Replies
Total Likes
Please find POM.xml for your reference:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- ====================================================================== -->
<!-- P A R E N T P R O J E C T D E S C R I P T I O N -->
<!-- ====================================================================== -->
<groupId>com.adobe.cq</groupId>
<artifactId>key</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Custom AEM Service - Reactor Project</name>
<description>Maven Multimodule project for Custom AEM Service.</description>
<!-- ====================================================================== -->
<!-- P R O P E R T I E S -->
<!-- ====================================================================== -->
<properties>
<crx.host>localhost</crx.host>
<crx.port>4502</crx.port>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-scr-plugin</artifactId>
<version>1.7.4</version>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<!-- use version 2.3.2 to have java 1.5 as the default -->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-sling-plugin</artifactId>
<version>2.0.6</version>
</plugin>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<version>0.0.20</version>
</plugin>
<!--This plugin's configuration is used to store Eclipse
m2e settings only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.felix
</groupId>
<artifactId>
maven-scr-plugin
</artifactId>
<versionRange>
[1.0.0,)
</versionRange>
<goals>
<goal>scr</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<version>4.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
<version>4.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.annotations</artifactId>
<version>1.6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.5.10</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<profiles>
<profile>
<id>autoInstallBundle</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-sling-plugin</artifactId>
<executions>
<execution>
<id>install-bundle</id>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<modules>
<module>bundle</module>
<module>content</module>
</modules>
</project>
Views
Replies
Total Likes
Change to 1.0.2 version, run the maven archetype command like this
mvn archetype:generate -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.2 -DarchetypeRepository=adobe-public-releases
Then go to your key directory and run "mvn eclipse:eclipse" command
If this doesn't work try this
mvn archetype:generate
-DarchetypeRepository=http:
//repo
.adobe.com
/nexus/content/groups/public/
-DarchetypeGroupId=com.day.jcr.vault
-DarchetypeArtifactId=multimodule-content-package-archetype
-DarchetypeVersion=1.0.2
Views
Replies
Total Likes
The issue is finally resolved. The problem is not with the version of maven.
Here is the solution:
Go to content folder of your project. Open up the pom.xml from content. In the plugins for group id: com.day.jcr.vault change the filter source to filter.xml
<filterSource>src/main/content/META-INF/vault/filter.xml</filterSource>
This will resolve the issue.
Thanks all.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies