RE: skip cobertura for a module

2011-12-13 Thread Jim McCaskey
My take away here is that there is a bug in the cobertura plugin so I went 
ahead and opened it:

http://jira.codehaus.org/browse/MCOBERTURA-154

Any suggestions on how to work around it?  I guess I could do some hocus pocus 
with profiles...

-Jim

-Original Message-
From: rfscho...@hotmail.com [mailto:rfscho...@hotmail.com] On Behalf Of Robert 
Scholte
Sent: Monday, December 12, 2011 4:20 PM
To: users@maven.apache.org
Subject: RE: skip cobertura for a module


Exactly my conclusion

 

-Robert

 Date: Mon, 12 Dec 2011 22:09:53 +
 Subject: Re: skip cobertura for a module
 From: stephen.alan.conno...@gmail.com
 To: users@maven.apache.org
 
 Is it that the skip mojo is skipping the report but not the forked execution?
 
 On 12 December 2011 21:58, Jim McCaskey jim.mccas...@pervasive.com wrote:
  I created a small example of the problem and put it here:
 
  http://pastebin.com/QDhx2kVf
 
  Just run that pom.xml (I have tried Maven 2.2.1 and Maven 3.0.3) with this 
  command:
 
  mvn install cobertura:cobertura
 
  If it is truly skipping the cobertura plugin, you should only see this line 
  once:
 
  [echo] Running antrun plugin
 
  But you actually see it twice.
 
  I also tried this with -X as requested and the value appears to be set to 
  true below.
 
  [DEBUG] 
  ---
  [DEBUG] Goal: org.codehaus.mojo:cobertura-maven-plugin:2.5.1:instrument 
  (default-cli)
  [DEBUG] Style: Regular
  [DEBUG] Configuration: ?xml version=1.0 encoding=UTF-8?
  configuration
  attach default-value=false${cobertura.attach}/attach
  classifier default-value=cobertura${cobertura.classifier}/classifier
  dataFile 
  default-value=${project.build.directory}/cobertura/cobertura.ser${cobertura.datafile}/dataFile
  forceMojoExecution 
  default-value=false${cobertura.force}/forceMojoExecution
  instrumentation${instrumentation}/instrumentation
  maxmem default-value=64m${cobertura.maxmem}/maxmem
  mojoExecution default-value=${mojoExecution}/
  pluginClasspathList default-value=${plugin.artifacts}/
  project default-value=${project}/
  quiet default-value=false${quiet}/quiet
  skip default-value=falsetrue/skip
  /configuration
 
  I'm not putting this into the reporting bit (yet).
 
  -Jim
 
  -Original Message-
  From: rfscho...@hotmail.com [mailto:rfscho...@hotmail.com] On Behalf Of 
  Robert Scholte
  Sent: Monday, December 12, 2011 1:57 PM
  To: users@maven.apache.org
  Subject: RE: skip cobertura for a module
 
 
  If you run 'mvn cobertura:cobertura -X' (-X means debug-level logging) you 
  should see the used configuration.
 
  Can you confirm there's a skip-parameter and that its value is true?
 
  The pluginManagement doesn't work for reporting-plugins, so within the 
  reporting-section you are required to specify the version.
 
 
  -Robert
 
 
 
  From: jim.mccas...@pervasive.com
  To: users@maven.apache.org
  Subject: RE: skip cobertura for a module
  Date: Mon, 12 Dec 2011 19:41:04 +
 
  Robert,
 
  Thanks much for the response. I have a parent pom that does just that in 
  its pluginManagement section. Under the heading of it never hurts to 
  try, I went ahead and tried putting this in the offending module:
 
  plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdcobertura-maven-plugin/artifactId
  version2.5.1/version
  configuration
  skiptrue/skip
  /configuration
  /plugin
 
  It's still having the same problem.
 
  Thanks!
 
  -Jim
 
  -Original Message-
  From: rfscho...@hotmail.com [mailto:rfscho...@hotmail.com] On Behalf Of 
  Robert Scholte
  Sent: Monday, December 12, 2011 1:33 PM
  To: users@maven.apache.org
  Subject: RE: skip cobertura for a module
 
 
  Try to set the version of the plugin to 2.5.1
 
  It is a good practice to always set the version for every plugin.
 
  Maven-3.0.x already warns you about it and it will probably be required 
  one day.
 
 
 
  -Robert
 
 
 
  ps. why not just run 'mvn install site'? This should already trigger these 
  plugins if you have defined them in the reporting-section.
 
   From: jim.mccas...@pervasive.com
   To: users@maven.apache.org
   Subject: skip cobertura for a module
   Date: Mon, 12 Dec 2011 19:19:40 +
  
   Hello all,
  
   I tried posting this on the codehaus user list but it won't accept my 
   e-mails. So let's try here:
  
   I'm having an issue with the cobertura plugin. I have a muti-module 
   build that I invoke like this on a nightly basis:
  
   mvn install site:site findbugs:findbugs cobertura:cobertura
  
   Now all of the modules in the build should build using cobertura, except 
   one. We have some custom stuff that is not entirely the Maven way and 
   want to ignore it for the sake of running cobertura (it does not contain 
   code anyway). Here's where I start hitting trouble. It seems that I 
   cannot get the skip to work. It always at least runs the prepare. It's 
   not corbertura that's failing (one of our in house

