Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

AEM 6.1, org.apache.felix.scr.annotations.jar is MISSING in etc/profiles/default/libs

Avatar

Level 2
I'm able to create a Bundle in CRXDE Lite, add to it a simple java class, compile and build it. The problem come when I try to add SCR-annotations to the same class, for example: @Component, @Service, @SlingServlet, @Properties and other. 

I read in some cq5 docs that org.apache.felix.scr.annotations.jar should be inside etc/profiles/default/libs, but this jar is MISSING there. I tried to import the org.apache.felix.scr.annotations.jar gotten from the maven repository but this jar in not AEM compatible. 

Is there any way, any place where I can get org.apache.felix.scr.annotations.jar from?, and install it inside etc/profiles/default/libs?

I know that Adobe is recommending to use Maven to create bundles from cq5, however I haven't read anything about to remove the support for JCR annotations in CRXDE Lite.

Any help?

9 Replies

Avatar

Level 10

You are correct - use Maven to build OSGi bundles and you will have no issues. Here is how you build services (OSGI bundles) using MAven:

https://helpx.adobe.com/experience-manager/using/first-osgi.html

There is no reason or benefit trying to get OSGi bundles developed working with CRXDE lite. Its quite the opposite - you will encounter issues like this. 

Avatar

Level 2

Yes, but it's not a solution to the issue yet. Maven is a complex alternative for someone that want to create and build just simples bundles. 

I'm suspecting that the Adobe trainer/teacher delivered to my company an incomplete AEM copy, probably intentional. It's very suspicious: a MISSING library, just the one that allow us to create bundles using annotation.

You get my point?

Avatar

Level 10

If you want to - i can setup a connect session and then show you how to use Maven to build Bundles.  Its very easy. 

We have many community dev artilces that will show you how to build OSGi bundles and using Apache annotations. In fact many people have commented that once they start using Maven - they find it very easy, 

CRXDE lite just does not work properly as you are seeing. There are many issues and Adobe ENg team will not be fixing them - its an out dated way. 

 I would strongly encourage you to stop using it. 

Avatar

Level 2

Ok, I got the point. 

"I would strongly encourage you to stop using it." is a pretty way to say "you can not use it to build bundles, it's not going to work!". 

Excuse me for being so honest but after waste more than three days trying to solve this issue my mood is not very good. I really appreciate your time and faster response, thanks a lot. 

On the other hand, yesterday I gave up to use CRXDE Lite. I began to use Maven with absolute success, but it's going to cause us a few problems: 

- The team are using Brackets to develop de project. We were using Brackets to synchronize the project's package with the AEM repository in both ways (import/export). With maven there are two commands to publish in the repository (bundles and apps), but I need vlt to get back any change made in the repository. Right?

Any pluggin to integrate those commands inside Brackets?

- We already have many assets (templates, pages, components, etc) created in our current project and I have to figure out how to export them to the new Maven project and file structure. Any tools for this one?

Thanks

Avatar

Level 10

No problem - i am sorry for your hard time with CRXDE lite

We just had an Ask the Community Experts on Brackets. You can watch it here: 

http://scottsdigitalcommunity.blogspot.ca/2016/01/ask-community-experts-session.html

In summary - Brackets is meant for front end developers - not back end OSGi Java guys.

As mentioned in Lokesh presentation - one way you can build OSGi is using Eclipse plug-in - which is calling Maven anyhow.  

I will ask Lokesh whom give that webinar to take a look at this thread. He can provide more info on Brackets and how back end teams that develop OSGi backend development co-operate with Bracket development.

Hi, 

AEM projects has 2 parts to it. 

1. Templates and components mainly used for front end 

2. Services using Java which can b used by the components

Eclipse has an AEM plugin which can be used to create the AEM project and can be used to sync(both import and export) from crx. 

Brackets can be used mainly for developing components using sightly. This also has the capability to both import/export to crx

Note: with these plugins, you don't need vault to sync with repo

Yes, I know it, but all our team-members works in both ends (front/back). What I want to avoid is to have multiples IDEs for the same project, mainly Eclipse, but at this point I think that my best/only choice is to deal with it. ;-)

Essentially you can use any IDE which you are comfortable with but eclipse with its AEM plugin help in hot deployment. :)

Avatar

Level 1
        Hai, I am new to aem but for me the best way of creating the bundle is through maven mvn clean install.Because i was able to create 3 to 4 bundle through maven and able to upload to the aem through webconsole