1

I am trying to build the multi module maven project but getting the error as below.

 Unresolveable build extension: Plugin com.day.jcr.vault:content-package-maven-plugin:0.0.24 or one of its dependencies could not be resolved: Failure to find com.day.jcr.vault:content-package-maven-plugin:jar:0.0.24 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 2]
 Unknown packaging: content-package @ com.prj.prj.aem:aem-parent.ui.apps:[unknown-version], C:\latest\prj\ui.apps\pom.xml, line 34, column 16

I have the jar file content-package-maven-plugin-0.0.24.jar at C:\Users\user.m2\repository\com\day\jcr\vault\content-package-maven-plugin\0.0.24 location

Vivek Dhiman
  • 1,967
  • 6
  • 46
  • 82
  • 2
    possible duplicate of [Force maven update](http://stackoverflow.com/questions/4701532/force-maven-update) – Tunaki Sep 30 '15 at 09:58
  • Did you copy the jar file manually into the cache or via "mvn install". Manual copying will not work, as maven checks some meat information that is added via "mvn install" but not if you manually copy the jar file into the cache. – Matthias J. Sax Sep 30 '15 at 10:38
  • @Tunaki I run mvn clean install -U which is success. But when I add my profile with that it gives be again resolution error as : aused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com.prj.prj.aem:aem-parent.core:bundle:1.0.0-SNAPSHOT: The following artifacts could not be resolved: com.adobe.aem:aem-api:jar:6.0.0.1, com.adobe.acs:acs-aem-commons-bundle:jar:2.0.0: Could not find artifact com.adobe.aem:aem-api:jar:6.0.0.1 in central (https://repo.maven.apache.org/maven2) – Vivek Dhiman Sep 30 '15 at 10:50
  • This jar is available in .m2 folder,I think fallback not happening. Also not sure from where repo.maven.apache.org/maven2 is coming as in my pom.xml I have written it no where. – Vivek Dhiman Sep 30 '15 at 10:53
  • Any Idea, its finding the artifacts from https://repo.maven.apache.org/maven2 but it should do it from another repo thats already defined in pom.xml – Vivek Dhiman Oct 01 '15 at 03:58

3 Answers3

2

You can do this.

mvn clean package -DskipTests -U -e

Notice that -U means to reload the jars from maven, that ignore the cache jars in your local file system.

Wassim Dhif
  • 1,278
  • 12
  • 21
Qi Wei
  • 51
  • 3
1

Do you have the Adobe profile in your settings? https://docs.adobe.com/docs/en/aem/6-2/develop/dev-tools/vlt-mavenplugin.html (section "Obtaining the Content Package Maven Plugin")

I had the same issue as you, and resolved it by setting the activeByDefault to true in .m2/settings.xml

Javier
  • 36
  • 1
0

I faced a similar issue while using IntelliJ IDEA. Problem was that Idea has set a different maven home as I need to.

When you have this problem also with Idea, check your Settings -> Maven -> Maven home directory setting, if it is set as you need to.

bednarb
  • 89
  • 1
  • 6