skip cobertura for a module

2011-12-12 Thread Jim McCaskey
Hello all,

I tried posting this on the codehaus user list but it won't accept my e-mails.  
So let's try here:

I'm having an issue with the cobertura plugin.  I have a muti-module build that 
I invoke like this on a nightly basis:

mvn install site:site findbugs:findbugs cobertura:cobertura

Now all of the modules in the build should build using cobertura, except one.  
We have some custom stuff that is not entirely the Maven way and want to 
ignore it for the sake of running cobertura (it does not contain code anyway).  
Here's where I start hitting trouble.  It seems that I cannot get the skip to 
work.  It always at least runs the prepare.  It's not corbertura that's failing 
(one of our in house plugins unfortunately), but I don't want that prepare to 
run at all.  

Ideally I would just use a skip like this:

plugin
groupIdorg.codehaus.mojo/groupId
artifactIdcobertura-maven-plugin/artifactId
configuration
skiptrue/skip
/configuration
/plugin

But when I put that in, it still invokes cobertura.  At least I see it say this:

[INFO] Preparing cobertura:cobertura

And it proceeds to run all the other plugins again.  To be pedantic, I tried 
this as well:

plugin
groupIdorg.codehaus.mojo/groupId
artifactIdcobertura-maven-plugin/artifactId
configuration
skiptrue/skip
/configuration
executions
execution
goals
goalclean/goal
goalcheck/goal
goalcobertura/goal
goaldump-datafile/goal
goalinstrument/goal
/goals
/execution
/executions
/plugin

But that had similar results.

I also tried putting this property in the pom:

properties
cobertura.skiptrue/cobertura.skip
/properties

Again, that did not stop it from running the prepare bit.  It seems to always 
run the prepare.  

How do I turn cobertura off for this one module?

-Jim


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



RE: skip cobertura for a module

2011-12-12 Thread Robert Scholte

Try to set the version of the plugin to 2.5.1

It is a good practice to always set the version for every plugin. 

Maven-3.0.x already warns you about it and it will probably be required one day.

 

-Robert

 

ps. why not just run 'mvn install site'? This should already trigger these 
plugins if you have defined them in the reporting-section.

 From: jim.mccas...@pervasive.com
 To: users@maven.apache.org
 Subject: skip cobertura for a module
 Date: Mon, 12 Dec 2011 19:19:40 +
 
 Hello all,
 
 I tried posting this on the codehaus user list but it won't accept my 
 e-mails. So let's try here:
 
 I'm having an issue with the cobertura plugin. I have a muti-module build 
 that I invoke like this on a nightly basis:
 
 mvn install site:site findbugs:findbugs cobertura:cobertura
 
 Now all of the modules in the build should build using cobertura, except one. 
 We have some custom stuff that is not entirely the Maven way and want to 
 ignore it for the sake of running cobertura (it does not contain code 
 anyway). Here's where I start hitting trouble. It seems that I cannot get the 
 skip to work. It always at least runs the prepare. It's not corbertura that's 
 failing (one of our in house plugins unfortunately), but I don't want that 
 prepare to run at all. 
 
 Ideally I would just use a skip like this:
 
 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdcobertura-maven-plugin/artifactId
 configuration
 skiptrue/skip
 /configuration
 /plugin
 
 But when I put that in, it still invokes cobertura. At least I see it say 
 this:
 
 [INFO] Preparing cobertura:cobertura
 
 And it proceeds to run all the other plugins again. To be pedantic, I tried 
 this as well:
 
 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdcobertura-maven-plugin/artifactId
 configuration
 skiptrue/skip
 /configuration
 executions
 execution
 goals
 goalclean/goal
 goalcheck/goal
 goalcobertura/goal
 goaldump-datafile/goal
 goalinstrument/goal
 /goals
 /execution
 /executions
 /plugin
 
 But that had similar results.
 
 I also tried putting this property in the pom:
 
 properties
 cobertura.skiptrue/cobertura.skip
 /properties
 
 Again, that did not stop it from running the prepare bit. It seems to always 
 run the prepare. 
 
 How do I turn cobertura off for this one module?
 
 -Jim
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: skip cobertura for a module

