java - Maven Install but will not execute -


in my pom.xml file have:

<dependency>     <groupid>org.apache.hadoop</groupid>     <artifactid>hadoop-core</artifactid>     <version>1.1.0</version> </dependency> 

now, in source have line :

import org.apache.hadoop.util.programdriver; 

when run mvn install, of code compiles perfectly. however, when run mvn exec:java, class not found error -- org.apache.hadoop.util.programdriver can not found.

why able install code , not able run it? thanks.

i using org.codehaus.mojo exec plugin.

not working configuration:

<mainclass>mymainclass</mainclass> <executabledependency>      <groupid>org.apache.hadoop</groupid>      <artifactid>hadoop-core</artifactid> </executabledependency> 

check this

simply add pom.xml

<configuration>       <executable>java</executable>       <arguments>         <argument>-dmyproperty=myvalue</argument>         <argument>-classpath</argument>         <!-- automatically creates classpath using project dependencies,              adding project build directory -->         <classpath/>         <argument>com.example.main</argument>         ...       </arguments> </configuration> 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -