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> > <modelVersion>4.0.0</modelVersion> > <groupId>infinitiusa_leads_testing</groupId> > <artifactId>infinitiusa_leads_testing</artifactId> > <version>1.0-SNAPSHOT</version> > <dependencies> > <dependency> > <groupId>junit</groupId> > <artifactId>junit</artifactId> > <version>4.8.2</version> > <scope>test</scope> > </dependency> > > <dependency> > <groupId>org.seleniumhq.selenium.client-drivers</groupId> > <artifactId>selenium-java-client-driver</artifactId> > <version>1.0.1</version> > <scope>test</scope> > </dependency> > </dependencies> > > <build> > <sourceDirectory>src</sourceDirectory> > <testSourceDirectory>test</testSourceDirectory>
Here you are telling Maven that your tests are in the folder 'test', not 'src/test/java'. > <plugins> > <plugin> > <artifactId>maven-compiler-plugin</artifactId> > <configuration> > <source>1.6</source> > <target>1.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