Git Product home page Git Product logo

Comments (5)

pun-ky avatar pun-ky commented on August 19, 2024

Currently you have to use separate SCR plugin to cover it. This will not be a part of AEM plugin any longer due to instability. Take a look at neva/gradle-scr-plugin (at my private repo).

It is recommended to use standarized OSGi annotations in new projects. Gradle AEM plugin usage is not designed to be used in existing projects due to problems with understanding Gradle after using Maven by developers. Basing on my experience, such practice ends with bad Gradle reputation and bad practices being introduced because many times Maven approaches could not be mapped 1 to 1 to Gradle. Such mappings could be done even simpler by doing it in a completely different way.

To sum up, lacking support is intentional but could be covered separately by one of external plugins.

As I know, both plugins (Neva's and Janvolck's) have defect related with descriptors not being regenerated sometimes. I know the fix and it was included when SCR was a part of AEM plugin. If you are really stucked, I can fix and release Neva's plugin especially for you so you will be unblocked, but you will be must be aware of that SCR generator has strange internal issue with compile classpath. Still better than using SCR I am recommending to just update your annotations, because adoption to new standard is very easy and does not take a lot of time. I have been close to 2 such migrations and generally they ended without serious problems.

from gradle-aem-plugin.

pun-ky avatar pun-ky commented on August 19, 2024

about

AEM is tightly coupled with Felix thus support for Felix SCR annotations is crucial.

agree, but in detail, Felix consists of Declarative Services. SCR is just a form of managing OSGi services like iPojo (http://felix.apache.org/documentation/subprojects/apache-felix-ipojo.html) or Blueprint (http://aries.apache.org/modules/blueprintannotation.html) . In AEM 6.2 there is upgraded Felix with Declarative Services in version 1.3 which is backward compatible (http://njbartlett.name/2015/08/17/osgir6-declarative-services.html). So I am definitely concinved that as you said, SCR annotations are not crucial, because there are so many alternatives.

If you could adapt your project for completely new technology like Gradle, you could probably also adapt your code to new form of same thing, like registration of OSGi services. I thinking here in case of openness for new technologies.

from gradle-aem-plugin.

michalwronowski avatar michalwronowski commented on August 19, 2024

It is not the matter of not being able to adapt to new standard, what as you wrote is indeed trivial.
It is the matter of being consistent with the standard present on the platform we are developing on.

If it is not a big deal for you to release fixed version of Neva's plugin, please do so. I'll gladly try it out.
I'm also open for discussion about that strange internal issue just to assess the risk of using the plugin.

from gradle-aem-plugin.

pun-ky avatar pun-ky commented on August 19, 2024

On Mon when I'll back from my free time I'll do my best and try to release it for you.

As I said earlier, Gradle plugin is designed to be used by new projects which are using AEM >= 6.2, so they should use new standard. When still fallback exists, then some devs couldn't even know that new standard exists and trick will just cause that they have to use it in a proper way. That approach really gives value, because code becomes more AEM agnostic and could be even ported to other platforms based on OSGi. If there was some reason or feature that SCR have, but OSGi annotations (parsed by BND tool) haven't, then I will agree with you that missing SCR is really crucial, but as I know it just isn't.

from gradle-aem-plugin.

pun-ky avatar pun-ky commented on August 19, 2024

as mentioned earlier, SCR support will be no longer part of AEM plugin project so I am closing that issue as it is descoped. I will inform you about changes in Neva SCR plugin personally.

from gradle-aem-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.