开发者

How to configure Maven-exec plugin with java classpath

开发者 https://www.devze.com 2023-03-24 08:03 出处:网络
i am trying to run the maven-exec plugin with referring the jar file as classpath like this <configuration>

i am trying to run the maven-exec plugin with referring the jar file as classpath like this

<configuration>
  <executable>java</executable>
  <longClasspath>true开发者_C百科</longClasspath>
  <commandlineArgs>-classpath jarfile; Sample
  </commandlineArgs>
</configuration>

but my classpath is not set properly thus thrown an classNotFoundException. How to configure this?


Your classpath shouldn't end with a semicolon. Just -classpath jarfile Sample, assuming that "Sample" is the name of the class you're trying to run. I'd also eliminate the newline at the end of that command line string to be safe.

0

精彩评论

暂无评论...
验证码 换一张
取 消