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.

Maven Project Build error due to Uber Jar and geronimo-atinject_1.0_spec

Avatar

Level 2

Hey Their!

I was trying to create a YouTube Component using article. When I tried to build the project  after updating the parent POM file and core pom file (adding uber JAR and geronimo jar dependency ) build errors are happening. The parent pom, core pom and error screenshot are as follows are as follows. I tried changing the classifier from obfuscated-apis to apisbut that didn't help. It will be nice if anyone can provide any insight to fix the build error.

Sincerely

Tapas Samanta

error_mvn.JPG

core_pom.JPGparent_pom.JPG

Error Details-:

[ERROR] [ERROR] Some problems were encountered while processing the POMs:

[ERROR] 'dependencies.dependency.version' for com.adobe.aem:uber-jar:jar:obfuscated-apis is missing. @ AEMVideo:AEMVideo.core:[unknown-version], D:\Program_file

s\work_space\youtube_comp\AEMVideo\core\pom.xml, line 85, column 21

[ERROR] 'dependencies.dependency.version' for org.apache.geronimo.specs:geronimo-atinject_1.0_spec:jar is missing. @ AEMVideo:AEMVideo.core:[unknown-version], D

:\Program_files\work_space\youtube_comp\AEMVideo\core\pom.xml, line 91, column 21

[ERROR] 'build.plugins.plugin[org.apache.felix:maven-scr-plugin].dependencies.dependency.scope' for com.adobe.aem:uber-jar:jar:obfuscated-apis must be one of [c

ompile, runtime, system] but is 'provided'. @ AEMVideo:AEMVideo:1.0-SNAPSHOT, D:\Program_files\work_space\youtube_comp\AEMVideo\pom.xml, line 190, column 17

[ERROR] 'build.plugins.plugin[org.apache.felix:maven-scr-plugin].dependencies.dependency.scope' for org.apache.geronimo.specs:geronimo-atinject_1.0_spec:jar mus

t be one of [compile, runtime, system] but is 'provided'. @ AEMVideo:AEMVideo:1.0-SNAPSHOT, D:\Program_files\work_space\youtube_comp\AEMVideo\pom.xml, line 197,

column 17

[ERROR] 'build.plugins.plugin[org.apache.felix:maven-scr-plugin].dependencies.dependency.scope' for com.adobe.aem:uber-jar:jar:obfuscated-apis must be one of [c

ompile, runtime, system] but is 'provided'. @ AEMVideo:AEMVideo:1.0-SNAPSHOT, D:\Program_files\work_space\youtube_comp\AEMVideo\pom.xml, line 190, column 17

[ERROR] 'build.plugins.plugin[org.apache.felix:maven-scr-plugin].dependencies.dependency.scope' for org.apache.geronimo.specs:geronimo-atinject_1.0_spec:jar mus

t be one of [compile, runtime, system] but is 'provided'. @ AEMVideo:AEMVideo:1.0-SNAPSHOT, D:\Program_files\work_space\youtube_comp\AEMVideo\pom.xml, line 197,

column 17

@

[ERROR] The build could not read 2 projects -> [Help 1]

[ERROR]

[ERROR]   The project AEMVideo:AEMVideo.core:1.0-SNAPSHOT (D:\Program_files\work_space\youtube_comp\AEMVideo\core\pom.xml) has 4 errors

[ERROR]     'dependencies.dependency.version' for com.adobe.aem:uber-jar:jar:obfuscated-apis is missing. @ AEMVideo:AEMVideo.core:[unknown-version], D:\Program_

files\work_space\youtube_comp\AEMVideo\core\pom.xml, line 85, column 21

[ERROR]     'dependencies.dependency.version' for org.apache.geronimo.specs:geronimo-atinject_1.0_spec:jar is missing. @ AEMVideo:AEMVideo.core:[unknown-version

], D:\Program_files\work_space\youtube_comp\AEMVideo\core\pom.xml, line 91, column 21

[ERROR]     'build.plugins.plugin[org.apache.felix:maven-scr-plugin].dependencies.dependency.scope' for com.adobe.aem:uber-jar:jar:obfuscated-apis must be one o

f [compile, runtime, system] but is 'provided'. @ AEMVideo:AEMVideo:1.0-SNAPSHOT, D:\Program_files\work_space\youtube_comp\AEMVideo\pom.xml, line 190, column 17

[ERROR]     'build.plugins.plugin[org.apache.felix:maven-scr-plugin].dependencies.dependency.scope' for org.apache.geronimo.specs:geronimo-atinject_1.0_spec:jar

must be one of [compile, runtime, system] but is 'provided'. @ AEMVideo:AEMVideo:1.0-SNAPSHOT, D:\Program_files\work_space\youtube_comp\AEMVideo\pom.xml, line

197, column 17

[ERROR]

[ERROR]   The project AEMVideo:AEMVideo.it.tests:1.0-SNAPSHOT (D:\Program_files\work_space\youtube_comp\AEMVideo\it.tests\pom.xml) has 2 errors

[ERROR]     'build.plugins.plugin[org.apache.felix:maven-scr-plugin].dependencies.dependency.scope' for com.adobe.aem:uber-jar:jar:obfuscated-apis must be one o

f [compile, runtime, system] but is 'provided'. @ AEMVideo:AEMVideo:1.0-SNAPSHOT, D:\Program_files\work_space\youtube_comp\AEMVideo\pom.xml, line 190, column 17

[ERROR]     'build.plugins.plugin[org.apache.felix:maven-scr-plugin].dependencies.dependency.scope' for org.apache.geronimo.specs:geronimo-atinject_1.0_spec:jar

must be one of [compile, runtime, system] but is 'provided'. @ AEMVideo:AEMVideo:1.0-SNAPSHOT, D:\Program_files\work_space\youtube_comp\AEMVideo\pom.xml, line

197, column 17

[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/ProjectBuildingException

6 Replies

Avatar

Level 2

The issue got resolved after I chnaged the maven Arch Type version = 12. In the original article Arch Type Version was 10.

The correct maven project create command should have been

mvn archetype:generate -DarchetypeGroupId=com.adobe.granite.archetypes -DarchetypeArtifactId=aem-project-archetype -DarchetypeVersion=12 -DarchetypeRepository=https://repo.adobe.com/nexus/content/groups/public/

Avatar

Level 10

I got to work -- here is the video showing its working (see below)

But its better to use later Adobe Maven Archetype - like 12 -- Scott's Digital Community: Creating an Adobe Experience Manager 6.3 Project using Adobe Maven Archet...

Avatar

Level 10

Hi,

It will work in maven archetype 10 as well. I just now tested and it works with Maven 10 with AEM 6.3!!

Youtube.PNG

Thanks,

Ratna Kumar.

Avatar

Level 2

Hi,

Thanks for your response.

The peculiar thing is with the latest version of MAVEN 3.5.3 archetype 10 and 11 both failed. Most important thing is the API's used for following classes has been outdated. Hence I added dependency for GSON API and org.apache.httpcomponents API. I hope someone can update the original article with correct POM file.

org.apache.http.HttpEntity

org.apache.sling.commons.json.JSONObject

Thanks

Tapas

Avatar

Level 10

We will update this article to AEM 6.4 and Maven Arch 13.