0

Any body have tactics for doing this? I hate babysitting the CLASSPATH. From the Ksh, I try

for i in `find ~/.m2/repository/ -print`
do
   export CLASSPATH=$i:$CLASSPATH
done

echo $CLASSPATH //admittedly, very long
cd $MY_PROJ/target/test-classes/
java -cp .:$CLASSPATH  com.my.MyApp

//but this does not work [arg list too long] error

any ideas?

LRI CS
  • 161
  • 10
  • Why would you do that instead of letting maven pull in what it needs for a particular project? – azurefrog May 29 '14 at 19:28
  • becasue I have to run the test from a KornShell command line prompt – LRI CS May 29 '14 at 19:29
  • but why not just `mvn test`? – azurefrog May 29 '14 at 19:30
  • cuz i dont know how! :-( is there a way to say `mvn test` that only executes that one test case? – LRI CS May 29 '14 at 19:32
  • The maven repository can have a practically unlimited number of jars, which is why maven only grabs what it wants. Almost any solution to get around the size limit for grabbing them all will just break again once you add another couple thousand jars to your maven repo. – azurefrog May 29 '14 at 19:32
  • 1
    Go take a look at the [Surefire Plugin](http://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html), it gives you more granularity with your testing than a vanilla `mvn test`. – azurefrog May 29 '14 at 19:34
  • 1
    This is also discussed in this question: http://stackoverflow.com/questions/1873995/run-a-single-test-method-with-maven – azurefrog May 29 '14 at 19:35
  • will this plugin allow me to work from a KornShell command line (or do I necessarily have to be in an IDE)? I appreciate that my need to do this from a ksh command line may be arbitrary, but it is required. thanks for your inputs BTW, appreciated. – LRI CS May 29 '14 at 19:36
  • AH. Very nice. thank you! You have gifted me the solution and I am grateful. Thank you. :-) – LRI CS May 29 '14 at 19:37
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/54743/discussion-between-azurefrog-and-lri-cs). – azurefrog May 29 '14 at 19:38
  • i work at a bank and it is blocking my access to your chat invite. :-( – LRI CS May 29 '14 at 19:40
  • but the link you provided brings me remedy! thank you. – LRI CS May 29 '14 at 19:40

0 Answers0