Highlighted

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

Avatar

Avatar

tapass90533210

Avatar

tapass90533210

tapass90533210

19-06-2018

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

Replies

Highlighted

Avatar

Avatar

tapass90533210

Avatar

tapass90533210

tapass90533210

19-06-2018

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/

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

19-06-2018

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...

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

19-06-2018

Highlighted

Avatar

Avatar

Ratna_Kumar

MVP

Avatar

Ratna_Kumar

MVP

Ratna_Kumar
MVP

19-06-2018

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.

Highlighted

Avatar

Avatar

tapass90533210

Avatar

tapass90533210

tapass90533210

20-06-2018

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

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

20-06-2018

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