mojohaus / exec-maven-plugin

Exec Maven Plugin

Home Page:https://www.mojohaus.org/exec-maven-plugin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

tbrugz opened this issue · comments

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.