2011-12-12 Thread Jim McCaskey
Robert,

Thanks much for the response.  I have a parent pom that does just that in its 
pluginManagement section.  Under the heading of it never hurts to try, I went 
ahead and tried putting this in the offending module:

plugin
groupIdorg.codehaus.mojo/groupId
artifactIdcobertura-maven-plugin/artifactId
version2.5.1/version
configuration
skiptrue/skip
/configuration
/plugin

It's still having the same problem.

Thanks!

-Jim

-Original Message-
From: rfscho...@hotmail.com [mailto:rfscho...@hotmail.com] On Behalf Of Robert 
Scholte
Sent: Monday, December 12, 2011 1:33 PM
To: users@maven.apache.org
Subject: RE: skip cobertura for a module


Try to set the version of the plugin to 2.5.1

It is a good practice to always set the version for every plugin. 

Maven-3.0.x already warns you about it and it will probably be required one day.

 

-Robert

 

ps. why not just run 'mvn install site'? This should already trigger these 
plugins if you have defined them in the reporting-section.

 From: jim.mccas...@pervasive.com
 To: users@maven.apache.org
 Subject: skip cobertura for a module
 Date: Mon, 12 Dec 2011 19:19:40 +
 
 Hello all,
 
 I tried posting this on the codehaus user list but it won't accept my 
 e-mails. So let's try here:
 
 I'm having an issue with the cobertura plugin. I have a muti-module build 
 that I invoke like this on a nightly basis:
 
 mvn install site:site findbugs:findbugs cobertura:cobertura
 
 Now all of the modules in the build should build using cobertura, except one. 
 We have some custom stuff that is not entirely the Maven way and want to 
 ignore it for the sake of running cobertura (it does not contain code 
 anyway). Here's where I start hitting trouble. It seems that I cannot get the 
 skip to work. It always at least runs the prepare. It's not corbertura that's 
 failing (one of our in house plugins unfortunately), but I don't want that 
 prepare to run at all. 
 
 Ideally I would just use a skip like this:
 
 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdcobertura-maven-plugin/artifactId
 configuration
 skiptrue/skip
 /configuration
 /plugin
 
 But when I put that in, it still invokes cobertura. At least I see it say 
 this:
 
 [INFO] Preparing cobertura:cobertura
 
 And it proceeds to run all the other plugins again. To be pedantic, I tried 
 this as well:
 
 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdcobertura-maven-plugin/artifactId
 configuration
 skiptrue/skip
 /configuration
 executions
 execution
 goals
 goalclean/goal
 goalcheck/goal
 goalcobertura/goal
 goaldump-datafile/goal
 goalinstrument/goal
 /goals
 /execution
 /executions
 /plugin
 
 But that had similar results.
 
 I also tried putting this property in the pom:
 
 properties
 cobertura.skiptrue/cobertura.skip
 /properties
 
 Again, that did not stop it from running the prepare bit. It seems to always 
 run the prepare. 
 
 How do I turn cobertura off for this one module?
 
 -Jim
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org




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



RE: skip cobertura for a module

2011-12-12 Thread Drury, Tim
I just looked at the cobertura maven source the other day, so I took another 
look.  skipMojo() is the first call in the instrument plugin and if skip is 
true it should log at INFO level: Skipping cobertura execution

