You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Marco Mistroni <mm...@gmail.com> on 2007/10/04 21:25:23 UTC

Fwd: maven cobertura errro

hello all,
  i am getting this exception in my  pom.xml when i add in the report
section an entry for cobertura...


[INFO] Error building POM (may not be this project's POM).


Project ID: unknown
POM Location: C:\TrunkMaven\client-web\pom.xml

Reason: Parse error reading POM. Reason: Unrecognised tag: 'executions'
(positio
n: START_TAG seen ...</version>\r\n\t\t<executions>... @226:15)


[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Parse error reading POM.
Reaso
n: Unrecognised tag: 'executions' (position: START_TAG seen
...</version>\r\n\t\
t<executions>... @226:15)
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:290)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.InvalidProjectModelException: Parse
error re
ading POM. Reason: Unrecognised tag: 'executions' (position: START_TAG seen
...<
/version>\r\n\t\t<executions>... @226:15)
        at org.apache.maven.project.DefaultMavenProjectBuilder.readModel
(Default
MavenProjectBuilder.java:1423)
        at org.apache.maven.project.DefaultMavenProjectBuilder.readModel
(Default
MavenProjectBuilder.java:1380)
        at
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFi
leInternal(DefaultMavenProjectBuilder.java:477)
        at org.apache.maven.project.DefaultMavenProjectBuilder.build
(DefaultMave
nProjectBuilder.java:200)
        at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:537)
        at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java
:467)
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:364)
        ... 11 more
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException:
Unrecognise
d tag: 'executions' (position: START_TAG seen
...</version>\r\n\t\t<executions>.
.. @226:15)
        at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseReportPlugin
(Mave
nXpp3Reader.java:3596)
        at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseReporting
(MavenXp
p3Reader.java:3725)
        at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseModel
(MavenXpp3Re
ader.java:2363)
        at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(
MavenXpp3Reader.j
ava:4438)
        at org.apache.maven.project.DefaultMavenProjectBuilder.readModel
(Default
MavenProjectBuilder.java:1419)
        ... 17 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Thu Oct 04 13:43:24 BST 2007
[INFO] Final Memory: 1M/2M
[INFO]
------------------------------------------------------------------------

C:\TrunkMaven\client-web>mvn -version
Maven version: 2.0.6


and here's my pom

<plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.1</version>
        <executions>
                <execution>
                    <id>clean</id>
                    <phase>pre-site</phase>
                    <goals>
                        <goal>clean</goal>
                    </goals>
                </execution>
                <execution>
                    <id>instrument</id>
                    <phase>site</phase>
                    <goals>
                        <goal>instrument</goal>
                        <goal>cobertura</goal>
                        <goal>check</goal>
                    </goals>
                </execution>
            </executions>
            </plugin>


i found a sample for configuring cobertura on the internet... could anyone
help?

thanks and regards
 marco

Re: Fwd: maven cobertura errro

Posted by Marco Mistroni <mm...@gmail.com>.
Hello Stefan,
 thanks fo ryour reply...

well, i'll need to investigate more, as i have a different app running on
same machine in which i can successfully
run cobertura report
i think there *might* be issues with some jars i am including........ i'll
investigate more and post here......
i  just wish someone on this list had sam eproblem so he can point me to
something......

regards
 marco

On 10/5/07, Stefan Reuter <st...@reucon.com> wrote:
>
> and this one in the reporting section:
>
>     <reporting>
>         <plugins>
>             <plugin>
>                 <groupId>org.codehaus.mojo</groupId>
>                 <artifactId>cobertura-maven-plugin</artifactId>
>                 <configuration>
>                     <formats>
>                         <format>html</format>
>                         <format>xml</format>
>                     </formats>
>                 </configuration>
>
> =Stefan
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHBX13cVCZDfrn+pMRAnyBAJsHNNNxg1tQbEDFkBxbIM0bgSspFQCdH2uV
> 5KCbk4RdOh85AO4IxhzHqvM=
> =DozG
> -----END PGP SIGNATURE-----
>
>
>
>

Re: Fwd: maven cobertura errro

Posted by Stefan Reuter <st...@reucon.com>.
and this one in the reporting section:

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <configuration>
                    <formats>
                        <format>html</format>
                        <format>xml</format>
                    </formats>
                </configuration>

=Stefan

Re: Fwd: maven cobertura errro

Posted by Stefan Reuter <st...@reucon.com>.
Hi Marco,

sorry, seems I should have read more ;)

I am using this:

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.0</version>
            </plugin>

Version 2.1 seems to be buggy so I just stick with 2.0 and that works fine.

=Stefan


Re: Fwd: maven cobertura errro

Posted by Marco Mistroni <mm...@gmail.com>.
Hello Stefan,
 thanks for the link but in same page is showing also the same config that i
had..

i'd like to do instrumentation and check..... do you have any sample
configuration to send me?

thanks in advance and regards
 marco

On 10/4/07, Stefan Reuter <st...@reucon.com> wrote:
>
> Marco Mistroni wrote:
> > i found a sample for configuring cobertura on the internet... could
> > anyone help?
>
> Thats for the Maven 1.x plugin.
> For 2.x use:
> http://mojo.codehaus.org/cobertura-maven-plugin/usage.html
>
> =Stefan
>
> --
> reuter network consulting
> Neusser Str. 110
> 50760 Koeln
> Germany
> Telefon: +49 221 1305699-0
> Telefax: +49 221 1305699-90
> E-Mail:  stefan.reuter@reucon.com
> Jabber:  stefan.reuter@reucon.com
>
> Steuernummern 215/5140/1791 USt-IdNr. DE220701760
>
>
>

Re: Fwd: maven cobertura errro

Posted by Stefan Reuter <st...@reucon.com>.
Marco Mistroni wrote:
> i found a sample for configuring cobertura on the internet... could
> anyone help?

Thats for the Maven 1.x plugin.
For 2.x use:
http://mojo.codehaus.org/cobertura-maven-plugin/usage.html

=Stefan

-- 
reuter network consulting
Neusser Str. 110
50760 Koeln
Germany
Telefon: +49 221 1305699-0
Telefax: +49 221 1305699-90
E-Mail:  stefan.reuter@reucon.com
Jabber:  stefan.reuter@reucon.com

Steuernummern 215/5140/1791 USt-IdNr. DE220701760