commit | 30921a76369f34af9258fd3fc4f916325665877c | [log] [tgz] |
---|---|---|
author | Robert Munteanu <rombert@apache.org> | Wed Jan 04 00:27:34 2023 +0200 |
committer | Robert Munteanu <robert.munteanu@gmail.com> | Wed Jan 04 09:51:25 2023 +0100 |
tree | 7efa71cdcc97e93141fe0a5110bfd56e03d48a95 | |
parent | 3af5be35cf8ec5520bc1e239ca6b70d75172de99 [diff] |
SLING-11747 - Unable to override the built-in content package feature model extension Configure an 'endorsed' directory for the assembly. This directory can be used to drop in jar files that have priority on the classpath, such as the content extension.
The Feature Model Launcher can launch an feature model application file to a running process.
The launcher can be executed as follows:
java org.apache.sling.feature.launcher.impl.Main
or via the Java Main class of the jar file:
java -jar org.apache.sling.feature.launcher.jar
The following command line options are supported:
java -jar org.apache.sling.feature.launcher.jar -h usage: launcher -C <arg> Set artifact clash override -CC <arg> Set config clash override -c <arg> Set cache dir -D <arg> Set framework properties -f <arg> Set feature files (relative and absolute file path or URL including classloader resources) -i <arg> Set the id for the launch feature -p <arg> Set home dir -u <arg> Set repository url -V <arg> Set variable value -ec <arg> Set Extension Configuration (format: extensionName:key1=val1,key2=val2) -fv <arg> Set Felix Framework version -fa <arg> Set Framework Artifact (overrides felix framework version) -v Verbose
The launcher creates a local cache, by default in a subdirectory called launcher
. If you want to run the launcher with a clean start, delete this directory before invoking the launcher.
rm -rf launcher && java -jar org.apache.sling.feature.launcher.jar -h
Note: if feature files are provided as a Classloader Resource like in an executable JAR file or classpath resource then it's Resource URL can be handed over to the Launcher as feature file (-f option):
java.net.URL url = getClass().getResource("/my-feature-file.json"); String[] arguments = new String[] { "-f", url.toString() }; org.apache.sling.feature.launcher.impl.Main.main(arguments);
For further documentation see: https://github.com/apache/sling-org-apache-sling-feature/blob/master/readme.md