While I don't have a solution to your issue, I can tell you that cobertura is 
definitely running on this module.

-tim

-Original Message-
From: Jim McCaskey [mailto:jim.mccas...@pervasive.com] 
Sent: Monday, December 12, 2011 2:20 PM
To: 'users@maven.apache.org'
Subject: skip cobertura for a module

Hello all,

I tried posting this on the codehaus user list but it won't accept my e-mails.  
So let's try here:

I'm having an issue with the cobertura plugin.  I have a muti-module build that 
I invoke like this on a nightly basis:

mvn install site:site findbugs:findbugs cobertura:cobertura

Now all of the modules in the build should build using cobertura, except one.  
We have some custom stuff that is not entirely the Maven way and want to 
ignore it for the sake of running cobertura (it does not contain code anyway).  
Here's where I start hitting trouble.  It seems that I cannot get the skip to 
work.  It always at least runs the prepare.  It's not corbertura that's failing 
(one of our in house plugins unfortunately), but I don't want that prepare to 
run at all.  

Ideally I would just use a skip like this:

plugin
groupIdorg.codehaus.mojo/groupId
artifactIdcobertura-maven-plugin/artifactId
configuration
skiptrue/skip
/configuration
/plugin

But when I put that in, it still invokes cobertura.  At least I see it say this:

[INFO] Preparing cobertura:cobertura

And it proceeds to run all the other plugins again.  To be pedantic, I tried 
this as well:

plugin
groupIdorg.codehaus.mojo/groupId
artifactIdcobertura-maven-plugin/artifactId
configuration
skiptrue/skip
/configuration
executions
execution
goals
goalclean/goal
goalcheck/goal
goalcobertura/goal
goaldump-datafile/goal
goalinstrument/goal
/goals
/execution
/executions
/plugin

But that had similar results.

I also tried putting this property in the pom:

properties
cobertura.skiptrue/cobertura.skip
/properties

Again, that did not stop it from running the prepare bit.  It seems to always 
run the prepare.  

How do I turn cobertura off for this one module?

-Jim


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


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



RE: skip cobertura for a module

2011-12-12 Thread Robert Scholte

If you run 'mvn cobertura:cobertura -X' (-X means debug-level logging) you 
should see the used configuration.

Can you confirm there's a skip-parameter and that its value is true?

The pluginManagement doesn't work for reporting-plugins, so within the 
reporting-section you are required to specify the version.
 

-Robert



 From: jim.mccas...@pervasive.com
 To: users@maven.apache.org
 Subject: RE: skip cobertura for a module
 Date: Mon, 12 Dec 2011 19:41:04 +
 
 Robert,
 
 Thanks much for the response. I have a parent pom that does just that in its 
 pluginManagement section. Under the heading of it never hurts to try, I 
 went ahead and tried putting this in the offending module:
 
 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdcobertura-maven-plugin/artifactId
 version2.5.1/version
 configuration
 skiptrue/skip
 /configuration
 /plugin
 
 It's still having the same problem.
 
 Thanks!
 
 -Jim
 
 -Original Message-
 From: rfscho...@hotmail.com [mailto:rfscho...@hotmail.com] On Behalf Of 
 Robert Scholte
 Sent: Monday, December 12, 2011 1:33 PM
 To: users@maven.apache.org
 Subject: RE: skip cobertura for a module
 
 
 Try to set the version of the plugin to 2.5.1
 
 It is a good practice to always set the version for every plugin. 
 
 Maven-3.0.x already warns you about it and it will probably be required one 
 day.
 
 
 
 -Robert
 
 
 
 ps. why not just run 'mvn install site'? This should already trigger these 
 plugins if you have defined them in the reporting-section.
 
  From: jim.mccas...@pervasive.com
  To: users@maven.apache.org
  Subject: skip cobertura for a module
  Date: Mon, 12 Dec 2011 19:19:40 +
  
  Hello all,
  
  I tried posting this on the codehaus user list but it won't accept my 
  e-mails. So let's try here:
  
  I'm having an issue with the cobertura plugin. I have a muti-module build 
  that I invoke like this on a nightly basis:
  
  mvn install site:site findbugs:findbugs cobertura:cobertura
  
  Now all of the modules in the build should build using cobertura, except 
  one. We have some custom stuff that is not entirely the Maven way and 
  want to ignore it for the sake of running cobertura (it does not contain 
  code anyway). Here's where I start hitting trouble. It seems that I cannot 
  get the skip to work. It always at least runs the prepare. It's not 
  corbertura that's failing (one of our in house plugins unfortunately), but 
  I don't want that prepare to run at all. 
  
  Ideally I would just use a skip like this:
  
  plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdcobertura-maven-plugin/artifactId
  configuration
  skiptrue/skip
  /configuration
  /plugin
  
  But when I put that in, it still invokes cobertura. At least I see it say 
  this:
  
  [INFO] Preparing cobertura:cobertura
  
  And it proceeds to run all the other plugins again. To be pedantic, I tried 
  this as well:
  
  plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdcobertura-maven-plugin/artifactId
  configuration
  skiptrue/skip
  /configuration
  executions
  execution
  goals
  goalclean/goal
  goalcheck/goal
  goalcobertura/goal
  goaldump-datafile/goal
  goalinstrument/goal
  /goals
  /execution
  /executions
  /plugin
  
  But that had similar results.
  
  I also tried putting this property in the pom:
  
  properties
  cobertura.skiptrue/cobertura.skip
  /properties
  
  Again, that did not stop it from running the prepare bit. It seems to 
  always run the prepare. 
  
  How do I turn cobertura off for this one module?
  
  -Jim
  
  
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
  
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: skip cobertura for a module

