I did what you recommended and did not work.
The cargo and selenium plugins must be executed before run the coverage .
When I execute the install the coverage does not work and when I execute
 the coverage, the cargo , selenium and unit tests don’t execute.
I’m sending in annex the log of install execution and coverage.



2011/2/18 Hilco Wijbenga <[email protected]>

> On 18 February 2011 04:06, Ewerton Vale Leal <[email protected]> wrote:
> > 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.
>
> <snip/>
>
> > <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>
>
> I'm guessing this is your problem. The "site" phase seems like the
> wrong place to run Cobertura. I'd try removing the entire <executions>
> part.
>



-- 
Ewerton Leal Vale
Bacharelando em Ciência da Computação - UFPI
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Capriovi 1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ 
capriovi ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 71 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ capriovi ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-antrun-plugin:1.6:run (compile) @ capriovi ---
[INFO] Executing tasks

Generate:
     [echo] jHeat: Deleting the previous generated application...
   [delete] Deleting directory C:\workspace\Maven\Capriovi\src\main\webapp
    [mkdir] Created dir: C:\workspace\Maven\Capriovi\src\main\webapp
     [echo] jHeat: Moving all the libraries to the new application
     [echo]                                                                     
folder...
     [copy] Copying 533 files to C:\workspace\Maven\Capriovi\src\main\webapp
     [echo] jHeat: Generando a aplicação...
     [echo] jHeat: Feito. Applicação está pronta.
[INFO] Executed tasks
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ 
capriovi ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ 
capriovi ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ capriovi ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ capriovi ---
[INFO] Packaging webapp
[INFO] Assembling webapp [capriovi] in 
[C:\workspace\Maven\Capriovi\target\capriovi]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\workspace\Maven\Capriovi\src\main\webapp]
[INFO] Webapp assembled in [4598 msecs]
[INFO] Building war: C:\workspace\Maven\Capriovi\target\capriovi.war
[WARNING] Warning: selected war files include a WEB-INF/web.xml which will be 
ignored 
(webxml attribute is missing from war task, or ignoreWebxml attribute is 
specified as 'true')
[INFO] 
[INFO] --- selenium-maven-plugin:1.1:start-server (start-server) @ capriovi ---
Launching Selenium Server
Waiting for Selenium Server...
[INFO] Redirecting output to: 
C:\workspace\Maven\Capriovi\target\selenium\server.log
[INFO] User extensions: 
C:\workspace\Maven\Capriovi\target\selenium\user-extensions.js
Selenium Server started
[INFO] 
[INFO] --- cargo-maven2-plugin:1.0.5:start (start-container) @ capriovi ---
[INFO] [stalledLocalDeployer] Deploying 
[C:\workspace\Maven\Capriovi\target\capriovi.war] to 
[C:\workspace\Maven\Capriovi\target/tomcat6x/webapps]...
[INFO] [talledLocalContainer] Tomcat 6.x starting...
[WARNING] [talledLocalContainer] 18/02/2011 14:37:29 
org.apache.tomcat.util.digester.SetPropertiesRule begin
[WARNING] [talledLocalContainer] AVISO: [SetPropertiesRule]{Server} Setting 
property 'debug' to '2' did not find a matching property.
[WARNING] [talledLocalContainer] 18/02/2011 14:37:30 
org.apache.tomcat.util.digester.SetPropertiesRule begin
[WARNING] [talledLocalContainer] AVISO: [SetPropertiesRule]{Server/Service} 
Setting property 'debug' to '2' did not find a matching property.
[WARNING] [talledLocalContainer] 18/02/2011 14:37:30 
org.apache.catalina.core.AprLifecycleListener init
[WARNING] [talledLocalContainer] INFO: The APR based Apache Tomcat Native 
library which allows optimal performance in production environments was not 
found on the java.library.path: C:\Program 
Files\Java\jdk1.6.0_21\jre\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program
 Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common 
Files\Microsoft Shared\Windows 
Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
 Files (x86)\MySQL\MySQL Server 5.1\bin;.C:\Program Files\Java\jdk1.6.0_21\bin 
