Deploying OSGI bundles using eclipse | Community
Skip to main content
perfecci0nista
Level 2
February 1, 2017
Solved

Deploying OSGI bundles using eclipse

  • February 1, 2017
  • 3 replies
  • 3324 views

I have created the AEM multi module project and am able to auto sync changes directly to AEM instance (6.2). However, what is the process to install OSGI bundle directly AEM. I see my bundle in console which was created (I think) while AEM multi module project on eclipse as it is creating the file structure (component, templates...).

I have tried installing the bundle using the maven command: ../Developement\eclipse-luna\AEM\ss\core>mvn -Pauto-deploy -Dcrx.url=htt
p://localhost:84502 clean install

The commad output says Build successful. Could you please provide me steps to deploy OSGI bundles using eclipse or maven for AEM 6.2. 

Environment:

AEM 6.2

Eclipse Luna

Apache Maven 3.3.9

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

Please have a look at the link mentioned by Ratna, this is the exact thing you might be looking for.

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

// Creating your first Adobe Experience Manager 6.2 Project using Adobe Maven Archetype 10

Video :- https://www.youtube.com/watch?v=7EC1EdSs72U

~kautuk

3 replies

Prince_Shivhare
Community Advisor
Community Advisor
February 1, 2017

Hi,

You can navigate to folder where you want to keep project files. now in command line and type the command:

mvn archetype:generate -DarchetypeGroupId=com.adobe.granite.archetypes -DarchetypeArtifactId=aem-project-archetype -DarchetypeVersion=10 -DarchetypeRepository=https://repo.adobe.com/nexus/content/groups/public/

It is Maven archetype 10 project. it will ask you for:

  • groupId -
  • artifactId -
  • version - 1.0-SNAPSHOT
  • package -  
  • appsFolderName -
  • artifactName - 
  • componentGroupName 
  • contentFolderName 
  • cssId -
  • packageGroup 
  • siteName -

Input all the names accordingly. and after build the package you should get success.

Now Navigate to your project folder and type mvn eclipse:eclipse

and now in Eclipse

Click on File>Import>Existing project into workspace>select the root directory 

select your project folder and click finish.

After these steps you can type command 

mvn clean install -PautoInstallPackage to see your files and folder in AEM Instance.

 

Make sure to add this dependency in main project POM file. Ex.- C:\myproject\testproject

 

<dependency>
               <groupId>com.adobe.aem</groupId>
               <artifactId>uber-jar</artifactId>
               <version>6.2.0</version>
               <classifier>obfuscated-apis</classifier>
               <scope>provided</scope>
           </dependency>
             
           <dependency>
               <groupId>org.apache.geronimo.specs</groupId>
               <artifactId>geronimo-atinject_1.0_spec</artifactId>
               <version>1.0</version>
               <scope>provided</scope>
           </dependency>

 

and in core package POM file Ex.- C:\myproject\testproject\core add this dependency.

        

        <dependency>

        <groupId>javax.inject</groupId>

        <artifactId>javax.inject</artifactId>

        <version>1</version>

        </dependency>

 

Hope this helps

- Prince

Ratna_Kumar
Level 10
February 1, 2017

Hi,

As prince stated, it is correct. 

See this community article, how to create an AEM project by using Maven Adobe Archetype 10, it tells end to end how to deploy AEM 6 project using maven archetype 10 using Eclipse.

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

Hope this helps!

~Ratna.

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
February 1, 2017

Please have a look at the link mentioned by Ratna, this is the exact thing you might be looking for.

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

// Creating your first Adobe Experience Manager 6.2 Project using Adobe Maven Archetype 10

Video :- https://www.youtube.com/watch?v=7EC1EdSs72U

~kautuk

Kautuk Sahni