Re: Getting compilation errors despite including the correct repo
I removed that line and everything compiled fine. However, the test was not executed upon launching mvn test The test is in my src/main/test directory. Where else should it be? I have nothing in my src/main/java directory. Below is the output of running the above command. - Dave davea-mbp2:infinitiusa_leads_testing davea$ mvn test [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for infinitiusa_leads_testing:infinitiusa_leads_testing:jar:1.0-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 29, column 15 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] [INFO] Building infinitiusa_leads_testing 1.0-SNAPSHOT [INFO] [INFO] [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ infinitiusa_leads_testing --- [WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /Users/davea/Documents/workspace-sts-2.6.0.SR1/infinitiusa_leads_testing/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ infinitiusa_leads_testing --- [INFO] No sources to compile [INFO] [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ infinitiusa_leads_testing --- [WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /Users/davea/Documents/workspace-sts-2.6.0.SR1/infinitiusa_leads_testing/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ infinitiusa_leads_testing --- [WARNING] File encoding has not been set, using platform encoding MacRoman, i.e. build is platform dependent! [INFO] Compiling 1 source file to /Users/davea/Documents/workspace-sts-2.6.0.SR1/infinitiusa_leads_testing/target/test-classes [INFO] [INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ infinitiusa_leads_testing --- [INFO] Surefire report directory: /Users/davea/Documents/workspace-sts-2.6.0.SR1/infinitiusa_leads_testing/target/surefire-reports --- T E S T S --- There are no tests to run. Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] BUILD SUCCESS [INFO] [INFO] Total time: 4.397s [INFO] Finished at: Tue May 10 08:13:20 CDT 2011 [INFO] Final Memory: 12M/81M [INFO] -- View this message in context: http://maven.40175.n5.nabble.com/Getting-compilation-errors-despite-including-the-correct-repo-tp4382157p4384429.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: Getting compilation errors despite including the correct repo
On Tue, May 10, 2011 at 9:23 AM, laredotornado-3 laredotorn...@gmail.com wrote: The test is in my src/main/test directory. Where else should it be? I have nothing in my src/main/java directory. Below is the output of running the above command. - Dave I can see that it compiles the test class [INFO] Compiling 1 source file to /Users/davea/Documents/workspace-sts-2.6.0.SR1/infinitiusa_leads_testing/target/test-classes then... There are no tests to run. So... what's in that test source code file? Does the name follow one of the default pattern? See: http://maven.apache.org/plugins/maven-surefire-plugin/examples/inclusion-exclusion.html -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Getting compilation errors despite including the correct repo
The test is in my src/main/test directory. Where else should it be? I have nothing in my src/main/java directory. Below is the output of running the above command. - Dave This is Maven 101 and the answer can easily be found online in countless locations. As such, I will not spoon-feed the answer. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Getting compilation errors despite including the correct repo
Ah, that was it ... forgot to follow the surefire naming conventions. Thanks to all, - Dave -- View this message in context: http://maven.40175.n5.nabble.com/Getting-compilation-errors-despite-including-the-correct-repo-tp4382157p4384792.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: Getting compilation errors despite including the correct repo
[ERROR] symbol : class After [ERROR] location: class com.myco.infinitiusa.tests.InfinitiConfigOldG25Base cannot find symbol The class is org.junit.After. Are you missing an import statement maybe? Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Getting compilation errors despite including the correct repo
That is a good thought, but this is one of 50 errors, all classes located in the junit jar. I do have the import statements at the top of my Java file. Is the test goal any different classpath-wise than other goals? I have verified that the junit Jar is in my local repo -- ~/.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar . - Dave =Begin imports === import com.thoughtworks.selenium.*; import org.junit.After; import org.junit.Before; import org.junit.Test; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.DriverManager; import java.util.Calendar; import java.util.Properties; import java.util.regex.Pattern; import java.io.InputStream; import junit.framework.Assert; End imports === -- View this message in context: http://maven.40175.n5.nabble.com/Getting-compilation-errors-despite-including-the-correct-repo-tp4382157p4382531.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: Getting compilation errors despite including the correct repo
On 2011-05-09 17:24, laredotornado-3 wrote: Hi, I'm using Maven 3.0.3. I want to run mvn test to execute some a Junit test, but I'm getting some compilation errors. I have placed my test file in my src/test/java/package/of/my/file directory, and included the appropriate JUnit JAR in my dependency list (pom.xml listed below). However, I'll get compilation errors like [ERROR] symbol : class After [ERROR] location: class com.myco.infinitiusa.tests.InfinitiConfigOldG25Base [ERROR] /Users/davea/Documents/workspace-sts-2.6.0.SR1/infinitiusa_leads_testing/src/test/java/com/myco/infinitiusa/tests/InfinitiConfigOldG25Base.java:[43,2] cannot find symbol Below is my pom.xml. What am I overlooking? Thanks, - Dave ?xml version=1.0 encoding=UTF-8?project modelVersion4.0.0/modelVersion groupIdinfinitiusa_leads_testing/groupId artifactIdinfinitiusa_leads_testing/artifactId version1.0-SNAPSHOT/version dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version4.8.2/version scopetest/scope /dependency dependency groupIdorg.seleniumhq.selenium.client-drivers/groupId artifactIdselenium-java-client-driver/artifactId version1.0.1/version scopetest/scope /dependency /dependencies build sourceDirectorysrc/sourceDirectory testSourceDirectorytest/testSourceDirectory Here you are telling Maven that your tests are in the folder 'test', not 'src/test/java'. plugins plugin artifactIdmaven-compiler-plugin/artifactId configuration source1.6/source target1.6/target /configuration /plugin /plugins /build /project ~ -- View this message in context: http://maven.40175.n5.nabble.com/Getting-compilation-errors-despite-including-the-correct-repo-tp4382157p4382157.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 -- Dennis Lundberg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Getting compilation errors despite including the correct repo
Thanks, Dennis. I removed that line, leaving my pom.xml like below, however, I'm sadly getting the same compilation errors. Any other advice for things I should troubleshoot? - Dave ==Begin pom.xml ?xml version=1.0 encoding=UTF-8?project modelVersion4.0.0/modelVersion groupIdleads_testing/groupId artifactIdleads_testing/artifactId version1.0-SNAPSHOT/version dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version4.8.2/version scopetest/scope /dependency dependency groupIdorg.seleniumhq.selenium.client-drivers/groupId artifactIdselenium-java-client-driver/artifactId version1.0.1/version scopetest/scope /dependency dependency groupIdoracle/groupId artifactIdclasses12/artifactId version10.2.0.3.0/version /dependency /dependencies build sourceDirectorysrc/sourceDirectory plugins plugin artifactIdmaven-compiler-plugin/artifactId configuration source1.6/source target1.6/target /configuration /plugin /plugins /build /project ===End pom.xml -- View this message in context: http://maven.40175.n5.nabble.com/Getting-compilation-errors-despite-including-the-correct-repo-tp4382157p4383031.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: Getting compilation errors despite including the correct repo
build sourceDirectorysrc/sourceDirectory Are you sure about that line, or is it also potentially incorrect? Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org