Yes, I should have been more specific. Here's how I'm making the call ...
maven -Dtestcase=test.AddToMailingListTest test:single and what happens is that I'm getting a bunch of compilation errors, even though the libraries in question are listed as a dependency in my project.xml file (I have confirmed the jars are getting downloaded) ... maven -Dtestcase=test.AddToMailingListTest test:single __ __ | \/ |__ _Apache__ ___ | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~ |_| |_\__,_|\_/\___|_||_| v. 1.1 build:start: test:single: java:prepare-filesystem: java:init: java:compile: [echo] Compiling to /Users/dalvarado/source/assistanceUtility/webapp/target/classes [echo] ========================================================== WARNING: maven.compile.target is not set: using the default value which depends on your JVM ========================================================== java:jar-resources: test:prepare-filesystem: test:test-resources: test:compile: [javac] Compiling 1 source file to /Users/dalvarado/source/assistanceUtility/webapp/target/test-classes [javac] /Users/dalvarado/source/assistanceUtility/webapp/src/test/java/AddToMailingListTest.java:9: package net.sourceforge.jwebunit.junit does not exist [javac] import net.sourceforge.jwebunit.junit.WebTestCase; [javac] ^ [javac] /Users/dalvarado/source/assistanceUtility/webapp/src/test/java/AddToMailingListTest.java:11: cannot find symbol [javac] symbol: class WebTestCase [javac] public class AddToMailingListTest extends WebTestCase { [javac] ^ [javac] /Users/dalvarado/source/assistanceUtility/webapp/src/test/java/AddToMailingListTest.java:28: cannot find symbol [javac] symbol : variable super [javac] location: class test.AddToMailingListTest [javac] super.setUp(); [javac] ^ [javac] /Users/dalvarado/source/assistanceUtility/webapp/src/test/java/AddToMailingListTest.java:30: cannot find symbol [javac] symbol : method getTestContext() [javac] location: class test.AddToMailingListTest [javac] getTestContext().setBaseUrl("http://localhost:8080/apps/oit/governor/citizen/assistanceUtility"); [javac] ^ Thanks, - Dave Neroon wrote: > > Hi Dave, > > could you give some detail on what the exact error is and on how you > actually > call 'test:single'? > > Maven takes care of your test classpath, so to my knowledge you don't need > to > set 'maven.test.classpath' if you have everything you need declared as a > dependency. At least I never had to. > > I assume that your unit tests work without any issue when executing 'maven > test:test' since you not explicitly mentioned it. So the problem probably > is > with the call for the 'test:single' goal. > Unlike Maven2 where you give only the name of the test class to the > Surefire > plugin when you want to execute a single unit test, for Maven1 you need to > specify the fully qualified class name. Would look something like this: > maven test:single -Dtestcase=com.somecompany.someproduct.stuff.TestCase > > Cheers, > Siegfried > > Am Freitag, 2. Oktober 2009 schrieb laredotornado: >> >> Hi, >> >> I'm using Maven 1.1 with maven-test-plugin-1.8.2.jar. When I run the >> "test:single" target with my test class, I get a bunch of compilation >> errors >> (all related to jwebunit), despite the fact I have this dependency in my >> project.xml ... >> >> <dependency> >> <groupId>net.sourceforge.jwebunit</groupId> >> <artifactId>jwebunit-htmlunit-plugin</artifactId> >> <version>1.4</version> >> </dependency> >> >> I read somewhere that I'm supposed to set this property ... >> >> maven.test.classpath >> >> when using the maven test plugin. Although I put this property and the >> associated jars in my project.properties file, I still get compilation >> errors. Any ideas how to proceed from here? - Dave >> >> -- >> View this message in context: >> http://www.nabble.com/Trouble-running-Maven- > test-case-tp25722078p25722078.html >> Sent from the Maven - Users mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > > -- View this message in context: http://www.nabble.com/Trouble-running-Maven-test-case-tp25722078p25743680.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org