;C:\Program Files\Java\jdk1.6.0_21\bin;C:\Program 
Files\TortoiseSVN\bin;C:\Program Files (x86)\Windows Live\Shared;C:\Program 
Files (x86)\Mozilla Firefox;C:\Programas\maven\bin;
[WARNING] [talledLocalContainer] 18/02/2011 14:37:30 
org.apache.tomcat.util.digester.SetPropertiesRule begin
[WARNING] [talledLocalContainer] AVISO: 
[SetPropertiesRule]{Server/Service/Engine} Setting property 'debug' to '2' did 
not find a matching property.
[WARNING] [talledLocalContainer] 18/02/2011 14:37:30 
org.apache.tomcat.util.digester.SetPropertiesRule begin
[WARNING] [talledLocalContainer] AVISO: 
[SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'debug' to '2' 
did not find a matching property.
[WARNING] [talledLocalContainer] 18/02/2011 14:37:30 
org.apache.tomcat.util.digester.SetPropertiesRule begin
[WARNING] [talledLocalContainer] AVISO: 
[SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 
'debug' to '2' did not find a matching property.
[WARNING] [talledLocalContainer] 18/02/2011 14:37:30 
org.apache.coyote.http11.Http11Protocol init
[WARNING] [talledLocalContainer] INFO: Initializing Coyote HTTP/1.1 on http-8000
[WARNING] [talledLocalContainer] 18/02/2011 14:37:30 
org.apache.catalina.startup.Catalina load
[WARNING] [talledLocalContainer] INFO: Initialization processed in 1225 ms
[WARNING] [talledLocalContainer] 18/02/2011 14:37:30 
org.apache.catalina.core.StandardService start
[WARNING] [talledLocalContainer] INFO: Starting service Catalina
[WARNING] [talledLocalContainer] 18/02/2011 14:37:30 
org.apache.catalina.core.StandardEngine start
[WARNING] [talledLocalContainer] INFO: Starting Servlet Engine: Apache 
Tomcat/6.0.32
[WARNING] [talledLocalContainer] 18/02/2011 14:37:31 
org.apache.catalina.startup.HostConfig deployWAR
[WARNING] [talledLocalContainer] INFO: Deploying web application archive 
cargocpc.war
[WARNING] [talledLocalContainer] 18/02/2011 14:37:31 
org.apache.catalina.startup.HostConfig deployDirectory
[WARNING] [talledLocalContainer] INFO: Deploying web application directory 
host-manager
[WARNING] [talledLocalContainer] 18/02/2011 14:37:31 
org.apache.catalina.startup.HostConfig deployDirectory
[WARNING] [talledLocalContainer] INFO: Deploying web application directory 
manager
[WARNING] [talledLocalContainer] 18/02/2011 14:37:31 
org.apache.coyote.http11.Http11Protocol start
[WARNING] [talledLocalContainer] INFO: Starting Coyote HTTP/1.1 on http-8000
[WARNING] [talledLocalContainer] 18/02/2011 14:37:31 
org.apache.jk.common.ChannelSocket init
[WARNING] [talledLocalContainer] INFO: JK: ajp13 listening on /0.0.0.0:8009
[WARNING] [talledLocalContainer] 18/02/2011 14:37:31 
org.apache.jk.server.JkMain start
[WARNING] [talledLocalContainer] INFO: Jk running ID=0 time=0/26  config=null
[WARNING] [talledLocalContainer] 18/02/2011 14:37:31 
org.apache.catalina.startup.Catalina start
[WARNING] [talledLocalContainer] INFO: Server startup in 1084 ms
[INFO] [talledLocalContainer] Tomcat 6.x started on port [8000]
[INFO] 
[INFO] --- maven-surefire-plugin:2.7.1:test (surefire-it) @ capriovi ---
[INFO] Surefire report directory: 
C:\workspace\Maven\Capriovi\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running AllTeste
Hibernate: select this_.idUsuario as idUsuario0_0_, this_.nome as nome0_0_, 
this_.endereco as endereco0_0_, this_.estado as estado0_0_, this_.municipio as 
municipio0_0_, this_.cpf as cpf0_0_, this_.telefone as telefone0_0_, 
this_.email as email0_0_, this_.login as login0_0_, this_.senha as senha0_0_, 
this_.role as role0_0_, this_.status as status0_0_, this_.motivo as motivo0_0_, 
this_1_.idFazenda as idFazenda1_0_, this_3_.quantFazenda as quantFaz2_3_0_, 
case when this_1_.idPeao is not null then 1 when this_2_.idAdministrador is not 
null then 2 when this_3_.idPecuarista is not null then 3 when this_.idUsuario 
is not null then 0 end as clazz_0_ from Usuario this_ left outer join Peao 
this_1_ on this_.idUsuario=this_1_.idPeao left outer join Administrador this_2_ 
on this_.idUsuario=this_2_.idAdministrador left outer join Pecuarista this_3_ 
on this_.idUsuario=this_3_.idPecuarista where this_.login=?
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.687 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- selenium-maven-plugin:1.1:stop-server (stop-server) @ capriovi ---
Stopping Selenium server...
Stop request sent
[INFO] 
[INFO] --- cargo-maven2-plugin:1.0.5:stop (stop-container) @ capriovi ---
[INFO] [talledLocalContainer] Tomcat 6.x is stopping...
[WARNING] [talledLocalContainer] 18/02/2011 14:37:39 
org.apache.coyote.http11.Http11Protocol pause
[WARNING] [talledLocalContainer] INFO: Pausing Coyote HTTP/1.1 on http-8000
[WARNING] [talledLocalContainer] 18/02/2011 14:37:40 
org.apache.catalina.core.StandardService stop
[WARNING] [talledLocalContainer] INFO: Stopping service Catalina
[WARNING] [talledLocalContainer] 18/02/2011 14:37:40 
org.apache.coyote.http11.Http11Protocol destroy
[WARNING] [talledLocalContainer] INFO: Stopping Coyote HTTP/1.1 on http-8000
[INFO] [talledLocalContainer] Tomcat 6.x is stopped
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ capriovi ---
[INFO] Installing C:\workspace\Maven\Capriovi\target\capriovi.war to 
C:\Users\Ewerton Leal\.m2\repository\br\ufpi\capriovi\1.0\capriovi-1.0.war
[INFO] Installing C:\workspace\Maven\Capriovi\pom.xml to C:\Users\Ewerton 
Leal\.m2\repository\br\ufpi\capriovi\1.0\capriovi-1.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:11.708s
[INFO] Finished at: Fri Feb 18 14:37:42 GMT-03:00 2011
[INFO] Final Memory: 22M/241M
[INFO] ------------------------------------------------------------------------
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Capriovi 1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> cobertura-maven-plugin:2.4:cobertura (default-cli) @ capriovi >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ 
capriovi ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 71 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ capriovi ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-antrun-plugin:1.6:run (compile) @ capriovi ---
[INFO] Executing tasks

Generate:
     [echo] jHeat: Deleting the previous generated application...
   [delete] Deleting directory C:\workspace\Maven\Capriovi\src\main\webapp
    [mkdir] Created dir: C:\workspace\Maven\Capriovi\src\main\webapp
     [echo] jHeat: Moving all the libraries to the new application
     [echo]                                                                     
folder...
     [copy] Copying 533 files to C:\workspace\Maven\Capriovi\src\main\webapp
     [echo] jHeat: Generando a aplicação...
     [echo] jHeat: Feito. Applicação está pronta.
[INFO] Executed tasks
[INFO] 
[INFO] --- cobertura-maven-plugin:2.4:instrument (default-cli) @ capriovi ---
[INFO] Cobertura 1.9.4.1 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Cobertura: Loaded information on 126 classes.
Instrumenting 126 files to 
C:\workspace\Maven\Capriovi\target\generated-classes\cobertura
Cobertura: Saved information on 126 classes.
Instrument time: 1777ms

[INFO] Instrumentation was successful.
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ 
capriovi ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ 
capriovi ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ capriovi ---
[INFO] Tests are skipped.
[INFO] 
[INFO] <<< cobertura-maven-plugin:2.4:cobertura (default-cli) @ capriovi <<<
[INFO] 
[INFO] --- cobertura-maven-plugin:2.4:cobertura (default-cli) @ capriovi ---
[INFO] Cobertura 1.9.4.1 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Cobertura: Loaded information on 126 classes.
Report time: 3803ms

[INFO] Cobertura Report generation was successful.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.738s
[INFO] Finished at: Fri Feb 18 14:39:01 GMT-03:00 2011
[INFO] Final Memory: 17M/211M
[INFO] ------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to