https://github.com/microbean/microbean-launcher
A Java program and CDI extension that assembles a classpath from a list of user-supplied Maven-style artifact coordinates and runs a CDI 2.0 container with that classpath.
https://github.com/microbean/microbean-launcher
cdi cdi-application cdi-extension java java-library main maven microbean
Last synced: about 1 year ago
JSON representation
A Java program and CDI extension that assembles a classpath from a list of user-supplied Maven-style artifact coordinates and runs a CDI 2.0 container with that classpath.
- Host: GitHub
- URL: https://github.com/microbean/microbean-launcher
- Owner: microbean
- License: apache-2.0
- Created: 2017-04-04T05:41:20.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-03-03T15:10:56.000Z (about 8 years ago)
- Last Synced: 2025-03-21T17:04:02.582Z (about 1 year ago)
- Topics: cdi, cdi-application, cdi-extension, java, java-library, main, maven, microbean
- Language: Java
- Homepage: https://microbean.github.io/microbean-launcher/
- Size: 557 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# microBean Launcher
[](https://travis-ci.org/microbean/microbean-launcher)
[](https://maven-badges.herokuapp.com/maven-central/org.microbean/microbean-launcher)
The microBean Launcher project enables the composition of a CDI
application by (a) providing a `main` method and (b) supporting an
effective classpath consisting of Maven-style artifact coordinates.
Given such an environment, a CDI application can be composed out of
its Maven-repository-addressable constituent parts by simply
specifying them on the command line.
## Command Line
To run a CDI SE application from the command line, ensure that this
project and its runtime dependencies are present on your classpath,
and then type:
java org.microbean.launcher.main.Main --artifact-path com.foobar:foobar-frobnicator:1.0 com.bizbaw:bizbaw-caturgiator:2.0
…where `com.foobar` and `com.bizbaw` are Maven-style group
identifiers, and `foobar-frobnicator` and `bizbaw-caturgiator` are
Maven-style artifact identifiers, and `1.0` and `2.0` are Maven-style
version identifiers.
The end result will be that these dependencies will be [resolved][0]
to the local filesystem using
the [Maven Artifact Resolver componentry][1], and their local
filesystem representations will be assembled into a classpath.
Obviously, if the artifacts in question already exist in the local
Maven repository, then no resolution will take place.
Once the classpath has been thus established, the [microBean Main][2]
project's `Main` class' [`main` method][3] will be invoked with that
classpath.
[0]: https://maven.apache.org/components/resolver/maven-resolver-api/apidocs/org/eclipse/aether/RepositorySystem.html#resolveDependencies(org.eclipse.aether.RepositorySystemSession,%20org.eclipse.aether.resolution.DependencyRequest)
[1]: https://maven.apache.org/components/resolver/maven-resolver-api/apidocs/
[2]: https://microbean.github.io/microbean-main/
[3]: https://microbean.github.io/microbean-main/apidocs/org/microbean/main/Main.html#main-javax.enterprise.inject.se.SeContainerInitializer-java.lang.String:A-