java - Trying to run mvn exec and getting mojo exception on plugin -


so running

mvn exec:java -dexec.mainclass=”com.utm.csc.htmlparser” -dexec.args=”http://www.simplehtmlguide.com” 

for java project. runs in eclipse command above, gives me following errors:

[info] scanning projects... [info]                                                                          [info] ------------------------------------------------------------------------ [info] building assignment1 1.0-snapshot [info] ------------------------------------------------------------------------ [info]  [info] --- exec-maven-plugin:1.4.0:java (default-cli) @ assignment1 --- [warning]  java.lang.classnotfoundexception: ”com.utm.csc.htmlparser” @ java.net.urlclassloader.findclass(urlclassloader.java:381) @ java.lang.classloader.loadclass(classloader.java:424) @ java.lang.classloader.loadclass(classloader.java:357) @ org.codehaus.mojo.exec.execjavamojo$1.run(execjavamojo.java:281) @ java.lang.thread.run(thread.java:745) [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 1.064 s [info] finished at: 2016-01-24t16:17:21-05:00 [info] final memory: 9m/155m [info] ------------------------------------------------------------------------ [error] failed execute goal org.codehaus.mojo:exec-maven-    plugin:1.4.0:java (default-cli) on project assignment1: exception occured while executing java class. ”com.utm.csc.htmlparser” -> [help 1] [error]  [error] see full stack trace of errors, re-run maven -e switch. [error] re-run maven using -x switch enable full debug logging. [error]  [error] more information errors , possible solutions, please read following articles: [error] [help 1] http://cwiki.apache.org/confluence/display/maven/mojoexecutionexception 

this image of paths

enter image description here

i using os x el capitan on 64-bit macbook air mid-2012. doing incorrectly?

the error giving argument incorrectly. command should be:

mvn clean compile exec:java -dexec.mainclass=com.utm.csc.htmlparser -dexec.args=http://www.simplehtmlguide.com 

notice lack of quotes. can hinted error message:

java.lang.classnotfoundexception: ”com.utm.csc.htmlparser”

means somehow, java searched class called ”com.utm.csc.htmlparser” didn't find any, because named com.utm.csc.htmlparser, without quotes.


Comments