Showing posts with label IntelliVault. Show all posts
Showing posts with label IntelliVault. Show all posts

Tuesday, June 2, 2020

Integrate AEM CRX Repository with IntelliJ using IntelliVault



Integrate AEM CRX Repository with IntelliJ using IntelliVault plugin

Most of us use IDE either Eclipse or IntelliJ Idea for doing our development work of AEM projects but one of the challenging parts of the job is to sync our code with CRX repository. We want to quickly see our changes, especially while we work on dialogs, HTML, and JS. Once we change something in the repo and don’t want to lose it after deploying our code again. It's too painful to copy-paste your changes to CRX or deploy code each time. 

We often do this by using FileVault or packaging our work using CRX package manager and then copying at our project codebase.
IntelliVault is a plugin for IntelliJ IDE to interact with JCR repositories via the FileVault tool which is already packaged within AEM. This plugin allows you to push/pull to/from CRX whenever you want. We also have VaultClipse for the Eclipse IDE.

Steps to configure FileVault to IntelliJ:

Step 1: Follow the trusted source for the plugin of IntelliJ 

             https://plugins.jetbrains.com/plugin/7328-intellivault


IntelliVault IntelliJ plugin



Step 2: Click Install to IDE. It will automatically add this plugin to IntelliJ.

Step 3: Restart IntelliJ

Step 4: You can check your plugin in IntelliJ by following below path:

            Go to file > settings > Plugin


Plugins in intelliJ


Step 4: Filevault.zip is already present in AEM Crx-Quickstart. Go to below place to check FileVault:

            <AEM-Install>\crx-quickstart\opt\filevault

Step 5: Go to <AEM-Install>\crx-quickstart\opt\filevault
          Unzip vault-cli-3.4.4.zip file
vault-cli

Step 6:  Plugin is installed so let’s connect our IDE with AEM. Now in IntelliJ
             Go to file > settings > Tools > IntelliVault

configure vault plugin to intelliJ

  • Enter Vault Directory path: <AEM-Install>\crx-quickstart\opt\filevault\vault-cli-3.4.4
  • Add repository "author" for Author Instance and "publish" for Publish instance.
  • Check Username and password of CRX repository. Default username/password: admin/admin
  • Temp Directory path is taken by default. You can also change this path.
  • File ignore Patterns: By default, some patterns like .svn, .vlt, CVS, .DS_Store are ignored. You can add any other pattern if you do not want to sync with FileVault. Show operation dialog is checked by default.
Step 7: Click Apply and Ok. It will do Re-indexing

Step 8: Restart IntelliJ

All Done! Our IntelliJ is ready to interact with our CRX repository.


Step 9: Now let us make some changes in my HTML file.


html file


Now Right-click to file, Click IntelliVault. You will see two options. 

Pull from CRX: Click if you want to pull code from the CRX-repository.

Push to CRX: Click if you want to push your code to CRX-repository.

Here, I did change in my code base and want to push my code to CRX.
It will export code to CRX from your local IntelliJ project.

Intellivault push to crx

When you select an option then a prompt opens to select the repository. You 

can select "author" if you want to push/pull code to the Author environment. 

Similarly, select publish for Publish environment.

Intellivault configure repository


When you click OK then Run IntelliVault runs and asks for the import/export code.

Intellivault configuration

Click yes.

After a successful operation, you will receive the below message.


Intellivault successful publish message

And You can see IntelliVault logs to send code CRX/de. it will show all content and nodes.


Intellivault data nodes push to crx


Now the last point to check your changes to CRX.


crxde


Your Changes are updated in CRX. 😅


ElasticSearch vs Apache SolrCloud

  Elasticsearch and Apache SolrCloud are both powerful, distributed search engines built on top of Apache Lucene. Both Elasticsearch and S...