Skip to content

Instantly share code, notes, and snippets.

@ubaid-me
Last active September 18, 2017 11:01
Show Gist options
  • Save ubaid-me/9abe382411517f7b16db776ed8c397af to your computer and use it in GitHub Desktop.
Save ubaid-me/9abe382411517f7b16db776ed8c397af to your computer and use it in GitHub Desktop.
Adobe AEM 6.0 OSGi Bundle Setup

Use following helpful link:

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

Step 1: you must have following things setup

  1. Java
  2. Maven

Step 2: Run following command to generate project type

mvn archetype:generate -DarchetypeRepository=http://repo.adobe.com/nexus/content/groups/public/ -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.2 -DgroupId=com.adobe.cq -DartifactId=key61 -Dversion=1.0-SNAPSHOT -Dpackage=com.adobe.cq -DappsFolderName=myproject -DartifactName="My Project" -DcqVersion="5.6.1" -DpackageGroup="My Company"

A project will be generated for you.

Setp 3: Go to bundle folder, open pom.xml file under <artifactId>maven-sling-plugin</artifactId> add following

<version>2.3.0</version>

The above is important, because old version had an issue which raises problem during build execution. You can read more about the issue here adobe/aem-project-archetype#56

Step 4: You can now run build by following command:

mvn clean install -PautoInstallBundle

The above command will assume that you are running your instance on 4502 port. to change port modify command as following

mvn clean install -PautoInstallBundle -Dcrx.port=4503

Now, goto your /system/console/bundles/ URL and filter the bundles by typing the name of project you selected. Default is 'My Project'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment