Convert the project into an Eclipse project
We can use a Maven command to do this.
Navigate to the project directory.
Execute the following command:
mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true
The project is converted into a Maven project.
Import project into Eclipse and create a Run configuration
- In Eclipse, select Import > Existing Project Into Workspace.
- Navigate to the project directory and select Finish.
- Bundle and Content projects get imported into the current workspace.
- Update the POM files of respective projects, so the bundle and content are created in the aem-company project (that we have been working with.)
- In the bundles’s POM, update the Sling URL property as follows:<slingUrl>http://${crx.host}:${crx.port}/apps/aem-company/install</slingUrl>
- In the Content POM, change the target configuration from myproject to aem-company:
<embeddeds>
<embedded>
<groupId>${project.groupId}</groupId>
<artifactId>myproject-bundle</artifactId>
<target>/apps/aem-company/install</target>
</embedded>
</embeddeds>
- Create a Run profile.
- Select Run > Run Configuration.
- Under Maven Build, right-click > New.
- Name it as AEM.
- Update Base Directory to your project’s base directory.
- Add the following:
Profile: AutoInstallBundle
Save the configuration.
- Using CRXDE Lite, navigate to apps/aem-company.
- Create a folder named install.
- Now run the configuration.
(If you didn’t get it correctly, download the project from my GitHub account.)
No comments:
Post a Comment
If you have any doubts or questions, please let us know.