Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

Export New Component to Server

AD-Engineer
Level 3
Level 3

Hi,

We have developed a new component, and we are trying to export it to server. Until now we have used AEM sync(VS code extension) to sync to AEM Server. But, when trying to sync core folder it does not work, because it does not have a jcr:root folder. How should we sync the core folder to server? 

We would really appreciate your help on this!

11 Replies
shelly-goel
Community Advisor
Community Advisor

@AD-Engineer  Core is supposed to hold only the java classes and on maven build these will be compiled into an OSGi bundle deployed as part of 'all' package. All the other component files should go into apps folder which you would be able to sync.

AD-Engineer
Level 3
Level 3

@shelly-goel  thanks for your reply! Yes, but we are trying to export just the core. If we get "all" package that will get the content too, right? We can not override content on the server. We need somehow to get just the core. Any idea? Thanks!

shelly-goel
Community Advisor
Community Advisor

@AD-Engineer- You can deploy core directly on the server using maven deploy command on core folder, no need to sync

mvn clean install -PautoInstallBundle

or build the jar and manually install jar present under target folder to AEM

AD-Engineer
Level 3
Level 3

@shelly-goel- This command: mvn clean install -PautoInstallBundle only deploys locally.

shelly-goel
Community Advisor
Community Advisor
@AD-Engineer - What you mean it only deploys locally? whichever server is configured in pom.xml it will deploy to that.
kautuk_sahni
Community Manager
Community Manager
@shelly-goel, good o see you back. AEM community missed the SME like you.
Nikhil-Kumar
Community Advisor
Community Advisor

@AD-Engineer 

Are you looking for something like filevault ?
Please refer this link, it shows the push and pull of files in Intellij https://aemsimplifiedbynikhil.wordpress.com/2020/08/14/develop-aem-project-with-intellij-and-using-f... 

Thanks,
Nikhil

 

Nikhil-Kumar
Community Advisor
Community Advisor
I think autoInstallPackage/autoInstallBundle along with mvn clean install should solve the problem.
asutosh_jena
Community Advisor
Community Advisor

Hi @AD-Engineer 

 

Here are the commands that will be usefule during deployment.

 

In your use case here, please use the highlighted command below.

 

To build all the modules and deploy the all package to a local instance of AEM, run in the project root directory the following command:
mvn clean install -PautoInstallSinglePackage


deploy only the bundle to the author:
mvn clean install -PautoInstallBundle


deploy only a single content package, run in the sub-module directory (i.e ui.apps)
mvn clean install -PautoInstallPackage

 

The same information will be available in every project README.md file from root directory. You should be able to get the same information from there.

 

Hope this helps!

Thanks