Re: Trouble running Maven test case
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 groupIdnet.sourceforge.jwebunit/groupId artifactIdjwebunit-htmlunit-plugin/artifactId version1.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
Re: Trouble running Maven test case
Even your second mail is not specific enough to help us help you in any meaningful way. You might profit from reading this: http://catb.org/~esr/faqs/smart-questions.html As a first guess I'd like to know if jwebunit-htmlunit-plugin is the only jwebunit dependency you added in your pom? If yes it would explain (some of) the compilation errors, eg junit.WebTestCase is in jwebunit-core, not jwebunit-htmlunit-plugin. But that's just a guess... HTH, -Lukas laredotornado wrote: 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 groupIdnet.sourceforge.jwebunit/groupId artifactIdjwebunit-htmlunit-plugin/artifactId version1.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 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Trouble running Maven test case
] ^ 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 groupIdnet.sourceforge.jwebunit/groupId artifactIdjwebunit-htmlunit-plugin/artifactId version1.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 - 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-tp25722078p25750887.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
Re: Trouble running Maven test case
: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 groupIdnet.sourceforge.jwebunit/groupId artifactIdjwebunit-htmlunit-plugin/artifactId version1.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 - 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
Re: Trouble running Maven test case
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 groupIdnet.sourceforge.jwebunit/groupId artifactIdjwebunit-htmlunit-plugin/artifactId version1.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
Re: Trouble running Maven test case
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 groupIdnet.sourceforge.jwebunit/groupId artifactIdjwebunit-htmlunit-plugin/artifactId version1.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
Trouble running Maven test case
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 groupIdnet.sourceforge.jwebunit/groupId artifactIdjwebunit-htmlunit-plugin/artifactId version1.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
Re: Trouble running Maven test case
Maven 1.1 is very old, and a completely different architecture than maven 2.0. You may not get many answers 2009/10/2 laredotornado laredotorn...@gmail.com 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 groupIdnet.sourceforge.jwebunit/groupId artifactIdjwebunit-htmlunit-plugin/artifactId version1.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
Re: Trouble running Maven test case
Sadly, I don't have control over what version of Maven is used at this company. Take your best shot, - Dave Stephen Connolly-2 wrote: Maven 1.1 is very old, and a completely different architecture than maven 2.0. You may not get many answers 2009/10/2 laredotornado laredotorn...@gmail.com 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 groupIdnet.sourceforge.jwebunit/groupId artifactIdjwebunit-htmlunit-plugin/artifactId version1.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 -- View this message in context: http://www.nabble.com/Trouble-running-Maven-test-case-tp25722078p25723646.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