Hello, I need a help to setting maven. I wanna use the plugin-coverage-maven-plugin to analyse the coverage of functional tests.
I use also the cargo plugins, selenium and surefire. Without using these plugins, I can do the coverage of unit tests with no problem. But with functional tests does not work. I also use Hudson for continuous integration. I'm sending in annex my pom.xml Sorry, my english isn't very good. My Pom.xml below and in annex. <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>selenium-maven-plugin</artifactId> <version>1.1</version> <executions> <execution> <id>start-server</id> <phase>pre-integration-test</phase> <goals> <goal>start-server</goal> </goals> <configuration> <background>true</background> <logOutput>true</logOutput> </configuration> </execution> <execution> <id>stop-server</id> <phase>post-integration-test</phase> <goals> <goal>stop-server</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>1.0.5</version> <executions> <execution> <id>start-container</id> <phase>pre-integration-test</phase> <goals> <goal>start</goal> </goals> </execution> <execution> <id>stop-container</id> <phase>post-integration-test</phase> <goals> <goal>stop</goal> </goals> </execution> </executions> <configuration> <wait>false</wait> <timeout>20000</timeout> <container> <containerId>tomcat6x</containerId> <zipUrlInstaller> <url> http://www.apache.org/dist/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.zip </url> </zipUrlInstaller> </container> <configuration> <home>${project.build.directory}/tomcat6x/</home> <properties> <cargo.servlet.port>8000</cargo.servlet.port> </properties> <deployables> <deployable> <pingURL>http://localhost:8000/capriovi/</pingURL> <properties> <context>/capriovi</context> </properties> </deployable> </deployables> </configuration> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.7.1</version> <configuration> <includes> <include>AllTeste.class</include> </includes> <skip>true</skip> <forkMode>once</forkMode> <reportFormat>xml</reportFormat> </configuration> <executions> <execution> <id>surefire-it</id> <phase>integration-test</phase> <goals> <goal>test</goal> </goals> <configuration> <skip>false</skip> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.4</version> <executions> <execution> <id>instrument</id> <phase>site</phase> <goals> <goal>cobertura</goal> </goals> </execution> </executions> </plugin> -- Ewerton Leal Vale Bacharelando em Ciência da Computação - UFPI
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>br.ufpi</groupId> <artifactId>capriovi</artifactId> <packaging>war</packaging> <name>Capriovi</name> <version>1.0</version> <properties> <!-- <project.build.sourceEncoding>iso-8859-1</project.build.sourceEncoding> --> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <description>Sistema de Controle Zootécnico de Rebanhos de Caprinos e Ovinos</description> <url>http://sistemaseasii.ufpi.br/capriovi</url> <ciManagement> <system>Hudson</system> <url>http://sistemaseasii.ufpi.br/hudson</url> </ciManagement> <organization> <name>UFPI - Universidade Federal do Piauí</name> <url>http://www.ufpi.br/</url> </organization> <build> <finalName>${project.artifactId}</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.6</version> <executions> <execution> <id>compile</id> <phase>compile</phase> <configuration> <target name="Generate"> <property name="template.folder" location="templates/template" /> <property name="web.folder" location="src/main/webapp" /> <echo>jHeat: Deleting the previous generated application... </echo> <delete dir="${web.folder}" /> <mkdir dir="${web.folder}" /> <echo>jHeat: Moving all the libraries to the new application folder...</echo> <copy todir="${web.folder}"> <fileset dir="${template.folder}" /> </copy> <echo>jHeat: Generando a aplicação...</echo> <taskdef name="jHeatGenerate" classname="br.com.infowaypi.jheat.task.GeneratorTask" classpathref="maven.compile.classpath" /> <jHeatGenerate /> <echo>jHeat: Feito. Applicação está pronta. </echo> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>selenium-maven-plugin</artifactId> <version>1.1</version> <executions> <execution> <id>start-server</id> <phase>pre-integration-test</phase> <goals> <goal>start-server</goal> </goals> <configuration> <background>true</background> <logOutput>true</logOutput> </configuration> </execution> <execution> <id>stop-server</id> <phase>post-integration-test</phase> <goals> <goal>stop-server</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>1.0.5</version> <executions> <execution> <id>start-container</id> <phase>pre-integration-test</phase> <goals> <goal>start</goal> </goals> </execution> <execution> <id>stop-container</id> <phase>post-integration-test</phase> <goals> <goal>stop</goal> </goals> </execution> </executions> <configuration> <wait>false</wait> <timeout>20000</timeout> <container> <containerId>tomcat6x</containerId> <zipUrlInstaller> <url>http://www.apache.org/dist/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.zip</url> </zipUrlInstaller> </container> <configuration> <home>${project.build.directory}/tomcat6x/</home> <properties> <cargo.servlet.port>8000</cargo.servlet.port> </properties> <deployables> <deployable> <pingURL>http://localhost:8000/capriovi/</pingURL> <properties> <context>/capriovi</context> </properties> </deployable> </deployables> </configuration> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.7.1</version> <configuration> <includes> <include>AllTeste.class</include> </includes> <skip>true</skip> <forkMode>once</forkMode> <reportFormat>xml</reportFormat> </configuration> <executions> <execution> <id>surefire-it</id> <phase>integration-test</phase> <goals> <goal>test</goal> </goals> <configuration> <skip>false</skip> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.4</version> <executions> <execution> <id>instrument</id> <phase>site</phase> <goals> <goal>cobertura</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>br.com.infowaypi</groupId> <artifactId>jheat</artifactId> <version>1.0.1</version> <type>jar</type> <scope>compile</scope> </dependency> <dependency> <groupId>jama</groupId> <artifactId>jama</artifactId> <version>1.0.2</version> <type>jar</type> <scope>compile</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.2</version> <type>jar</type> <scope>test</scope> </dependency> <dependency> <groupId>org.seleniumhq.selenium.client-drivers</groupId> <artifactId>selenium-java-client-driver</artifactId> <version>1.0.2</version> <type>jar</type> <scope>test</scope> </dependency> </dependencies> <reporting> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.4</version> <configuration> <formats> <format>html</format> <format>xml</format> </formats> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <version>2.5</version> </plugin> </plugins> </reporting> </project>
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
