Maven exec plugin- how to include “system” classpath?

后端 未结 4 780
情话喂你
情话喂你 2020-12-17 14:35

I have a project that uses \"system\" scope to specify a jar file included in my project\'s WEB-INF/lib dir. This artifact is not in any of the maven repositori

4条回答
  •  無奈伤痛
    2020-12-17 15:12

    As E.G. pointed out, the solution is to use the compile scope when running exec.

    On each invocation:

    mvn exec:java -Dexec.classpathScope=compile
    

    or directly in the exec-plugin-configuration:

         
            org.codehaus.mojo
            exec-maven-plugin
            ...
            
                  compile
            
        
    

提交回复
热议问题