mavenjettymaven-jetty-plugin

Is there a way to add directories to the classpath in the maven jetty plugin from the command line


I am running jetty with maven using the jetty plugin using the command mvn jetty:run.

Is there a command line option to add an external directory to the classpath? Something like the java -cp option?

TIA


Solution

  • Have you tried the solution suggested here:

    Adding classpath to jetty running in maven integration-test

    <webAppConfig>
      <contextPath>/nportal</contextPath>
      <!-- All I want to do here is add in the /etc/jetty/classes for runtime files. For some reason I have to also add back in the /target/classes directory -->
      <extraClasspath>${basedir}/target/classes/;${basedir}/etc/jetty/classes/</extraClasspath>
    </webAppConfig>