Re: [appfuse-user] Clover

2010-12-09 Thread Matt Raible
I agree it's worth patching the source. Please enter an issue in JIRA.

http://issues.appfuse.org/browse/APF

Thanks!

On Thu, Dec 9, 2010 at 6:39 AM, Milbourne, Anthony <
[email protected]> wrote:

>  I have found the cause of the Clover problem, and it appears to be an
> error in the AppFuse POM.
> Line 70 of the core POM is:
> target/test-classes/jdbc.properties
>
> Clover has to instrument the java code (unlike cobertura which instruments
> the class files), so it copies everything to a separate directory and sets
> all the maven variables to make it work.  But the line above hard-codes one
> of the locations that Clover has changed, so the Clover version of the code
> can't find the file.
>
> All works fine if you change the line above to:
>
> ${project.build.testOutputDirectory}/jdbc.properties
>
> This is mentioned here as well (middle of section 9.2.1):
>
> http://www.sonatype.com/books/mvnref-book/reference/resource-filtering-sect-properties.html
>
> After the above change, Clover will run fine with the config given in my
> previous mail.
>
> *Matt: I think it would be worth patching the source, unless I have missed
> something?*
>
> Thanks,
>
> Anthony.
>  --
> On the 30 November 2010 14:17 Josep García Wrote:
> mvn site has its own lifecycle, and does not incluce
> process-test-resources.
>
>
> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
>
> What is the output in the console? Which are the goals executed when you
> issue mvn site?
>
> Josep
>
> 2010/11/30 Milbourne, Anthony
>
>>  Hi All,
>>
>> I am using the 2.1.0-M1 version of the modular spring archetype and I'm
>> trying to get Clover (3.0.2) working with AppFuse and I seem to be going
>> backwards :-(.
>>
>> I have added a clover profile, as below (I have tried adding it to the top
>> level POM and the core sub-POM):
>>
>> 
>>   clover
>>   
>> 
>>   
>> com.atlassian.maven.plugins
>> maven-clover2-plugin
>> 
>>   
>> 
>>   
>> 
>> 
>>   
>> clover
>> verify
>> 
>>   instrument
>>   aggregate
>> 
>>   
>>   
>> pre-site
>> 
>>   instrument
>>   aggregate
>> 
>>   
>> 
>>   
>>   
>>   
>>   
>> 
>>   
>> com.atlassian.maven.plugins
>> maven-clover2-plugin
>>   
>> 
>>   
>> 
>>
>> This seemed to conflict with the canoo testes in the web module so I
>> commented out the activation block that caused canoo to run, as so:
>>
>> 
>>
>> I now have to run canoo manually with mvn verify -Pintegration-test, but
>> I can build the project and Clover does appear to run when I specify mvn
>> verify -Pclover. However, if I run mvn site -Pclover I get an error from
>> Hibernate as below:
>>
>> The dialect was not set. Set the property hibernate.dialect.
>>
>> Even if I explicitly set the DB profile with something like mvn site
>> -Pclover,h2 it still fails with the same error.
>>
>> *Has anyone else got Clover working with AppFuse?*  Matt, I read another
>> post where you mentioned that you used Clover, but I couldn't find any more
>> details apart from Dustin 
>> Pearce-2's
>> suggestion to add a dependency (which didn't seem to fix things).
>>
>> Thanks,
>>
>> Anthony.
>>
>
>
> ==
> Please access the attached hyperlink for an important electronic
> communications disclaimer:
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>
> ==
>
>


RE: [appfuse-user] Clover

2010-12-09 Thread Milbourne, Anthony
I have found the cause of the Clover problem, and it appears to be an error in 
the AppFuse POM.
Line 70 of the core POM is:
target/test-classes/jdbc.properties
 
Clover has to instrument the java code (unlike cobertura which instruments the 
class files), so it copies everything to a separate directory and sets all the 
maven variables to make it work.  But the line above hard-codes one of the 
locations that Clover has changed, so the Clover version of the code can't find 
the file.
 
All works fine if you change the line above to:
${project.build.testOutputDirectory}/jdbc.properties
 
This is mentioned here as well (middle of section 9.2.1):
http://www.sonatype.com/books/mvnref-book/reference/resource-filtering-sect-properties.html
 
After the above change, Clover will run fine with the config given in my 
previous mail.
 
Matt: I think it would be worth patching the source, unless I have missed 
something?
 
Thanks,
 
Anthony.



On the 30 November 2010 14:17 Josep García Wrote: 

mvn site has its own lifecycle, and does not incluce process-test-resources.

http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

What is the output in the console? Which are the goals executed when you issue 
mvn site?

Josep


2010/11/30 Milbourne, Anthony


Hi All, 

I am using the 2.1.0-M1 version of the modular spring archetype and I'm 
trying to get Clover (3.0.2) working with AppFuse and I seem to be going 
backwards :-(.

I have added a clover profile, as below (I have tried adding it to the 
top level POM and the core sub-POM): 

 
  clover 
   
 
   
com.atlassian.maven.plugins 
maven-clover2-plugin 
 
   
 
   
 
 
   
clover 
verify 
 
  instrument 
  aggregate
 
   
   
pre-site 
 
  instrument 
  aggregate 
 
   
 
   
   
   
   
 
   
com.atlassian.maven.plugins 
maven-clover2-plugin 
   
 
   
 

This seemed to conflict with the canoo testes in the web module so I 
commented out the activation block that caused canoo to run, as so:

 

I now have to run canoo manually with mvn verify -Pintegration-test, 
but I can build the project and Clover does appear to run when I specify mvn 
verify -Pclover. However, if I run mvn site -Pclover I get an error from 
Hibernate as below:

The dialect was not set. Set the property hibernate.dialect. 

Even if I explicitly set the DB profile with something like mvn site 
-Pclover,h2 it still fails with the same error. 

Has anyone else got Clover working with AppFuse?  Matt, I read another 
post where you mentioned that you used Clover, but I couldn't find any more 
details apart from Dustin Pearce-2 

 's suggestion to add a dependency (which didn't seem to fix things).

Thanks, 

Anthony. 


=== 
Please access the attached hyperlink for an important electronic communications 
disclaimer: 
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
=== 



Re: [appfuse-user] Clover

2010-11-30 Thread Josep García
>From Maven Clover Plugin page:

clover2:instrument
No Instrument all sources using Clover and forks a custom lifecycle to
execute project's tests on the instrumented code so that a Clover database
is created.
It clearly states that executes projects tests, so it fires the test phase.
This is probably  the problem. It is missing the test resources. Check in
classes an test-classes dirs to see if there are the needed files. Maybe you
need to add the resources plugin prior to clover instrument?
Again, if you post the maven output it will help. Check which goals are
being executed when launching mvn site.

Josep

2010/11/30 Milbourne, Anthony 

>  Josep,
>
> I believe mvn site should call the lifecycle up to the site phase, so that
> would be: pre-site & site phases.
>
> If process-test-resources is necessary to run Hibernate (I can see the
> logic there), how come running mvn site works fine - it is just the Clover
> profile that breaks Hibernate (mvn site -Pclover)?
>
> Thanks,
>
> Anthony.
>
>  --
> On the 30 November 2010 14:17 Josep García Wrote:
> mvn site has its own lifecycle, and does not incluce
> process-test-resources.
>
>
> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
>
> What is the output in the console? Which are the goals executed when you
> issue mvn site?
>
> Josep
>
> 2010/11/30 Anthony
>
>  Hi All,
>>
>> I am using the 2.1.0-M1 version of the modular spring archetype and I'm
>> trying to get Clover (3.0.2) working with AppFuse and I seem to be going
>> backwards :-(.
>>
>> I have added a clover profile, as below (I have tried adding it to the top
>> level POM and the core sub-POM):
>>
>> 
>>   clover
>>   
>> 
>>   
>> com.atlassian.maven.plugins
>> maven-clover2-plugin
>> 
>>   
>> 
>>   
>> 
>> 
>>   
>> clover
>> verify
>> 
>>   instrument
>>   aggregate
>> 
>>   
>>   
>> pre-site
>> 
>>   instrument
>>   aggregate
>> 
>>   
>> 
>>   
>>   
>>   
>>   
>> 
>>   
>> com.atlassian.maven.plugins
>> maven-clover2-plugin
>>   
>> 
>>   
>> 
>>
>> This seemed to conflict with the canoo testes in the web module so I
>> commented out the activation block that caused canoo to run, as so:
>>
>> 
>>
>> I now have to run canoo manually with mvn verify -Pintegration-test, but
>> I can build the project and Clover does appear to run when I specify mvn
>> verify -Pclover. However, if I run mvn site -Pclover I get an error from
>> Hibernate as below:
>>
>> The dialect was not set. Set the property hibernate.dialect.
>>
>> Even if I explicitly set the DB profile with something like mvn site
>> -Pclover,h2 it still fails with the same error.
>>
>> *Has anyone else got Clover working with AppFuse?*  Matt, I read another
>> post where you mentioned that you used Clover, but I couldn't find any more
>> details apart from Dustin 
>> Pearce-2's
>> suggestion to add a dependency (which didn't seem to fix things).
>>
>> Thanks,
>>
>> Anthony.
>>
>
>
> ==
> Please access the attached hyperlink for an important electronic
> communications disclaimer:
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>
> ==
>
>


RE: [appfuse-user] Clover

2010-11-30 Thread Milbourne, Anthony
Josep,
 
I believe mvn site should call the lifecycle up to the site phase, so that 
would be: pre-site & site phases.
 
If process-test-resources is necessary to run Hibernate (I can see the logic 
there), how come running mvn site works fine - it is just the Clover profile 
that breaks Hibernate (mvn site -Pclover)?
 
Thanks,
 
Anthony.
 


On the 30 November 2010 14:17 Josep García Wrote: 

mvn site has its own lifecycle, and does not incluce process-test-resources.

http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

What is the output in the console? Which are the goals executed when you issue 
mvn site?

Josep


2010/11/30 Anthony


Hi All, 

I am using the 2.1.0-M1 version of the modular spring archetype and I'm 
trying to get Clover (3.0.2) working with AppFuse and I seem to be going 
backwards :-(.

I have added a clover profile, as below (I have tried adding it to the 
top level POM and the core sub-POM): 

 
  clover 
   
 
   
com.atlassian.maven.plugins 
maven-clover2-plugin 
 
   
 
   
 
 
   
clover 
verify 
 
  instrument 
  aggregate
 
   
   
pre-site 
 
  instrument 
  aggregate 
 
   
 
   
   
   
   
 
   
com.atlassian.maven.plugins 
maven-clover2-plugin 
   
 
   
 

This seemed to conflict with the canoo testes in the web module so I 
commented out the activation block that caused canoo to run, as so:

 

I now have to run canoo manually with mvn verify -Pintegration-test, 
but I can build the project and Clover does appear to run when I specify mvn 
verify -Pclover. However, if I run mvn site -Pclover I get an error from 
Hibernate as below:

The dialect was not set. Set the property hibernate.dialect. 

Even if I explicitly set the DB profile with something like mvn site 
-Pclover,h2 it still fails with the same error. 

Has anyone else got Clover working with AppFuse?  Matt, I read another 
post where you mentioned that you used Clover, but I couldn't find any more 
details apart from Dustin Pearce-2 

 's suggestion to add a dependency (which didn't seem to fix things).

Thanks, 

Anthony. 


=== 
Please access the attached hyperlink for an important electronic communications 
disclaimer: 
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
=== 



Re: [appfuse-user] Clover

2010-11-30 Thread Josep García
mvn site has its own lifecycle, and does not incluce process-test-resources.

http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

What is the output in the console? Which are the goals executed when you
issue mvn site?

Josep

2010/11/30 Milbourne, Anthony 

>  Hi All,
>
> I am using the 2.1.0-M1 version of the modular spring archetype and I'm
> trying to get Clover (3.0.2) working with AppFuse and I seem to be going
> backwards :-(.
>
> I have added a clover profile, as below (I have tried adding it to the top
> level POM and the core sub-POM):
>
> 
>   clover
>   
> 
>   
> com.atlassian.maven.plugins
> maven-clover2-plugin
> 
>   
> 
>   
> 
> 
>   
> clover
> verify
> 
>   instrument
>   aggregate
> 
>   
>   
> pre-site
> 
>   instrument
>   aggregate
> 
>   
> 
>   
>   
>   
>   
> 
>   
> com.atlassian.maven.plugins
> maven-clover2-plugin
>   
> 
>   
> 
>
> This seemed to conflict with the canoo testes in the web module so I
> commented out the activation block that caused canoo to run, as so:
>
> 
>
> I now have to run canoo manually with mvn verify -Pintegration-test, but I
> can build the project and Clover does appear to run when I specify mvn
> verify -Pclover. However, if I run mvn site -Pclover I get an error from
> Hibernate as below:
>
> The dialect was not set. Set the property hibernate.dialect.
>
> Even if I explicitly set the DB profile with something like mvn site
> -Pclover,h2 it still fails with the same error.
>
> *Has anyone else got Clover working with AppFuse?*  Matt, I read another
> post where you mentioned that you used Clover, but I couldn't find any more
> details apart from Dustin 
> Pearce-2's
> suggestion to add a dependency (which didn't seem to fix things).
>
> Thanks,
>
> Anthony.
>
>
> ==
> Please access the attached hyperlink for an important electronic
> communications disclaimer:
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>
> ==
>
>


[appfuse-user] Clover

2010-11-30 Thread Milbourne, Anthony
Hi All,

I am using the 2.1.0-M1 version of the modular spring archetype and I'm
trying to get Clover (3.0.2) working with AppFuse and I seem to be going
backwards :-(.
I have added a clover profile, as below (I have tried adding it to the
top level POM and the core sub-POM):


  clover
  

  
com.atlassian.maven.plugins
maven-clover2-plugin

  

  


  
clover
verify

  instrument
  aggregate

  
  
pre-site

  instrument
  aggregate

  

  
  
  
  

  
com.atlassian.maven.plugins
maven-clover2-plugin
  

  


This seemed to conflict with the canoo testes in the web module so I
commented out the activation block that caused canoo to run, as so:



I now have to run canoo manually with mvn verify -Pintegration-test, but
I can build the project and Clover does appear to run when I specify mvn
verify -Pclover. However, if I run mvn site -Pclover I get an error from
Hibernate as below:

The dialect was not set. Set the property hibernate.dialect.

Even if I explicitly set the DB profile with something like mvn site
-Pclover,h2 it still fails with the same error.

Has anyone else got Clover working with AppFuse?  Matt, I read another
post where you mentioned that you used Clover, but I couldn't find any
more details apart from Dustin Pearce-2
 's suggestion to add a dependency (which didn't seem
to fix things).

Thanks,

Anthony.


=== 
Please access the attached hyperlink for an important electronic communications 
disclaimer: 
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
===