Small utility for uploading/downloading content to/from running AEM instance.
It's intended to be used as an external tool for IntelliJ IDEA to make content synchronization easier.
je 0.3.0
Jcr Exchange - easy download and upload files to and from JCR
USAGE:
je [FLAGS] [OPTIONS] <SUBCOMMAND>
FLAGS:
-d, --debug If enabled, deployed to AEM packages are left intact (are not deleted) to allow investigation
-h, --help Prints help information
-V, --version Prints version information
-v, --verbose Enables logs: -v - enables INFO log level -vv - enables DEBUG log level
OPTIONS:
-p, --profile <profile> Profile selection
SUBCOMMANDS:
get Downloads content to local file system
get-bundle Downloads bundle (pack of crx paths) defined in config file
help Prints this message or the help of the given subcommand(s)
init Initializes configuration file
put Uploads content to AEM instance
reinit Rewrites the configuration file with newest version
- go to releases page
- download the latest
je
archive for your OS - extract it
- include path to
je
executable into your PATH variable
cargo install je
cargo install --force je
Configuration file is not required. Without it, je
will use default configuration.
However, you can still initialize config and change it. The default configuration is also the initial
one:
❯ je init
❯ cat .je
ignore_properties = []
[[profile]]
name = "author"
addr = "http://localhost:4502"
user = "admin"
pass = "admin"
Here is more complex configuration with description of its fields:
ignore_properties = [{ type = "contains", value = "jcr:createdBy" },
{ type = "regex", value = '.*=\[]' }]
[[profile]]
name = "author"
addr = "http://localhost:4502"
user = "admin"
pass = "admin"
[[profile]]
name = "publish"
addr = "http://localhost:4503"
user = "admin"
pass = "admin"
[[bundle]]
name = "configs"
files = ["/apps/my-app/config", "/config/my-app"]
[[bundle]]
name = "dam"
paths = ["/content/dam/my-app/thumbnails", "/content/dam/my-app/files"]
ignore_properties
- tellje
which properties of.content.xml
should be removed after downloading the content; currently, two types of ignoring mechanisms are available:contains
- executesline.contains(value)
on each lineregex
- executesregex.is_match(line)
on each line, it uses Perl-style regular expressions
- profile section - you can add multiple profiles, each with settings:
name
- name of the profile, later it can be used with--profile
option to specify which instance is the target; if not specified, the first profile from the config is usedaddr
- address of the instance, including port if domain is not availableuser
- user used to authenticate to AEM instancepass
- password used to authenticate to AEM instance
- bundles section - you can define packs of files which will be synchronized in one run:
name
- name of the bundle, it can be later used with--bundle
option to specify which file pack to synchronizepaths
- which file paths are part of the bundle
⚠️ If you used older version ofje
, then you can transform the configuration file to the new form. Details below.
Details
`je reinit` will change:ignore_properties = ["jcr:created", "jcr:createdBy"]
# (...)
to
version = "0.3.0"
[[ignore_properties]]
type = "contains"
value = "jcr:created"
[[ignore_properties]]
type = "contains"
value = "jcr:createdBy"
# (...)
which is equivalent to:
version = "0.3.0"
ignore_properties = [{type = "contains", value = "jcr:created"},
{type = "contains", value = "jcr:createdBy"}]
# (...)
You can use any of those two formats. The difference is the result of this issue.
- Go to
Settings -> Tools -> External Tools
. - Add new external tool using
+
sign. - Configure the tool like on the screenshot below.
Similarly add and configure je put
command:
- if you don't have
je
in PATH, you can set full path inProgram
input Arguments
input:-vv
- sets verbose level,-vv
means DEBUG log level,-v
means INFO log level; it's optional--profile
- sets target profile; if not provided, first profile from config will be used-d
- sets debug mode in which temporary packages uploaded to AEM won't be deleted to allow validation during debugging; it's optional- subcommand (
put
orget
) $FilePath$
- IntelliJ variable which will be substituted during command execution, its absolute path to a file on which command is executed
Working directory
input:- set to
$ProjectFileDir$
allows runningje
from the project root - keep in mind that
je
will try to read config file from the set working directory
- set to
- Go to
Settings -> Keymap -> External Tools
. - Find the commands added previously.
- Set keyboard mapping by
Right Click -> Add Keyboard Shortcut
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
See CONTRIBUTING.md for hints on how to contribute to je
.