adobe / aem-eclipse-developer-tools

The Eclipse plugin that brings you the full connection to the Adobe Experience Manager, with auto-sync and project creation wizard.
Apache License 2.0
35 stars 23 forks source link

Project is creating in broken state #78

Closed saggammahesh closed 7 years ago

saggammahesh commented 7 years ago

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 commented 7 years ago

Do you have more details in the eclipse error log?

On May 5, 2017 17:01, "saggammahesh" notifications@github.com wrote:

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" [image: core_issue] https://cloud.githubusercontent.com/assets/7000621/25748647/6a04d88e-31c9-11e7-9d44-2d4ec6bc909e.png

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.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Adobe-Marketing-Cloud/aem-eclipse-developer-tools/issues/78, or mute the thread https://github.com/notifications/unsubscribe-auth/AABS9R4s75BTBdO7eF6cMtr5mdau7FW-ks5r2yu_gaJpZM4NR9Rx .

sduvan commented 7 years ago

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

akfaircg commented 7 years ago

@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:

`

bundle-manifest process-classes manifest

`

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 commented 7 years ago

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

sduvan commented 7 years ago

Also worked for me, thanks!

rombert commented 7 years ago

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 commented 7 years ago

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

rombert commented 7 years ago

Applied, thanks @akfaircg !

appsparkler commented 7 years ago

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 commented 7 years ago

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

kwin commented 6 years ago

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 https://github.com/tesla/m2eclipse-tycho/issues/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?