2011-12-12 Thread Jim McCaskey
I created a small example of the problem and put it here:

http://pastebin.com/QDhx2kVf

Just run that pom.xml (I have tried Maven 2.2.1 and Maven 3.0.3) with this 
command:

mvn install cobertura:cobertura

If it is truly skipping the cobertura plugin, you should only see this line 
once:

 [echo] Running antrun plugin

But you actually see it twice. 

I also tried this with -X as requested and the value appears to be set to true 
below.

[DEBUG] ---
[DEBUG] Goal:  
org.codehaus.mojo:cobertura-maven-plugin:2.5.1:instrument (default-cli)
[DEBUG] Style: Regular
[DEBUG] Configuration: ?xml version=1.0 encoding=UTF-8?
configuration
  attach default-value=false${cobertura.attach}/attach
  classifier default-value=cobertura${cobertura.classifier}/classifier
  dataFile 
default-value=${project.build.directory}/cobertura/cobertura.ser${cobertura.datafile}/dataFile
  forceMojoExecution 
default-value=false${cobertura.force}/forceMojoExecution
  instrumentation${instrumentation}/instrumentation
  maxmem default-value=64m${cobertura.maxmem}/maxmem
  mojoExecution default-value=${mojoExecution}/
  pluginClasspathList default-value=${plugin.artifacts}/
  project default-value=${project}/
  quiet default-value=false${quiet}/quiet
  skip default-value=falsetrue/skip
/configuration

I'm not putting this into the reporting bit (yet).

-Jim

-Original Message-
From: rfscho...@hotmail.com [mailto:rfscho...@hotmail.com] On Behalf Of Robert 
Scholte
Sent: Monday, December 12, 2011 1:57 PM
To: users@maven.apache.org
Subject: RE: skip cobertura for a module


If you run 'mvn cobertura:cobertura -X' (-X means debug-level logging) you 
should see the used configuration.

Can you confirm there's a skip-parameter and that its value is true?

The pluginManagement doesn't work for reporting-plugins, so within the 
reporting-section you are required to specify the version.
 

