https://github.com/apache/sling-org-apache-sling-feature-launcher
Apache Sling Feature Launcher
https://github.com/apache/sling-org-apache-sling-feature-launcher
java osgi osgi-feature-model sling
Last synced: 7 months ago
JSON representation
Apache Sling Feature Launcher
- Host: GitHub
- URL: https://github.com/apache/sling-org-apache-sling-feature-launcher
- Owner: apache
- License: apache-2.0
- Created: 2018-04-26T20:52:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-21T11:37:39.000Z (10 months ago)
- Last Synced: 2025-03-17T12:21:49.124Z (7 months ago)
- Topics: java, osgi, osgi-feature-model, sling
- Language: Java
- Homepage: https://sling.apache.org/
- Size: 291 KB
- Stars: 5
- Watchers: 31
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://sling.apache.org)
[](https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-feature-launcher/job/master/) [](https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-feature-launcher/job/master/test/?width=800&height=600) [](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-feature-launcher) [](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-feature-launcher) [](https://www.javadoc.io/doc/org.apache.sling/org-apache-sling-feature-launcher) [](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.sling%22%20a%3A%22org.apache.sling.feature.launcher%22) [](https://github.com/apache/sling-aggregator/blob/master/docs/group/feature.md) [](https://www.apache.org/licenses/LICENSE-2.0)
# Feature Model Launcher
The Feature Model Launcher can launch an feature model application file to a running process.
The launcher can be executed as follows:
``` bash
java org.apache.sling.feature.launcher.impl.Main
```or via the Java Main class of the jar file:
``` bash
java -jar org.apache.sling.feature.launcher.jar
```The following command line options are supported:
``` bash
java -jar org.apache.sling.feature.launcher.jar -h
usage: launcher
-C Set artifact clash override
-CC Set config clash override
-c Set cache dir
-D Set framework properties
-f Set feature files (relative and absolute file path or URL including classloader resources)
-i Set the id for the launch feature
-p Set home dir
-u Set repository url
-V Set variable value
-ec Set Extension Configuration (format: extensionName:key1=val1,key2=val2)
-fv Set Felix Framework version
-fa Set Framework Artifact (overrides felix framework version)
-v Verbose
```## Cache
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.
``` bash
rm -rf launcher && java -jar org.apache.sling.feature.launcher.jar -h
```## Feature Files as Classloader Resources
**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);
```# References
For further documentation see: https://github.com/apache/sling-org-apache-sling-feature/blob/master/readme.md