Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project is creating in broken state #78

Closed
saggammahesh opened this issue May 5, 2017 · 11 comments
Closed

Project is creating in broken state #78

saggammahesh opened this issue May 5, 2017 · 11 comments
Labels

Comments

@saggammahesh
Copy link

Hi Team,
I am trying to create a multi module project, but it's failing.
I am getting an error "Could not update project training.core.configuration Java.lang.IllegalArgumentException"
core_issue

Below are the different versions i am using.
Java - 1.8
Eclipse Version: Neon
Maven - Inbuilt one comes with eclipse - 3.3.9

Please let me know what is the issue and how to resolve.

@rombert
Copy link
Collaborator

rombert commented May 5, 2017 via email

@rombert rombert added this to the 1.1.2 milestone May 9, 2017
@sduvan
Copy link

sduvan commented May 16, 2017

@rombert @saggammahesh
Same issue here, was playing with the new Archetype, v11. I am also on Eclipse Neon 3, verified my settings.xml (as per Adobe's recommendation). Issue is also reproducible when project is created through CMD:

mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeGroupId=com.adobe.granite.archetypes -DarchetypeArtifactId=aem-project-archetype -DarchetypeVersion=11 -DarchetypeCatalog=https://repo.adobe.com/nexus/content/groups/public/

However I can run successful Maven commands outside my IDE (Eclipse).

mvn clean install -PautoInstallPackage

and even the bundle install works through CMD:

mvn clean install -PautoInstallBundle

aem bundle project sructure

The issue seems to be a IDE related. Attached is the screenshot of my bundle (core) project. It does not reflect a correct Maven structure.

  • PS: Verified that Archetype v10 just works fine.

@akfaircg
Copy link

akfaircg commented May 17, 2017

@rombert,
I faced the same problem. I believe the problem is in the following code snippet that I took from the generated pom.xml in core module in the deceleration of the felix plugin:

<executions> <execution> <id>bundle-manifest</id> <phase>process-classes</phase> <goals> <goal>manifest</goal> </goals> </execution> </executions>

I found the followoing issue that I think is related to this one. When I removed the above code and updated the project through maven in eclipse, everything worked fine and I was able to upload the modules to an AEM instance through eclipse.

@saggammahesh
Copy link
Author

@akfaircg
Thanks Mate, It started working after removing those few lines.

@sduvan
Copy link

sduvan commented May 17, 2017

Also worked for me, thanks!

@rombert
Copy link
Collaborator

rombert commented May 17, 2017

Thanks for tracking down the issue @akfaircg . Would you be willing to submit a pull request for https://github.com/Adobe-Marketing-Cloud/aem-project-archetype/ with a fix?

@akfaircg
Copy link

@rombert, I just submitted a pull request to https://github.com/Adobe-Marketing-Cloud/aem-project-archetype/. Thanks!

@rombert
Copy link
Collaborator

rombert commented May 24, 2017

Applied, thanks @akfaircg !

@appsparkler
Copy link

thanks a lot @akfaircg!

@rombert, request you to help me understand. In this thread you've mentioned Applied; however, when i run mvn archetype:generate....., those lines are still there in the core/pom.xml file. Are there any specific steps to get the project without the code-block that is causing the issue?

Thanks & Regards,
Akash

@rombert
Copy link
Collaborator

rombert commented Sep 13, 2017

@appsparkler - this is not yet included in a release, will be there in version 12 of the archetype.

@kwin
Copy link

kwin commented Nov 30, 2017

I don't agree with the fix here. Removing the manifest execution has negative sideeffects as unit tests relying on Sling Mocks or AEM Mocks might no longer execute successfully. For details look at http://felix.apache.org/documentation/faqs/apache-felix-bundle-plugin-faq.html#use-scr-metadata-generated-by-bnd-in-unit-tests.

So the real solution is to get rid of the m2-tycho plugin at all (also compare with tesla/m2eclipse-tycho#31). maven-bundle-plugin since version 3.2.0 added support for Eclipse natively. This will be fixed in the upcoming version of Sling IDE (https://issues.apache.org/jira/browse/SLING-6112). But in no case the manifest goal should be completely removed.

A full explanation of the issue described here can be found in http://sling.apache.org/documentation/development/ide-tooling/ide-tooling-incremental-build.html.

@rombert Can you revert the fix please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants