Pre-Requisite: To have installed AEM Plugin. Refer to my prev blog to install AEM Plugin.
Once you have installed the plugin,
Step 1: Click on New > Project > Select ‘AEM Sample Multi-Module Project’ under AEM and click ‘Next’
Step 2: Choose a workspace or check on ‘Use default workspace’ and Select an Archetype and Click on ‘Next’. Sometimes, on windows you might have issue in getting Archetype. Then see here
Step 3: Enter the Project details like Name, Group Id and Artifact Id and Click ‘Next’
Step 4: Set up a new server. Enter the details and credentials. Click on ‘Finish’
Step 5: Project gets created with 5 modules. core, apps, content, tests and launcher with the below folder structure.
- core: Java bundle containing all core functionality like OSGi services, listeners or schedulers, as well as component-related Java code such as servlets or request filters.
- ui.apps: contains the /apps (and /etc) parts of the project, ie JS&CSS clientlibs, components, templates, runmode specific configs as well as Hobbes-tests
- ui.content: contains sample content using the components from the ui.apps
- ui.tests: Java bundle containing JUnit tests that are executed server-side. This bundle is not to be deployed onto production.
- ui.launcher: contains code that deploys the ui.tests bundle (and dependent bundles) to the server and triggers the remote JUnit execution
Step 6: Right click on the Servers and Click on ‘Add and Remove’. Add the modules which needs to be synched/deployed on the server and Click ‘Finish’
After, this once you start the server all the modules which are added gets deployed on the server and further you can develop. You can use ‘Export to Server’ and ‘Import from Server’ to push and pull the code.
In the current version of AEM plugin, there is a known issue in syncing cq node types cq:page, cq:widgetCollections etc.. Click here to see how to resolve the same.