When you are developing an application for Apache Sling or AEM, it is often very
helpful to set up a speedy synchronization of content you're developing
in your IDE (such as .content.xml files creating resources, .html, .jsp, .css and .js files)
into the JCR repository of your local development environment. Even if a local build
and deployment takes only one minute, that can still considerably slow down your
workflow, especially if you're doing frontend development. Fortunately, there are
quite a number of possibilities to do that. The goal of
this article is to give some pointers on how to achieve that, and give some examples
for some methods.
Some general possibilities
This collects some pointers, though I didn't try out many of them.
See also here
for the opposite process of downloading from the JCR.
Deployment from the build process
If you're working with Apache Maven as a build system,
you will probably want to set up automatical deployment of the generated artifacts from your local build
process to your Sling or AEM instance via maven plugins like the
Apache Sling Maven Plugin
or the newer
Content Package Maven Plugin.
Both have goals for automatic deployment, the Content Package Maven Plugin also has a
download goal to update the stored content from JCR.
If your project is small, that might suffice, but if it is larger, that will take a couple of
minutes, so it could be a painful interruption to your development process, and you might want
speedier alternatives transferring only what was changed.