tags:

views:

41

answers:

0

I have an Ant project with JUnit test suite in it. There is no source code but test runs over jars in the classpath. My requirement is to write a pom.xml from the same Ant project in additional to build.xml and run the same JUnit test suites. Now when running Maven, I'm getting this...

[INFO] [surefire:test]
[INFO] Surefire report directory: C:\MIS_SVN\onb-services-test-cases\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 SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14 seconds
[INFO] Finished at: Mon Aug 09 10:17:15 CDT 2010
[INFO] Final Memory: 2M/9M
[INFO] ------------------------------------------------------------------------

and my pom.xml is

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.3.1</version>
    </dependency>
    <dependency>
        <groupId>com.tibco.ems</groupId>
        <artifactId>tibjms</artifactId>
        <version>4.4.1</version>
    </dependency>
    <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib-nodep</artifactId>
        <version>2.1_3</version>
    </dependency>
</dependencies>
<build>
    <directory>${basedir}/target</directory>
    <outputDirectory>${basedir}/build/classes</outputDirectory>
    <!--<testOutputDirectory>${basedir}/build/test-classes</testOutputDirectory>-->
    <sourceDirectory>${basedir}/src/java</sourceDirectory>
    <testSourceDirectory>${basedir}/src/java</testSourceDirectory>

    <resources>
        <resource>
            <directory>${basedir}/src/java/com/uprr/app/onb/cdfpostprocessor</directory>
        </resource>
    </resources>

    <testResources>
        <testResource>
            <directory>${basedir}/src/java/com/uprr/app/onb/cdfpostprocessor</directory>
        </testResource>
        <testResource>
            <directory>${basedir}/test/test-data</directory>
        </testResource>
    </testResources>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.0.2</version>
            <configuration>
                <fork>true</fork>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-report-plugin</artifactId>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
                <includes>
                    <include>**/CDFPostProcessorTester.java</include>
                    <include>**/CDFPPTestSuite.java</include>
                    <include>**/LocationSummaryTester.java</include>
                </includes>
                <outputDirectory>${basedir}/test/surefire-reports</outputDirectory>
            </configuration>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>report</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

    </plugins>
</build>
</project>