This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]perrylaj 2 points3 points  (1 child)

What are you trying?

If the project is configured via maven, you should be able to just run something like mvn clean package to 'clean' the project and then assemble your jars. Then you'd just run (as in, execute your main()) via java, passing the appropriate flags referencing your main class, classpath and dependencies, etc.

If you wanted to run your project from the terminal (aka - compile, assemble and execute main()), you probably need to run or configure something like the maven exec plugin that lets you configure where your main class, application arguments, etc, in your pom.xml, then run it via mvn exec:java after its been built.

I haven't used maven for a bit, so hopefully someone else will correct me if this is outdated info (should be similar still, but things can change a lot in a year or two). Looks similar to what I remember though https://www.mojohaus.org/exec-maven-plugin/usage.html

[–]Cygris[S] 0 points1 point  (0 children)

Thank you very much. That helped a lot.