Search This Blog

Thursday 29 August 2019

Setup Eclipse IDE and useful plugins for AEM development







Maven plugin

Latest eclipse come with built in maven plugin.

 

Setting up Java doc /JAutoDoc plugin.

Search JAutodoc in the eclipse marketplace and install it.


Start explorer plugin

Works both in mac and windows.
Search start explorer in eclipse marketplace and install it. Directly goto directory from eclipse.



Log4j plugin




Multiple eclipse workspaces



Java Source Attacher




Code coverage







EclEmma Java Code Coverage

Sonar lint plugin

Yaml editor plugin.


Eclipse shortcuts imp.


1.    Ctrl + Shift + T 

Find class with fully qualified class name.

2.    Ctrl + Shift + R

Find any file by name.

3.    Ctrl + Shift + o 

for organize imports

4.    f3

to enter the method from the place it’s been called.

5.     Ctrl + Shift + F 

for formatting

6.    Ctrl + shift + X

to uppercase

7.    Ctrl + shift + Y

to lowercase

8.    Ctrl + 2 + l

hit this after semicolon/end of line to automatically create LHS object.

9.    Ctrl + o

Find a method in a class.


Tuesday 20 August 2019

How do Dynamic media renditions get created for an asset on the fly



Renditions get created from image presets. Create image presets in aem and they are automatically synced to scnee 7 server. Now you can use this asset in dynamic media component and also configure the preset in the component. Now this particular preset rendition will be picked up automatically from DM on the fly. 

1.  Create image preset – “desktop-preset” 990/990

     





The image you see on the right is just sample image to show the size of the preset.

Although the format is selected as png the preset will apply to all images.


2.  Preset is automatically applied to image on scene7





3.  You can copy the url from here and use it in aem if you want to add it in the image src.


4.  Also see the difference in the scene 7 server url and the external url
                        
             Scene 7 url - https://s7sps1.scene7.com/IpsWeb/ 


The external url works only when there is a green tick in the scene 7 server ie the image has been published to external url.







5.  Now configure the preset in the dynamic media component on a page.







The component makes a call to the scene 7 server and renders the rendition on the fly.



The preset also appears on the left rail