On another note I created a OSGi Bundle with Sling-Initial-Content and it deploys and works just fine. That said using the latest Eclipse with the Sling Plugin trying to deploy it fails as it tells me that I am missing a META-INF/MANIFEST.MF.
!ENTRY org.apache.sling.ide.eclipse-core 2 0 2017-11-24 09:34:33.327 !MESSAGE Project P/sling-initial-content-bundle does not have a META-INF/MANIFEST.MF (yet) - not publishing this time Any way to make this deploy? Am I correct assuming that the Sling Plugin on Eclipse should deploy a module automatically or does it require a “Publish” on the Server? Cheer - Andy Schaefer > On Nov 23, 2017, at 2:56 PM, Andreas Schaefer <[email protected]> wrote: > > Hi Robert > > See my notes inlined: > >> On Nov 22, 2017, at 1:25 AM, Robert Munteanu <[email protected]> wrote: >> >> Hi Andreas, >> >> On Tue, 2017-11-21 at 15:42 -0800, Andreas Schaefer wrote: >>> Hi >>> >>> Last and this year I am working on a IntelliJ Plugin to help develop >>> Sling / AEM >>> projects. Since the start I ran into issue with the Sling Tooling IDE >>> code base >>> as the code is geared towards Eclipse and its use of OSGi. Despite >>> several >>> tries to come up with a resolution to create a code base that would >>> work equally >>> all for IntelliJ and Eclipse there was not progress made towards a >>> solution. >> >> Yes, I am aware of that :-( I still don't have a good answer on how to >> build AEM and IntelliJ plugins together. If you have examples or ideas >> how to do that I'd be happy to work towards that goal. >> >> The idea would be simple: allow plain Maven artifacts to be consumed by >> both an IntelliJ Maven build and an Eclipse Maven build. This is >> currently complicated due to the Tycho/p2 implementation which requires >> p2 update sites over http. > > There are a few things that I needs to be done: > > 1. Make common code like impl-vlt eclipse agnostic. If you want or need > an Activator / Logger then we can create an interface and then you wrap > this in an eclipse module. > > 2. Shared code that interacts with the IDE needs to be written in a way > that each plugin can extend or delegate it and the common code is left > in a non-eclipse module. IntelliJ right now uses a class that contains common > IDE code and its access to the remote server. Then IntelliJ plugin is > extending that class providing the integration with IntelliJ. > > I would be willing to create the same wrapper for Eclipse if someone can > show where to find the necessary Eclipse code like IServer, IFile etc and > the implementation of it. I tried to find it but could not find in a > reasonable > amount of time. > >> >>> >>> That said since then there are other issues that came up which make >>> developing >>> and using an Plugin difficult: >>> >>> 1. There is no support for developing and deploying parts of a Sling >>> Content Bundle >>> as the only way to deploy content is building and deploying the >>> bundle. >> >> What do you mean by Content Bundle? If you are talking about bundles >> using the content loader [1], then support is there for deployment. >> When a bundle is deployed, all output resources should be gathered in >> the output directory and the proper manifest generated. The only >> limitation I'm aware of is while working in debug mode [2]. > > Ok, I will take a Content Bundle and test that. > >> >> >>> 2. IntelliJ (and I assume Eclipse) Plugin cannot import resources >>> from Sling / AEM >>> from a Sling Content Bundle >> >> With the same understanding of content bundles, we only support content >> packages. That was the pattern we saw most used developing AEM and >> Sling apps, and that is the one we support right now. > > If my content is stored in a SLING-INF folder can I import a resource > from Sling using the plugin? > >> >>> >>> 3. IntelliJ and Sling (AFAIK) do not support OSGi bundle deployment >>> as part of a >>> JCR Package which can lead to problems with OSGi bundles in Sling >>> (not sure about >>> AEM). This is an general issue with embedded bundles when they are >>> deployed >>> both as embedded and standalone archive. >> >> I'm curious, why would you want to deploy an OSGi bundle when working >> on a content package? I would rather configure them as bundle modules >> and allow deployment to work independently of content packages. >> >> Is it only because the bundle is deployed by both the JCR installer and >> then also via the Web Console? If so, I'd like to hear some examples of >> what goes wrong, to see if we can fix them or work around them. > > Having my bundles embedded inside a Content Package is to make sure > that both are in sync. For example if I updated my page (resource) as well > as the Sling Model it uses then I can deploy it together. > > I installed Eclipse Oxygen, the latest from Sling (Git) and started it. Then > I took a sling project that has a core (OSGi bundle) and an ui.apps that > has the core embedded but also contains resources. When I deploy this > manually (via Maven) then any updates to the core bundle will not be > taken effect in Sling until I deploy it again from Maven. > > This is AFAIK due to the fact that the bundle from the package overrides > any deployments directly to the OSGi container and this is also a problem > if someone deploys the bundle manually or through bundle deployment > tool after a JCR package with that bundle is deployed. > > A plugin should be able to deploy the bundle as part of the package > from within the plugin if embedded bundles are supported in Sling. > >> >>> >>> >>> This list makes me think that the Sling Tooling IDE module is not >>> actively developed >>> anymore. Please let me know what you plans are so we can adjust it on >>> our end. >> >> The IDE tooling is actively developed, just not at the pace it used to >> be. Most 'core' features are there, and we're now mostly doing >> polishing, maintenance, and incremental fixes. >> >> Hope that answers you questions. >> >> Robert >> >> [1]: https://sling.apache.org/documentation/bundles/content-loading-jcr >> -contentloader.html >> [2]: https://issues.apache.org/jira/browse/SLING-4091