-Robert



 From: jim.mccas...@pervasive.com
 To: users@maven.apache.org
 Subject: RE: skip cobertura for a module
 Date: Mon, 12 Dec 2011 19:41:04 +
 
 Robert,
 
 Thanks much for the response. I have a parent pom that does just that in its 
 pluginManagement section. Under the heading of it never hurts to try, I 
 went ahead and tried putting this in the offending module:
 
 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdcobertura-maven-plugin/artifactId
 version2.5.1/version
 configuration
 skiptrue/skip
 /configuration
 /plugin
 
 It's still having the same problem.
 
 Thanks!
 
 -Jim
 
 -Original Message-
 From: rfscho...@hotmail.com [mailto:rfscho...@hotmail.com] On Behalf Of 
 Robert Scholte
 Sent: Monday, December 12, 2011 1:33 PM
 To: users@maven.apache.org
 Subject: RE: skip cobertura for a module
 
 
 Try to set the version of the plugin to 2.5.1
 
 It is a good practice to always set the version for every plugin. 
 
 Maven-3.0.x already warns you about it and it will probably be required one 
 day.
 
 
 
 -Robert
 
 
 
 ps. why not just run 'mvn install site'? This should already trigger these 
 plugins if you have defined them in the reporting-section.
 
  From: jim.mccas...@pervasive.com
  To: users@maven.apache.org
  Subject: skip cobertura for a module
  Date: Mon, 12 Dec 2011 19:19:40 +
  
  Hello all,
  
  I tried posting this on the codehaus user list but it won't accept my 
  e-mails. So let's try here:
  
  I'm having an issue with the cobertura plugin. I have a muti-module build 
  that I invoke like this on a nightly basis:
  
  mvn install site:site findbugs:findbugs cobertura:cobertura
  
  Now all of the modules in the build should build using cobertura, except 
  one. We have some custom stuff that is not entirely the Maven way and 
  want to ignore it for the sake of running cobertura (it does not contain 
  code anyway). Here's where I start hitting trouble. It seems that I cannot 
  get the skip to work. It always at least runs the prepare. It's not 
  corbertura that's failing (one of our in house plugins unfortunately), but 
  I don't want that prepare to run at all. 
  
  Ideally I would just use a skip like this:
  
  plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdcobertura-maven-plugin/artifactId
  configuration
  skiptrue/skip
  /configuration
  /plugin
  
  But when I put that in, it still invokes cobertura. At least I see it say 
  this:
  
  [INFO] Preparing cobertura:cobertura
  
  And it proceeds to run all the other plugins again. To be pedantic, I tried 
  this as well:
  
  plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdcobertura-maven-plugin/artifactId
  configuration
  skiptrue/skip
  /configuration
  executions
  execution
  goals
  goalclean/goal
  goalcheck/goal
  goalcobertura/goal
  goaldump-datafile/goal
  goalinstrument/goal
  /goals
  /execution
  /executions
  /plugin
  
  But that had similar results.
  
  I also tried putting this property in the pom:
  
  properties

Re: skip cobertura for a module

2011-12-12 Thread Stephen Connolly
Is it that the skip mojo is skipping the report but not the forked execution?

