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

Not getting JCR Properties in Eclipse after adding AEM Dev Tools #64

Closed NeLk42 closed 4 years ago

NeLk42 commented 8 years ago

I know it's been mentioned a few times and all seemed to be human error, and I 'm guessing mine will be a case of human error as well, but I'm starting to go nuts here.

Installed AEM Dev Tools

screenshot 2016-02-15 18 29 30

With the Developer tools installed I created an AEM project using archetype 7, AEM perspective was working fine, I was reading the JCR properties and all, all worked fine.

I have to work with other guys so I uploaded it to github, and just to test if everything was working fine I then downloaded it and I was able to clone it no problem. But ended up with a project imported that wasn't showing any JCR properties. AEM perspective was doing nothing for me this time.

This is my .gitignore just in case you think I'm removing something important, I believe it follows Adobe documentation

screenshot 2016-02-15 18 51 49

I'm not getting the JCR properties displayed in Eclipse nor I am able to see an option inside the Properties of the apps project with AEM.

According to your documentation, Eclipse Luna is supported ( Using: Version: Luna Release (4.4.0) )

No tab or anything showing up to point it towards the jcr root folder.

screenshot 2016-02-15 18 47 57

No JCR properties displayed in any node.

screenshot 2016-02-15 18 59 13

I can "force" the aem-angular-demo.ui.apps project to show the AEM tab by going into its properties and including a Project Facet of "Content module" like follows :

screenshot 2016-02-15 18 58 03 screenshot 2016-02-15 18 58 13

And after that, the project of apps will actually display the JCR Properties

screenshot 2016-02-15 19 03 10

But this workaround worries me tremendously, because the rest of the projects are not setup as per default. For example: When I create a multimodule AEM using eclipse each project has something "Faceted"

Core and Tests are using a facet of "Bundle Module"

screenshot 2016-02-15 19 08 04 screenshot 2016-02-15 19 07 47

Whereas Content and Apps are using "Content Module" instead

screenshot 2016-02-15 19 07 35 screenshot 2016-02-15 19 07 24

I could force all those four projects to use each of those facets, but those are the things I've noticed they have different, I have the feeling that there's more going on behind scenes and that the plugin is taking care besides setting up these facets, so instead of trying to force the things I am aware of (and miss by omission the things that I am not aware of) I'd like to know what am I doing wrong when importing this project, because I've been trying for several hours now and the behaviour I'm getting is inconsistent.

From time to time after reinstalling Eclipse (and the plugin) or deleting the project and re-cloning it (I've tried with at least 4 different repos, all offer inconsistent behaviour) sometimes I'd be able to import it with an AEM tab and with the JCR properties showing (Eclipse was actually treating that project as an AEM project) but then I'd try to do the same a second later to make sure I'd found the right configuration / instalation settings / with another project and it would fail. This inconsistent behaviour is driving me nuts, can someone please point me out what am I missing? I'd like to have the certainty that every developer in my team that ends up using that repo will be able to import it with all the JCR properties loading properly.

rombert commented 8 years ago

Thanks for the detailed report. The reason for the inconsistency is that the facet information is stored in the .settings directory. That one is typically included in the .gitignore rules and not pushed to git.

When you clone a project from git you don't receive those files and therefore the project is not defined as a content project. For bundle projects this works but it's not easy to address for content packages.

What I suggest you do is for each project, after importing from git, right-click and click on Configure -> Convert to Content Package. This will ensure that all the right facets and builders are configured.

NeLk42 commented 8 years ago

Converting projects to Content package will only make sense for the Content and Apps modules, the rest of them are not content and don't need access to JCR properties, right?

What about the Bundle projects, is there no need for us to convert them to Bundle Packages?

Last but not least, would you consider eventually adding the option to import AEM projects to Eclipse to properly set them up like when you create a new project instead of having to take these workarounds? It would also be interesting to add these things to the AEM Dev Tools Plugin documentation (forgive me if it has already been added but I wasn't able to find it properly referenced to this issue of importing a project from a repo)

rombert commented 8 years ago

Converting projects to Content package will only make sense for the Content and Apps modules, the rest of them are not content and don't need access to JCR properties, right?

Right

What about the Bundle projects, is there no need for us to convert them to Bundle Packages?

No, that one is done automatically when a project has the maven-sling-plugin configured.

Last but not least, would you consider eventually adding the option to import AEM projects to Eclipse to properly set them up like when you create a new project instead of having to take these workarounds?

Yes, that is on the roadmap. SLING-3100 has more details about it.

It would also be interesting to add these things to the AEM Dev Tools Plugin documentation (forgive me if it has already been added but I wasn't able to find it properly referenced to this issue of importing a project from a repo)

Agreed, I'll add them to the documentation.

NeLk42 commented 8 years ago

Ok, thanks for all your help!

rombert commented 8 years ago

I'll close this as a dupe of #49 since it's about content packages import. The good news is that it's very likely that the next release will have this content package import ( documentation included ).

rombert commented 8 years ago

Hm, #49 is about something else, let's reopen until the Sling issue is closed.

kiranhsgithub commented 7 years ago

Is Eclipse Neon supported? I am able to successfully install dev tools and can sync files with AEM. But it is currently not showing JCR properties even after I navigate from "Content Navigator".

image

rombert commented 7 years ago

@kiranhsgithub - yes, that should work. Can you file a new issue about it an attach any relevant Eclipse error.log entries?

kiranhsgithub commented 7 years ago

@rombert thanks. Created an issue and attached logs #80

gabrielwalt commented 4 years ago

Closing this as there hasn't been activity for over a year.