Hi all,
i m trying ot use Maven2 in my project,.....
structure of my dir is
<mydir>
|__src
|____main
|___ java
|___ resources
|___ test
|__ java
i m trying to run some junit tests.
according to docs ihave read (about maven directory structure), i should
place
tests in the test\java directory.. but when i do that, maven-surefire-plugin
does not find them
it finds them only if i put int he src\main\test directory
what is the correct approach?
this is my current pom.xml
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>root</groupId>
<artifactId>ejbs</artifactId>
<packaging>ejb</packaging>
<version>1.0</version>
<name>enterprise java beans</name>
<parent>
<groupId>root</groupId>
<artifactId>project</artifactId>
<version>1.0</version>
</parent>
<pluginRepositories>
<pluginRepository>
<id>apache.snapshots</id>
<url>http://cvs.apache.org/maven-snapshot-repository</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>apache.snapshots</id>
<url>http://cvs.apache.org/maven-snapshot-repository</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>root</groupId>
<artifactId>shared</artifactId>
</dependency>
<dependency>
<groupId>geronimo-spec</groupId>
<artifactId>geronimo-spec-j2ee</artifactId>
</dependency>
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-ejb3x</artifactId>
<version>4.0.3</version>
<scope>system</scope>
<systemPath>${basedir}\lib\jboss-ejb3x-4.0.3.jar</systemPath>
</dependency>
<dependency>
<groupId>jboss</groupId>
<artifactId>ejb3-persistence</artifactId>
<version>4.0.3</version>
<scope>system</scope>
<systemPath>${basedir}\lib\ejb3-persistence-4.0.3.jar</systemPath>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>4.6.1</version>
<scope>test</scope>
<classifier>jdk15</classifier>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>run server side JUnits from tests_Serverside</id>
<phase>integration-test</phase>
<configuration>
<reportFormat>xml</reportFormat>
<includes>
<include>**/*.java </include>
</includes>
<testFailureIgnore>false</testFailureIgnore>
<testClassesDirectory>target/test-classes</testClassesDirectory>
<classesDirectory>/target/classes</classesDirectory>
</configuration>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- <plugin>
<groupId>org.testng</groupId>
<artifactId>maven-testng-plugin</artifactId>
<configuration/>
</plugin>-->
</plugins>
</build>
</project>
anyone could help?
thanks in advance and regards
marco