On 12 December 2011 21:58, Jim McCaskey jim.mccas...@pervasive.com wrote:
 I created a small example of the problem and put it here:

 http://pastebin.com/QDhx2kVf

 Just run that pom.xml (I have tried Maven 2.2.1 and Maven 3.0.3) with this 
 command:

 mvn install cobertura:cobertura

 If it is truly skipping the cobertura plugin, you should only see this line 
 once:

     [echo] Running antrun plugin

 But you actually see it twice.

 I also tried this with -X as requested and the value appears to be set to 
 true below.

 [DEBUG] 
 ---
 [DEBUG] Goal:          
 org.codehaus.mojo:cobertura-maven-plugin:2.5.1:instrument (default-cli)
 [DEBUG] Style:         Regular
 [DEBUG] Configuration: ?xml version=1.0 encoding=UTF-8?
 configuration
  attach default-value=false${cobertura.attach}/attach
  classifier default-value=cobertura${cobertura.classifier}/classifier
  dataFile 
 default-value=${project.build.directory}/cobertura/cobertura.ser${cobertura.datafile}/dataFile
  forceMojoExecution 
 default-value=false${cobertura.force}/forceMojoExecution
  instrumentation${instrumentation}/instrumentation
  maxmem default-value=64m${cobertura.maxmem}/maxmem
  mojoExecution default-value=${mojoExecution}/
  pluginClasspathList default-value=${plugin.artifacts}/
  project default-value=${project}/
  quiet default-value=false${quiet}/quiet
  skip default-value=falsetrue/skip
 /configuration

 I'm not putting this into the reporting bit (yet).

 -Jim

 -Original Message-
 From: rfscho...@hotmail.com [mailto:rfscho...@hotmail.com] On Behalf Of 
 Robert Scholte
 Sent: Monday, December 12, 2011 1:57 PM
 To: users@maven.apache.org
 Subject: RE: skip cobertura for a module


 If you run 'mvn cobertura:cobertura -X' (-X means debug-level logging) you 
 should see the used configuration.

 Can you confirm there's a skip-parameter and that its value is true?

 The pluginManagement doesn't work for reporting-plugins, so within the 
 reporting-section you are required to specify the version.


 -Robert



 From: jim.mccas...@pervasive.com
 To: users@maven.apache.org
 Subject: RE: skip cobertura for a module
 Date: Mon, 12 Dec 2011 19:41:04 +

 Robert,

 Thanks much for the response. I have a parent pom that does just that in its 
 pluginManagement section. Under the heading of it never hurts to try, I 
 went ahead and tried putting this in the offending module:

 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdcobertura-maven-plugin/artifactId
 version2.5.1/version
 configuration
 skiptrue/skip
 /configuration
 /plugin

 It's still having the same problem.

 Thanks!

 -Jim

 -Original Message-
 From: rfscho...@hotmail.com [mailto:rfscho...@hotmail.com] On Behalf Of 
 Robert Scholte
 Sent: Monday, December 12, 2011 1:33 PM
 To: users@maven.apache.org
 Subject: RE: skip cobertura for a module


 Try to set the version of the plugin to 2.5.1

 It is a good practice to always set the version for every plugin.

 Maven-3.0.x already warns you about it and it will probably be required one 
 day.



 -Robert



 ps. why not just run 'mvn install site'? This should already trigger these 
 plugins if you have defined them in the reporting-section.

  From: jim.mccas...@pervasive.com
  To: users@maven.apache.org
  Subject: skip cobertura for a module
  Date: Mon, 12 Dec 2011 19:19:40 +
 
  Hello all,
 
  I tried posting this on the codehaus user list but it won't accept my 
  e-mails. So let's try here:
 
  I'm having an issue with the cobertura plugin. I have a muti-module build 
  that I invoke like this on a nightly basis:
 
  mvn install site:site findbugs:findbugs cobertura:cobertura
 
  Now all of the modules in the build should build using cobertura, except 
  one. We have some custom stuff that is not entirely the Maven way and 
  want to ignore it for the sake of running cobertura (it does not contain 
  code anyway). Here's where I start hitting trouble. It seems that I cannot 
  get the skip to work. It always at least runs the prepare. It's not 
  corbertura that's failing (one of our in house plugins unfortunately), but 
  I don't want that prepare to run at all.
 
  Ideally I would just use a skip like this:
 
  plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdcobertura-maven-plugin/artifactId
  configuration
  skiptrue/skip
  /configuration
  /plugin
 
  But when I put that in, it still invokes cobertura. At least I see it say 
  this:
 
  [INFO] Preparing cobertura:cobertura
 
  And it proceeds to run all the other plugins again. To be pedantic, I 
  tried this as well:
 
  plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdcobertura-maven-plugin/artifactId
  configuration
  skiptrue/skip
  /configuration
  executions
  execution
  goals
  goalclean/goal
  goalcheck/goal
  goalcobertura/goal
  goaldump-datafile/goal
  goalinstrument/goal

RE: skip cobertura for a module

2011-12-12 Thread Robert Scholte

Exactly my conclusion

 

