Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Mojo (mvn plugin) to generate all UNIx command scripts from found commands #64

Open
rmannibucau opened this issue Oct 28, 2015 · 0 comments

Comments

@rmannibucau
Copy link
Contributor

If my module has these commands:

  • foo --options=cfrf
  • bar dummy --op=s
  • ...

then I should get the following scripts:

  • foo // usage: ./foo --options=cfrf
  • bar-dummy // usage: ./bar-dummy --op=s

The scripts will support help:

./foo help

will execute the command help foo

and

./bar-dummy help

would execute the command help bar dummy

To find commands the Mojo will support:

Finally includes/excludes option and outputFolder will be added as configurable parameter to the Mojo.

Side note: it is probably a good idea to add a __find_java script (the name should just not conflict with commands) to share the logic of the JAVA finding then to get java command scripts can do:

proc_script_base=`cd $(dirname $0) && cd .. && pwd`
source "$(dirname $0)/__find_java"
$JAVA ....

Tip: https://github.com/apache/tomee/blob/master/tomee/apache-tomee/src/main/resources/tomee.sh#L24 or tomcat scripts can be used as model to find the right java command

For the classpath the same trick will be applied using another script not generated for the first version (another issue can be opened to generate a full assembly). It means the user will have to provider a __set_classpath script initializing CREST_CLASSPATH environment variable and scripts will just reuse this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant