0

This might seem like a silly question to some people but since I'm new to Maven I have been stuck on it since a few days so here goes.

I have 2 maven projects ProjectA & ProjectATest in same workspace,having their own pom files. The 1st pom generates a WAR file . The second pom file generates a shaded jar file.

Currently to run the jar file I have to first execute the build command on ProjectA & ProjectATest and then run the jar file from command line.

Is there a maven goal through which I can run the jar file when I trigger the build for ProjectA?? or tigger the execution of main class of ProjectATest after the build of ProjectA is successful??

Lucy
  • 1,812
  • 15
  • 55
  • 93
  • Which server do you use? (Tomcat, wildfly etc..). Also can you share your pom.xmls – xxlali Dec 26 '16 at 08:55
  • Check this..http://stackoverflow.com/questions/15869784/how-to-run-a-maven-created-jar-file-using-just-the-command-line – Sunil Singh Bora Dec 26 '16 at 08:59
  • @SunilSinghBora I'm currently using the steps mentioned in the answer you posted. I wanted to know is there a maven command which can execute a jar file instead of from cmd? – Lucy Dec 26 '16 at 09:02

0 Answers0