-Robert

 Date: Mon, 12 Dec 2011 22:09:53 +
 Subject: Re: skip cobertura for a module
 From: stephen.alan.conno...@gmail.com
 To: users@maven.apache.org
 
 Is it that the skip mojo is skipping the report but not the forked execution?
 
 On 12 December 2011 21:58, Jim McCaskey jim.mccas...@pervasive.com wrote:
  I created a small example of the problem and put it here:
 
  http://pastebin.com/QDhx2kVf
 
  Just run that pom.xml (I have tried Maven 2.2.1 and Maven 3.0.3) with this 
  command:
 
  mvn install cobertura:cobertura
 
  If it is truly skipping the cobertura plugin, you should only see this line 
  once:
 
  [echo] Running antrun plugin
 
  But you actually see it twice.
 
  I also tried this with -X as requested and the value appears to be set to 
  true below.
 
  [DEBUG] 
  ---
  [DEBUG] Goal: org.codehaus.mojo:cobertura-maven-plugin:2.5.1:instrument 
  (default-cli)
  [DEBUG] Style: Regular
  [DEBUG] Configuration: ?xml version=1.0 encoding=UTF-8?
  configuration
  attach default-value=false${cobertura.attach}/attach
  classifier default-value=cobertura${cobertura.classifier}/classifier
  dataFile 
  default-value=${project.build.directory}/cobertura/cobertura.ser${cobertura.datafile}/dataFile
  forceMojoExecution 
  default-value=false${cobertura.force}/forceMojoExecution
  instrumentation${instrumentation}/instrumentation
  maxmem default-value=64m${cobertura.maxmem}/maxmem
  mojoExecution default-value=${mojoExecution}/
  pluginClasspathList default-value=${plugin.artifacts}/
  project default-value=${project}/
  quiet default-value=false${quiet}/quiet
  skip default-value=falsetrue/skip
  /configuration
 
  I'm not putting this into the reporting bit (yet).
 
  -Jim
 
  -Original Message-
  From: rfscho...@hotmail.com [mailto:rfscho...@hotmail.com] On Behalf Of 
  Robert Scholte
  Sent: Monday, December 12, 2011 1:57 PM
  To: users@maven.apache.org
  Subject: RE: skip cobertura for a module
 
 
  If you run 'mvn cobertura:cobertura -X' (-X means debug-level logging) you 
  should see the used configuration.
 
  Can you confirm there's a skip-parameter and that its value is true?
 
  The pluginManagement doesn't work for reporting-plugins, so within the 
  reporting-section you are required to specify the version.
 
 
  -Robert
 
 
 
  From: jim.mccas...@pervasive.com
  To: users@maven.apache.org
  Subject: RE: skip cobertura for a module
  Date: Mon, 12 Dec 2011 19:41:04 +
 
  Robert,
 
  Thanks much for the response. I have a parent pom that does just that in 
  its pluginManagement section. Under the heading of it never hurts to 
  try, I went ahead and tried putting this in the offending module:
 
  plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdcobertura-maven-plugin/artifactId
  version2.5.1/version
  configuration
  skiptrue/skip
  /configuration
  /plugin
 
  It's still having the same problem.
 
  Thanks!
 
  -Jim
 
  -Original Message-
  From: rfscho...@hotmail.com [mailto:rfscho...@hotmail.com] On Behalf Of 
  Robert Scholte
  Sent: Monday, December 12, 2011 1:33 PM
  To: users@maven.apache.org
  Subject: RE: skip cobertura for a module
 
 
  Try to set the version of the plugin to 2.5.1
 
  It is a good practice to always set the version for every plugin.
 
  Maven-3.0.x already warns you about it and it will probably be required 
  one day.
 
 
 
  -Robert
 
 
 
  ps. why not just run 'mvn install site'? This should already trigger these 
  plugins if you have defined them in the reporting-section.
 
   From: jim.mccas...@pervasive.com
   To: users@maven.apache.org
   Subject: skip cobertura for a module
   Date: Mon, 12 Dec 2011 19:19:40 +
  
   Hello all,
  
   I tried posting this on the codehaus user list but it won't accept my 
   e-mails. So let's try here:
  
   I'm having an issue with the cobertura plugin. I have a muti-module 
   build that I invoke like this on a nightly basis:
  
   mvn install site:site findbugs:findbugs cobertura:cobertura
  
   Now all of the modules in the build should build using cobertura, except 
   one. We have some custom stuff that is not entirely the Maven way and 
   want to ignore it for the sake of running cobertura (it does not contain 
   code anyway). Here's where I start hitting trouble. It seems that I 
   cannot get the skip to work. It always at least runs the prepare. It's 
   not corbertura that's failing (one of our in house plugins 
   unfortunately), but I don't want that prepare to run at all.
  
   Ideally I would just use a skip like this:
  
   plugin
   groupIdorg.codehaus.mojo/groupId
   artifactIdcobertura-maven-plugin/artifactId
   configuration
   skiptrue/skip
   /configuration
   /plugin
  
   But when I put that in, it still invokes cobertura. At least I see it 
   say this:
  
   [INFO] Preparing cobertura:cobertura
  
   And it proceeds to run all the other plugins again