Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chirino/mop
Cleans up your Java classpath mess - easily run any Java application from the command line.
https://github.com/chirino/mop
Last synced: 3 months ago
JSON representation
Cleans up your Java classpath mess - easily run any Java application from the command line.
- Host: GitHub
- URL: https://github.com/chirino/mop
- Owner: chirino
- License: apache-2.0
- Created: 2009-09-05T17:16:00.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2010-09-09T15:34:26.000Z (over 14 years ago)
- Last Synced: 2023-03-10T19:25:57.310Z (almost 2 years ago)
- Language: Java
- Homepage: http://mop.fusesource.org
- Size: 816 KB
- Stars: 8
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: license.txt
Awesome Lists containing this project
README
![Mop][1]
==========Description
-----------[Mop][2] is a small utility for executing Java programs which are stored as artifacts like jars or bundles in a Maven repository.
Mop automatically deals with the following for you
* transitive dependencies
* downloading artifacts from remote repositories and caching them locally
* building the application classpathSynopsis
--------Currently supported generic commands:
* `mop classpath` : displays the classpath for the artifact
* `mop copy` : copies all the jars into the given directory
* `mop echo` : displays the command line to set the classpath and run the class's main() method
* `mop exec` : spawns a separate process to run the class's main() method in a new JVM
* `mop execjar` : spawns a separate process to run the Main class from the executable jar in a new JVM
* `mop fork` : Forks a new child JVM and executes the remaining arguments as a child Mop process
* `mop install` : Installs the given artifacts in the given target directory
* `mop jar` : uses an embedded class loader to run the Main class from the executable jar
* `mop run` : uses an embedded class loader to run the class's main() method
* `mop shell` : Forks a new child process by running an external commandCommand extensions:
* `mop broker` : Starts an Apache ActiveMQ broker along with the web console. You can use broker:version to specify the ActiveMQ version
* `mop camel-example-pojo` : Runs the Apache Camel POJO Messaging Example. For more see: http://camel.apache.org/pojo-messaging-example.html
* `mop cloudmixAgent` : Starts a CloudMix agent
* `mop guice` : Runs the given artifact(s) by starting a Guice injector and injecting all of the given modules listed on the command line
* `mop karaf` : Starts an embedded Karaf container and deploys the given artifact(s) inside it
* `mop servicemix` :
* `mop spring` : Runs the given artifact(s) by starting the XML application context specified as an argument or defaults to META-INF/spring/\*.xml
* `mop war` : runs the given (typically war) archetypes in the jetty servlet engine via jetty-runnerExamples
--------Need to build a script file to start your java application and you having a hard time setting up a class path that contains all the dependencies? Mop can help. Just capture the result of the `mop classpath` command in the `CLASSPATH` variable:
$ CLASSPATH=`mop classpath commons-logging:commons-logging:1.1`
$ echo $CLASSPATH
/opt/mop/repository/commons-logging/commons-logging/1.1/commons-logging-1.1.jar
:/opt/mop/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar:/opt/mop/repository/lo
gkit/logkit/1.0.1/logkit-1.0.1.jar:/opt/mop/repository/avalon-framework/avalon-
framework/4.1.3/avalon-framework-4.1.3.jar:/opt/mop/repository/javax/servlet/se
rvlet-api/2.3/servlet-api-2.3.jarThe following example will boot up one of the [Apache Camel][3] example programs
mop run org.apache.camel:camel-example-pojo-messaging org.apache.camel.spring.Main
The `mop run` command takes a maven artifact name then a Java class name along with optional command line arguments. The maven artifact uses the following format
* `[groupId:]artifactId[[:type[:classifier]]:version]`
Note that that you can omit the group id, type, classifier and version. You typically may supply
just groupId, artifactId, version if you like - or if you really need to specify type (jar/war etc) and
classifier if needed.Project Links
-------------* [Project Home][2]
* [Release Downloads](http://mop.fusesource.org/downloads/index.html)
* [GitHub](http://github.com/chirino/mop/tree/master)
* Source: `git clone git://forge.fusesource.com/mop.git`[1]: http://mop.fusesource.org/images/mop-logo-small.png "Mop"
[2]: http://mop.fusesource.org "Project Home Page"
[3]: http://camel.apache.org "Camel Home Page"