I changed the test classes from TestNG language annotations to a javadoc tag (known to TestNG). Subsequently, the tests were run and no runtime exceptions were thrown, i.e. it worked as expected.
Do I need to tell Maven2 something about my plugin needing java 1.5 lang annotations class loading? Has anyone else experienced this? Would anyone be interested in seeing more of the code, pom, etc.? Thank you, Michael -----Original Message----- From: Michael Fiedler Sent: Tuesday, January 17, 2006 4:02 PM To: Maven Users List Subject: RE: [testng-users] TestNG from a custom Maven2 MOJO/plugin Sorry that I have not tried this yet. I have been in and out of meetings all day. I will let you know the results after I run it. Michael -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 17, 2006 1:43 AM To: Michael Fiedler Cc: [EMAIL PROTECTED]; Maven Users List Subject: Re: [testng-users] TestNG from a custom Maven2 MOJO/plugin Okay, so I suspect that Maven is interfering with the class loaders in a way that is making ReflectFactory choke... Maybe a Mavenite could help us out with this? I disassembled that class with Jad but it didn't work very well, will have to try with another decompiler... -- Cedric On 1/16/06, Michael Fiedler <[EMAIL PROTECTED]> wrote: > > … always a good idea! > > > > test the class loading of 'org.testng.annotations.Test' > > Class path:…blah…;D:\data\maven_repos\testNG\testng\4.0-jdk15\testng- > 4.0-jdk15.jar;…blah… > > sun.misc.Launcher$AppClassLoader > > java.lang.Class > > org.testng.annotations.Test > > null > > null > > null > > org.testng.annotations.Test > > java.lang.Class > > org.testng.annotations.Test > > class loaded com.werner.util.UtilTest > > Running test. > > 1234567890 > > 1234567890 > > 1234567890 > > 1234567890 > > 1234567890 > > > > =============================================== > > Suite of Tests > > Total tests run: 6, Failures: 0, Skips: 0 > > =============================================== > > > > Running test. > > 1234567890 > > 1234567890 > > 1234567890 > > 1234567890 > > 1234567890 > > > > =============================================== > > Suite of Tests > > Total tests run: 6, Failures: 0, Skips: 0 > > =============================================== > > > > > > > > > > -----Original Message----- > *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > *Sent:* Monday, January 16, 2006 8:56 PM > *To:* [EMAIL PROTECTED] > *Cc:* Maven Users List; Michael Fiedler > *Subject:* Re: [testng-users] TestNG from a custom Maven2 MOJO/plugin > > > > Another suggestion/question, Michael: > > Are you running this code just straight out of javac or through Maven? If > the latter, can you just try to run it as a main() class? > > TestNG testng = new TestNG(xmlSuite); > testng.setTestJar(jarFilename); > testng.setSourcePath(srcPath.getAbsolutePath() + > ";" + testPath.getAbsolutePath()); > testng.setOutputDirectory( > metadataDir.getAbsolutePath() + "/testNG"); > testng.setVerbose(1); > testng.setGroups("Preferred"); > testng.run(); > if(testng.hasFailure () && > !testng.hasFailureWithinSuccessPercentage()) { > throw new > MojoFailureException("Testing failure occurance is too high!"); > } > > I'd like to eliminate as many factors from the equation as possible... > > -- > C�dric > -- Cédric
