Synchronize AEM and eclipse

 Hello everyone,

In this post we will see how we can synchronize AEM with eclipse editor. Before that make sure you have installed aem plugin on eclipse Install AEM plugin on eclipse (rjaem.blogspot.com) .

Now update the project structure

For that go to module -->right click -->maven-->update project -->select the module--check the checkboxes including Force update of Snapshots/release-->ok.

Now let's define the project facets for our modules to do that go to module --> right click -->properties-->Project facets --> select content module , java , sightly -->Apply -->Apply and Close.

Project facets: Facets define characteristics and requirements for Java EE projects and are used as part of the runtime configuration.
When you add a facet to a project, that project is configured to perform a certain task, fulfill certain requirements, or have certain characteristics.

After this sync module root path with aem server go to module --> right click -->properties-->AEM--> browse-->src/main/content/jcr_root-->Apply-->Apply and Close
after all the done it will look like below
Now we will sync/connect AEM and eclipse so whatever changes we are doing in eclipse it will get updated in crx we can called it a hot deployment as well.
for this in eclipse go to window-->perspective-->open perspective-->AEM. Once you are in AEM perspective we can see the server view, either you will have server added or you need to add it.
I don't have server available so I will add it. Click the link --> Adobe--> Adobe Experience Manager --> move modules which you want to deploy to AEM server--> Finish 
while adding server you are giving the correct port number on server if your server is running on 4502 mention the same port number in server in eclipse, to do that double click on server --> go connection section--> Port -->save -->start server 
if you have not added resource/module then right click on server -->add/remove--> add the module you want-->finish
I have added ui module we can see it is synchronized.
Now you don't need to write everything in crx editor you can simply write it in eclipse, and it will be available in crx.
To import the changes from crx to eclipse change anything in crx editor go to eclipse -->right click on folder/file -->import from server and you will be able to see the changes from crx. How cool it is.


KEEP EDUCATING YOURSELF!!!!

Comments

Popular posts from this blog

AEM in docker

Sling API vs JCR API

Creating or finding .M2 folder