Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Deploying OSGI bundles using eclipse

Avatar

Level 3

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

1 Accepted Solution

Avatar

Correct answer by
Administrator

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

View solution in original post

3 Replies

Avatar

Community Advisor

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

Avatar

Level 10

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.

Avatar

Correct answer by
Administrator

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