I print the classpath is printed before TestNG is run, and it's clear that JCommander is in the classpath. Now from the size, the testng-6.3.1.jar that's in the Maven repo looks like the distribution jar that has no BSH or Guice. BSH is on the classpath. If you add Guice, it still fails. If you instead use the full testng-6.3.1.jar that's distributed in the TestNG zip, it works fine.
> I print the classpath is printed before TestNG is run, and it's clear that > JCommander is in the classpath. Now from the size, the testng-6.3.1.jar > that's in the Maven repo looks like the distribution jar that has no BSH or > Guice. BSH is on the classpath. If you add Guice, it still fails. If you > instead use the full testng-6.3.1.jar that's distributed in the TestNG zip, > it works fine.
> Please look into this.
> -- > You received this message because you are subscribed to the Google Groups > "testng-dev" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/testng-dev/-/_n36O816Fc8J. > To post to this group, send email to testng-dev@googlegroups.com. > To unsubscribe from this group, send email to > testng-dev+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/testng-dev?hl=en.
*Caused by: java.lang.ClassNotFoundException* * * This project is too simple to be missing anything. It only references one class, org.testng.annotations.Test. If there is something missing on the classpath, I'm saying it's not my fault. There seems to be something wrong with the jars or poms that are on the Maven repo.
testng.jar in the Maven repository has *no* dependencies, only the TestNG classes. By definition.
If you're using ivy, it should have downloaded all the classes you need, you might want to rm your .ivy directory and try to compile again, just to make sure you don't have a corrupt set of jar files.
> To post to this group, send email to testng-dev@googlegroups.com. > To unsubscribe from this group, send email to > testng-dev+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/testng-dev?hl=en.
Compiled from "ParameterException.java" public class com.beust.jcommander.ParameterException extends java.lang.RuntimeException{ public com.beust.jcommander.ParameterException(java.lang.Throwable); public com.beust.jcommander.ParameterException(java.lang.String);
> To post to this group, send email to testng-dev@googlegroups.com. > To unsubscribe from this group, send email to > testng-dev+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/testng-dev?hl=en.
Thank you very much for looking into it. Sorry for the accusations.
I figured it out. The example I gave was never going to work because it needs to have TestNG on the runtime classpath inside the <testng> task. My project was not working because I was misunderstanding the Ant pathelement path attribute. I was using