maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shinobu Kawai <shin...@ieee.org>
Subject Re: Jcoverage exclusion list
Date Tue, 17 Aug 2004 10:10:36 GMT

Hi st├ęphane,

> I'm using maven 1.0 and jcoverage plugin 1.0.7.
Good to hear that.  I use them, too.

> I would like to exclude some classes from jcoverage and i used the 
> maven.jcoverage.instrumentation.excludes property.
> 
> the problem is that i would like to exclude differents files :
> *Tests.class and *Aspect.class .
> 
> It's working if i put only one pattern, but not with both .
> The reference guide does not give me any clue...
> 
> Can anyone help ?
Before I start answering, why do you have test classes in your
production source tree?  Shouldn't they be separate?  That way, you only
need to specify the *Aspect.class'es.

Anyways, a quick look at the plugin.jelly tells me that you can't.
Here's what it looks like:
  <instrument todir="${maven.jcoverage.instrumentation}">
    <ant:fileset dir="${maven.build.dest}">
      <ant:include name="**/*.class" />
      <ant:exclude name="${maven.jcoverage.instrumentation.excludes}" />
    </ant:fileset>
    <ant:classpath>
      <ant:path refid="jcoverage.classpath"/>
    </ant:classpath>
  </instrument>

As you can see, it has to follow Ant's FileSet's exclude convention,
which you can consult at:
    http://localhost/java/apache-ant-1.6.2/docs/manual/dirtasks.html#patterns
As for me, I can't find a way to give multiple patterns here.

I would suggest making a patch and send it to the jcoverage-plugin
people.  That would help all of us. ;-)

Best regards,
-- Shinobu Kawai

--
Shinobu Kawai <shinobu@ieee.org, shinobu@computer.org>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message