Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro >> mail # user >> Classpath for java


Copy link to this message
-
Classpath for java
Hi,

I'm having trouble understanding how the class path is being set by
maven for java.

When I run a unit test using the maven surefire plugin
cd lang/java
mvn -Dtest=org.apache.avro.mapred.TestWordCount test -X

The output shows the following directories are on the classpath.
lang/java/mapred/target/test-classes
lang/java/mapred/target/classes
lang/java/ipc/target/classes
lang/java/avro/target/classes

But when I try to execute a class (I put a main method in
lang/java/.../Pair.java for testing)
 mvn exec:exec -Dexec.mainClass=Pair -X

Only
lang/java/target/classes
is on the path.

So I'm trying to determine how to configure the exec plugin to properly
set the class path so that I can execute programs.

If anyone has any pointers I would greatly appreciate it.

Thanks

J
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB