Re: Got 'initializationError' when run junit test class with maven.
Hi, Wayne, Thanks for your continuous attention to my question. Seem that I should dig more before posting a question. :-) I am just going to answer my questions by myself. Q: Is there a switch in maven to let me get all the tracking stack? A: - We can find out the exception track stack in the surefire report after execution the command: mvn surefire-report:report surefire report with HTML format file under ../target/site/surefire-report.html. What I have done: 1. Execute *mvn -Dmaven.surefire.debug test*, and configure the default listening port(5005) on your IDE. 2. I found out the root cause - Test classes can not load the xml files which contain all test data files properly... Let me ignore my mistake, just give the final solution here. Maven Test ClassPath:..target/test-classes/ XML input data file: ..target/test-classes/data/input.xml My solution: InputStream inputStream = MyJunitTest.class.getResourceAsStream( "/data/input.xml"); Thank you! 2008/12/15 Wayne Fay > > I can not address this issue only by this error. > > The people on this list probably can't address this issue only by the > info in the email. Can you package up a sample project that shows the > error, and attach it to a new JIRA issue? > > > Is there a switch in maven to let me get all the tracking stack? Or is it > > result from the compatiblity issue among maven, junit and JDK? Any > > suggestions would be welcome. > > Did you try "mvn -X test" and/or scanning the output provided by > Surefire (in target/surefire-reports)? > > Wayne > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: Got 'initializationError' when run junit test class with maven.
> I can not address this issue only by this error. The people on this list probably can't address this issue only by the info in the email. Can you package up a sample project that shows the error, and attach it to a new JIRA issue? > Is there a switch in maven to let me get all the tracking stack? Or is it > result from the compatiblity issue among maven, junit and JDK? Any > suggestions would be welcome. Did you try "mvn -X test" and/or scanning the output provided by Surefire (in target/surefire-reports)? Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Got 'initializationError' when run junit test class with maven.
Hi, all, I am encounting with a fatal error while I try to run Junit by maven. I give the information of my env as followings. *Information of maven installed on my local host.* Command : mvn --version - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Java version: 1.6.0_03 Default locale: zh_CN, platform encoding: UTF-8 OS name: "linux" version: "2.6.27-10-generic" arch: "i386" family: "unix" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *Junit Test Jar And Configration.* junit-4.5.jar. Currently, I am building the project C. Pro-C has a direct parent Pro-B and Pro-B has a direct parent Pro-A. A and B were designed with pom packaging. Junit related dependence declaration in A. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - junit junit 4.5 ... in B - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ... junit junit test ... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - None in C. *My Test Case Design*: @RunWith(Parameterized.class) *Result*: I executed mvn:test to try get all my test classes run. Unfortunately, maven reported a error to me and just showed the type of error - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Tests in error: initializationError(FULL_CLASS_NAME). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I can not address this issue only by this error. Is there a switch in maven to let me get all the tracking stack? Or is it result from the compatiblity issue among maven, junit and JDK? Any suggestions would be welcome. Thank you. Linghua
New namespaces for Maven Settings and Profiles XSD
FYI, the Maven team fixed the namespaces for settings and profiles XSD (due to MNG-2636 and MNG-3907). So, for instance, you need to use the following: http://maven.apache.org/SETTINGS/1.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd";> ... Have a glance to this url for other xsd: http://maven.apache.org/xsd Thanks, -The Maven team - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: No javadoc found when running maven eclipse
The command maven eclipse according to these instructions: http://turbine.apache.org/meta/ide.html /Ludwig -Original Message- From: bmat...@gmail.com [mailto:bmat...@gmail.com] On Behalf Of Baptiste MATHUS Sent: den 14 december 2008 22:30 To: Maven Users List Subject: Re: No javadoc found when running maven eclipse And btw I would be interested by what you mean when you say "maven Eclipse". Because if you speak about m2eclipse, I'm not sure at all it supports maven 1... Cheers. 2008/12/14 Wayne Fay > > When I run maven eclipse maven tries to find the javadoc for all the jars > > that are used. This would be very nice to have but maven doesn't find > > anything. Is there a way to solve this? I am using maven 1 sine I am > using > > the turbine plugin. > > Relatively few artifacts in the Central repo have sources, much less > javadocs published alongside the binary artifact itself. > > Wayne > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Baptiste MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor ! - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: No javadoc found when running maven eclipse
And btw I would be interested by what you mean when you say "maven Eclipse". Because if you speak about m2eclipse, I'm not sure at all it supports maven 1... Cheers. 2008/12/14 Wayne Fay > > When I run maven eclipse maven tries to find the javadoc for all the jars > > that are used. This would be very nice to have but maven doesn't find > > anything. Is there a way to solve this? I am using maven 1 sine I am > using > > the turbine plugin. > > Relatively few artifacts in the Central repo have sources, much less > javadocs published alongside the binary artifact itself. > > Wayne > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Baptiste MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor !
Re: No javadoc found when running maven eclipse
> When I run maven eclipse maven tries to find the javadoc for all the jars > that are used. This would be very nice to have but maven doesn't find > anything. Is there a way to solve this? I am using maven 1 sine I am using > the turbine plugin. Relatively few artifacts in the Central repo have sources, much less javadocs published alongside the binary artifact itself. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
No javadoc found when running maven eclipse
Hi! When I run maven eclipse maven tries to find the javadoc for all the jars that are used. This would be very nice to have but maven doesn't find anything. Is there a way to solve this? I am using maven 1 sine I am using the turbine plugin. Btw. I would be surprised if I am the first one to come across this problem, but I couldn't find the question anywhere in the mailing list. Is there any better way to search the mailing list other than google? /Ludwig
Re: How to add test classes into jar?
So specific as Wayne said. BTW, now in JUnit4, test class don't have to extends TestCase because of new design based on the JDK5's new feature(annotation), so test class have a new chance to extends another class. Regards. Linghua 2008/12/14 Wayne Fay > > You have some test classes that extends something else than TestCase and > you > > want to share these intermediate classes between projects ? > > Or perhaps he has some utility classes that are used only by his > tests, or he wants to re-use some test classes for some other reasons. > There are many good reasons to make the test-jar artifact and share > test classes amongst multiple projects. > > Wayne > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: maven plugin with an XML configuration
Hi, Thanks for your reply. CDATA sounds good for my case. How I can configure the plugin to read the XML configuration as CDATA ? Thanks in advance, Regards, Clement 2008/12/11 Brett Porter > You could use DOM and convert it to a string in the plugin, but that means > that you have to use a DOM object :) > > Other than that, I think you need to wrap it in a CDATA. > > Plexus has no internal converter for turning a DOM into a string at the > moment. > > - Brett > > > On 11/12/2008, at 9:17 PM, clement escoffier wrote: > > Hello, >> >> I'm developing a maven plugin with a configuration containing an XML >> String. >> However, I would like to get it as a regular String. In my context it is >> not >> possible to use DOM objects as the content undetermined. >> >> Here is an example of such configuration: >> >> >> >> > classname="org.apache.felix.ipojo.arch.ArchCommandImpl" >>public="false"> >> >> >> >> >> >> >> >> Is it possible to get the "meta" parameter as a regular String ? >> >> Best regards, >> >> Clement >> > > -- > Brett Porter > br...@apache.org > http://blogs.exist.com/bporter/ > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >