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

Hability to execute java ('exec:java') without requiring a maven project, and allow dependency resolution #187

Open
tbrugz opened this issue Dec 4, 2020 · 1 comment

Comments

@tbrugz
Copy link

tbrugz commented Dec 4, 2020

exec:java currently needs a maven project (pom.xml) to load the project dependencies in order to find the main class (and its dependencies). It would be nice to run a exec:java without this requirement, so the goal could resolve dependencies passed by command line arguments and run the main method (also passed by command line argument).

exec:java goal could be altered, or a new goal (say, exec:anyjava) could be created so the impact on exec:java would be minimum. Also, a mechanism similar to dependency:get would be needed to resolve the dependencies that are passed by command line.

I have some working code that I'll send in a PR soon.

@bmarwell
Copy link
Contributor

bmarwell commented Apr 8, 2022

Hey, I do not know your use case, but JBang might suit your needs:

For example: https://github.com/apache/sling-whiteboard/blob/8c9d3aa8518b62af4a6f2e29c61d00db79fb9371/jbang/SlingStarter.java

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

2 participants