erro with Maven plugin MOJO

View: New views
13 Messages — Rating Filter:   Alert me  

erro with Maven plugin MOJO

by Franck Bassy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

i try to execute mvn sonar:sonar on a new maven plugin MOJO and i don't understand i'v no code coverage and he didn't find my units tests :x

I need to specify some information in my pom ?

thank for your answer

there the stacktrace :

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] ------------------------------------------------------------------------
[INFO] Building checkstyle_retriever Maven Mojo
[INFO]    task-segment: [sonar:sonar] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [sonar:sonar]
[INFO] Sonar host: http://w30414:9000
[INFO] Sonar version: 1.9.2
[INFO] [sonar-core:internal]
[INFO] Sonar JDBC URL: jdbc:mysql://w30414:3306/sonar?useUnicode=true&characterEncoding=utf8
[INFO] Sonar JDBC login: root
[INFO] Sonar JDBC driver: com.mysql.jdbc.Driver
[INFO] Sonar branch:
[INFO] checkstyle_retriever Maven Mojo Getting Plugin Extensions...
[INFO] checkstyle_retriever Maven Mojo Selected quality profile : Sonar Test, language=java
[INFO] checkstyle_retriever Maven Mojo Executing org.apache.maven.plugins:maven-pmd-plugin:[pmd]
[INFO] ------------------------------------------------------------------------
[INFO] Building checkstyle_retriever Maven Mojo
[INFO]    task-segment: [org.apache.maven.plugins:maven-pmd-plugin::pmd]
[INFO] ------------------------------------------------------------------------
[INFO] [pmd:pmd]
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[WARNING] Error while parsing D:\projets\checkstyle_retriever\src\main\java\com\trem\checkstyle_retriever\RetrieveCheckstyleMojo.java: Can't use annota
tions when running in JDK 1.4 mode!
[INFO] checkstyle_retriever Maven Mojo Executing org.apache.maven.plugins:maven-checkstyle-plugin:[checkstyle]
[INFO] ------------------------------------------------------------------------
[INFO] Building checkstyle_retriever Maven Mojo
[INFO]    task-segment: [org.apache.maven.plugins:maven-checkstyle-plugin::checkstyle]
[INFO] ------------------------------------------------------------------------
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] **************************************************************
[INFO] Starting Jakarta Velocity v1.4
[INFO] RuntimeInstance initializing.
[INFO] Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties
[INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl)
[INFO] Resource Loader Instantiated: org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
[INFO] ClasspathResourceLoader : initialization starting.
[INFO] ClasspathResourceLoader : initialization complete.
[INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl)
[INFO] Default ResourceManager initialization complete.
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
[INFO] Created: 20 parsers.
[INFO] Velocimacro : initialization starting.
[INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm
[ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
[INFO] Velocimacro : error using  VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find r
esource 'VM_global_library.vm'
[INFO] Velocimacro :  VM library template macro registration complete.
[INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates
[INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be  global in scope if allowed.
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[INFO] [checkstyle:checkstyle]
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] checkstyle_retriever Maven Mojo Executing org.codehaus.mojo:taglist-maven-plugin:[taglist]
[INFO] ------------------------------------------------------------------------
[INFO] Building checkstyle_retriever Maven Mojo
[INFO]    task-segment: [org.codehaus.mojo:taglist-maven-plugin::taglist]
[INFO] ------------------------------------------------------------------------
[INFO] [taglist:taglist]
[INFO] checkstyle_retriever Maven Mojo Executing org.codehaus.mojo:cobertura-maven-plugin:[cobertura]
[INFO] ------------------------------------------------------------------------
[INFO] Building checkstyle_retriever Maven Mojo
[INFO]    task-segment: [org.codehaus.mojo:cobertura-maven-plugin::cobertura]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing cobertura:cobertura
[INFO] [plugin:descriptor]
[INFO] Using 2 extractors.
[INFO] Applying extractor for language: java
[INFO] Extractor for language: java found 1 mojo descriptors.
[INFO] Applying extractor for language: bsh
[INFO] Extractor for language: bsh found 0 mojo descriptors.
[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\projets\checkstyle_retriever\src\main\resources
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [cobertura:instrument]
[INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Cobertura: Loaded information on 4 classes.
Instrumenting 4 files to D:\projets\checkstyle_retriever\target\generated-classes\cobertura
Cobertura: Saved information on 4 classes.
Instrument time: 281ms

[INFO] Instrumentation was successful.
[INFO] [resources:testResources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\projets\checkstyle_retriever\src\test\resources
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report directory: D:\projets\checkstyle_retriever\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

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

[INFO] [cobertura:cobertura]
[INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Cobertura: Loaded information on 4 classes.
[cobertura] INFO  [main] net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find source file during CCN computation, source=[com/trem/ch
eckstyle_retriever/GreetingMojo.java]
[cobertura] INFO  [main] net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find source file during CCN computation, source=[com/trem/ch
eckstyle_retriever/RetrieveFile.java]
Report time: 313ms

[INFO] Cobertura Report generation was successful.
[INFO] checkstyle_retriever Maven Mojo Executing org.apache.maven.plugins:maven-surefire-plugin:[]
[INFO] checkstyle_retriever Maven Mojo [class org.sonar.plugins.pmd.PmdMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo [class org.sonar.plugins.isoqa.JDependMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo [class org.sonar.plugins.isoqa.CkjmMavenCollector] executing
java.lang.ClassNotFoundException: Exception while looking for class org.apache.maven.plugin.AbstractMojo: java.io.IOException: Couldn't find: org.apac
he.maven.plugin.AbstractMojo.class
java.lang.ClassNotFoundException: Exception while looking for class junit.framework.TestCase: java.io.IOException: Couldn't find: junit.framework.Test
Case.class
[INFO] checkstyle_retriever Maven Mojo [class org.sonar.plugins.squid.SquidMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo Starting audit...
[INFO] checkstyle_retriever Maven Mojo Audit done.
[INFO] checkstyle_retriever Maven Mojo [class org.sonar.plugins.core.SaveProfileMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo [class org.sonar.plugins.core.sources.ImportJavaSourcesMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo [class org.sonar.plugins.core.SaveProjectLinksFromPom] executing
[INFO] checkstyle_retriever Maven Mojo [class org.sonar.plugins.checkstyle.CheckstyleMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo [class org.sonar.plugins.cpd.CpdMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo Collecting duplications...
[INFO] checkstyle_retriever Maven Mojo File suffixes : java
[INFO] checkstyle_retriever Maven Mojo Exclusions : {}
[INFO] checkstyle_retriever Maven Mojo [class org.sonar.plugins.taglist.TaglistMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo Parsing D:\projets\checkstyle_retriever\target\taglist\taglist.xml
[INFO] checkstyle_retriever Maven Mojo [class org.sonar.plugins.cobertura.CoberturaMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo parsing D:\projets\checkstyle_retriever\target\site\cobertura\coverage.xml
[INFO] checkstyle_retriever Maven Mojo [class org.sonar.plugins.surefire.SurefireMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo parsing D:\projets\checkstyle_retriever\target\surefire-reports
[INFO]  Trigger server
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 39 seconds
[INFO] Finished at: Fri Jun 26 16:40:59 CEST 2009
[INFO] Final Memory: 25M/45M
[INFO] ------------------------------------------------------------------------

Re: erro with Maven plugin MOJO

by Franck Bassy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

i try with this mojo to download checkstyle rules from sonar and upload it a current project. (and automatically use it in eclipse)

Devlopper is abble to use checkstyle rules from sonar and prevent error before "mvn sonar" it ;D

Re: erro with Maven plugin MOJO

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Franck,

Could you try to directly launch the command "mvn cobertura:cobertura" ? I guess you'll encounter the same issue as the cobertura plugin doesn't seem to be able to retrieve the unit tests. Do you have any special configuration in your pom.xml file which can impact unit tests execution ?

Cheers
Freddy

On Fri, Jun 26, 2009 at 4:46 PM, Franck Bassy <franck.bassy@...> wrote:

Hi,

i try to execute mvn sonar:sonar on a new maven plugin MOJO and i don't
understand i'v no code coverage and he didn't find my units tests :x

I need to specify some information in my pom ?

thank for your answer

there the stacktrace :

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO]
------------------------------------------------------------------------
[INFO] Building checkstyle_retriever Maven Mojo
[INFO]    task-segment: [sonar:sonar] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] [sonar:sonar]
[INFO] Sonar host: http://w30414:9000
[INFO] Sonar version: 1.9.2
[INFO] [sonar-core:internal]
[INFO] Sonar JDBC URL:
jdbc:mysql://w30414:3306/sonar?useUnicode=true&characterEncoding=utf8
[INFO] Sonar JDBC login: root
[INFO] Sonar JDBC driver: com.mysql.jdbc.Driver
[INFO] Sonar branch:
[INFO] checkstyle_retriever Maven Mojo Getting Plugin Extensions...
[INFO] checkstyle_retriever Maven Mojo Selected quality profile : Sonar
Test, language=java
[INFO] checkstyle_retriever Maven Mojo Executing
org.apache.maven.plugins:maven-pmd-plugin:[pmd]
[INFO]
------------------------------------------------------------------------
[INFO] Building checkstyle_retriever Maven Mojo
[INFO]    task-segment: [org.apache.maven.plugins:maven-pmd-plugin::pmd]
[INFO]
------------------------------------------------------------------------
[INFO] [pmd:pmd]
[WARNING] File encoding has not been set, using platform encoding Cp1252,
i.e. build is platform dependent!
[WARNING] Error while parsing
D:\projets\checkstyle_retriever\src\main\java\com\trem\checkstyle_retriever\RetrieveCheckstyleMojo.java:
Can't use annota
tions when running in JDK 1.4 mode!
[INFO] checkstyle_retriever Maven Mojo Executing
org.apache.maven.plugins:maven-checkstyle-plugin:[checkstyle]
[INFO]
------------------------------------------------------------------------
[INFO] Building checkstyle_retriever Maven Mojo
[INFO]    task-segment:
[org.apache.maven.plugins:maven-checkstyle-plugin::checkstyle]
[INFO]
------------------------------------------------------------------------
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] **************************************************************
[INFO] Starting Jakarta Velocity v1.4
[INFO] RuntimeInstance initializing.
[INFO] Default Properties File:
org\apache\velocity\runtime\defaults\velocity.properties
[INFO] Default ResourceManager initializing. (class
org.apache.velocity.runtime.resource.ResourceManagerImpl)
[INFO] Resource Loader Instantiated:
org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
[INFO] ClasspathResourceLoader : initialization starting.
[INFO] ClasspathResourceLoader : initialization complete.
[INFO] ResourceCache : initialized. (class
org.apache.velocity.runtime.resource.ResourceCacheImpl)
[INFO] Default ResourceManager initialization complete.
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Literal
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Include
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Foreach
[INFO] Created: 20 parsers.
[INFO] Velocimacro : initialization starting.
[INFO] Velocimacro : adding VMs from VM library template :
VM_global_library.vm
[ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in
any resource loader.
[INFO] Velocimacro : error using  VM library template VM_global_library.vm :
org.apache.velocity.exception.ResourceNotFoundException: Unable to find r
esource 'VM_global_library.vm'
[INFO] Velocimacro :  VM library template macro registration complete.
[INFO] Velocimacro : allowInline = true : VMs can be defined inline in
templates
[INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may
NOT replace previous VM definitions
[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be
global in scope if allowed.
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[INFO] [checkstyle:checkstyle]
[WARNING] File encoding has not been set, using platform encoding Cp1252,
i.e. build is platform dependent!
[INFO] checkstyle_retriever Maven Mojo Executing
org.codehaus.mojo:taglist-maven-plugin:[taglist]
[INFO]
------------------------------------------------------------------------
[INFO] Building checkstyle_retriever Maven Mojo
[INFO]    task-segment: [org.codehaus.mojo:taglist-maven-plugin::taglist]
[INFO]
------------------------------------------------------------------------
[INFO] [taglist:taglist]
[INFO] checkstyle_retriever Maven Mojo Executing
org.codehaus.mojo:cobertura-maven-plugin:[cobertura]
[INFO]
------------------------------------------------------------------------
[INFO] Building checkstyle_retriever Maven Mojo
[INFO]    task-segment:
[org.codehaus.mojo:cobertura-maven-plugin::cobertura]
[INFO]
------------------------------------------------------------------------
[INFO] Preparing cobertura:cobertura
[INFO] [plugin:descriptor]
[INFO] Using 2 extractors.
[INFO] Applying extractor for language: java
[INFO] Extractor for language: java found 1 mojo descriptors.
[INFO] Applying extractor for language: bsh
[INFO] Extractor for language: bsh found 0 mojo descriptors.
[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
D:\projets\checkstyle_retriever\src\main\resources
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [cobertura:instrument]
[INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Cobertura: Loaded information on 4 classes.
Instrumenting 4 files to
D:\projets\checkstyle_retriever\target\generated-classes\cobertura
Cobertura: Saved information on 4 classes.
Instrument time: 281ms

[INFO] Instrumentation was successful.
[INFO] [resources:testResources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
D:\projets\checkstyle_retriever\src\test\resources
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report directory:
D:\projets\checkstyle_retriever\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

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

[INFO] [cobertura:cobertura]
[INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Cobertura: Loaded information on 4 classes.
[cobertura] INFO  [main]
net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
source file during CCN computation, source=[com/trem/ch
eckstyle_retriever/GreetingMojo.java]
[cobertura] INFO  [main]
net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
source file during CCN computation, source=[com/trem/ch
eckstyle_retriever/RetrieveFile.java]
Report time: 313ms

[INFO] Cobertura Report generation was successful.
[INFO] checkstyle_retriever Maven Mojo Executing
org.apache.maven.plugins:maven-surefire-plugin:[]
[INFO] checkstyle_retriever Maven Mojo [class
org.sonar.plugins.pmd.PmdMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo [class
org.sonar.plugins.isoqa.JDependMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo [class
org.sonar.plugins.isoqa.CkjmMavenCollector] executing
java.lang.ClassNotFoundException: Exception while looking for class
org.apache.maven.plugin.AbstractMojo: java.io.IOException: Couldn't find:
org.apac
he.maven.plugin.AbstractMojo.class
java.lang.ClassNotFoundException: Exception while looking for class
junit.framework.TestCase: java.io.IOException: Couldn't find:
junit.framework.Test
Case.class
[INFO] checkstyle_retriever Maven Mojo [class
org.sonar.plugins.squid.SquidMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo Starting audit...
[INFO] checkstyle_retriever Maven Mojo Audit done.
[INFO] checkstyle_retriever Maven Mojo [class
org.sonar.plugins.core.SaveProfileMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo [class
org.sonar.plugins.core.sources.ImportJavaSourcesMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo [class
org.sonar.plugins.core.SaveProjectLinksFromPom] executing
[INFO] checkstyle_retriever Maven Mojo [class
org.sonar.plugins.checkstyle.CheckstyleMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo [class
org.sonar.plugins.cpd.CpdMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo Collecting duplications...
[INFO] checkstyle_retriever Maven Mojo File suffixes : java
[INFO] checkstyle_retriever Maven Mojo Exclusions : {}
[INFO] checkstyle_retriever Maven Mojo [class
org.sonar.plugins.taglist.TaglistMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo Parsing
D:\projets\checkstyle_retriever\target\taglist\taglist.xml
[INFO] checkstyle_retriever Maven Mojo [class
org.sonar.plugins.cobertura.CoberturaMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo parsing
D:\projets\checkstyle_retriever\target\site\cobertura\coverage.xml
[INFO] checkstyle_retriever Maven Mojo [class
org.sonar.plugins.surefire.SurefireMavenCollector] executing
[INFO] checkstyle_retriever Maven Mojo parsing
D:\projets\checkstyle_retriever\target\surefire-reports
[INFO]  Trigger server
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 39 seconds
[INFO] Finished at: Fri Jun 26 16:40:59 CEST 2009
[INFO] Final Memory: 25M/45M
[INFO]
------------------------------------------------------------------------

--
View this message in context: http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24221614.html
Sent from the Sonar user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: erro with Maven plugin MOJO

by Franck Bassy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

i'v no specific configuration :

mvn cobertura:cobertura give me :

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'cobertura'.
[INFO] ------------------------------------------------------------------------
[INFO] Building checkstyle_retriever Maven Mojo
[INFO]    task-segment: [cobertura:cobertura]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing cobertura:cobertura
[INFO] [plugin:descriptor]
[INFO] Using 2 extractors.
[INFO] Applying extractor for language: java
[INFO] Extractor for language: java found 1 mojo descriptors.
[INFO] Applying extractor for language: bsh
[INFO] Extractor for language: bsh found 0 mojo descriptors.
[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\projets\checkstyle_retriever\src\main\resources
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [cobertura:instrument]
[INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Cobertura: Loaded information on 4 classes.
Instrumenting 4 files to D:\projets\checkstyle_retriever\target\generated-classes\cobertura
Cobertura: Saved information on 4 classes.
Instrument time: 328ms

[INFO] Instrumentation was successful.
[INFO] [resources:testResources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\projets\checkstyle_retriever\src\test\resources
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report directory: D:\projets\checkstyle_retriever\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

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

[INFO] [cobertura:cobertura]
[INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Cobertura: Loaded information on 4 classes.
[cobertura] INFO  [main] net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find source file during CCN computation, source=[com/trem/ch
eckstyle_retriever/GreetingMojo.java]
[cobertura] INFO  [main] net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find source file during CCN computation, source=[com/trem/ch
eckstyle_retriever/RetrieveFile.java]
Report time: 406ms

[INFO] Cobertura Report generation was successful.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13 seconds
[INFO] Finished at: Mon Jun 29 09:34:03 CEST 2009
[INFO] Final Memory: 12M/21M
[INFO] ------------------------------------------------------------------------


Freddy Mallet wrote:
Hi Franck,
Could you try to directly launch the command "mvn cobertura:cobertura" ? I
guess you'll encounter the same issue as the cobertura plugin doesn't seem
to be able to retrieve the unit tests. Do you have any special configuration
in your pom.xml file which can impact unit tests execution ?

Cheers
Freddy

On Fri, Jun 26, 2009 at 4:46 PM, Franck Bassy
<franck.bassy@atosorigin.com>wrote:

>
> Hi,
>
> i try to execute mvn sonar:sonar on a new maven plugin MOJO and i don't
> understand i'v no code coverage and he didn't find my units tests :x
>
> I need to specify some information in my pom ?
>
> thank for your answer
>
> there the stacktrace :
>
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'sonar'.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building checkstyle_retriever Maven Mojo
> [INFO]    task-segment: [sonar:sonar] (aggregator-style)
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [sonar:sonar]
> [INFO] Sonar host: http://w30414:9000
> [INFO] Sonar version: 1.9.2
> [INFO] [sonar-core:internal]
> [INFO] Sonar JDBC URL:
> jdbc:mysql://w30414:3306/sonar?useUnicode=true&characterEncoding=utf8
> [INFO] Sonar JDBC login: root
> [INFO] Sonar JDBC driver: com.mysql.jdbc.Driver
> [INFO] Sonar branch:
> [INFO] checkstyle_retriever Maven Mojo Getting Plugin Extensions...
> [INFO] checkstyle_retriever Maven Mojo Selected quality profile : Sonar
> Test, language=java
> [INFO] checkstyle_retriever Maven Mojo Executing
> org.apache.maven.plugins:maven-pmd-plugin:[pmd]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building checkstyle_retriever Maven Mojo
> [INFO]    task-segment: [org.apache.maven.plugins:maven-pmd-plugin::pmd]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [pmd:pmd]
> [WARNING] File encoding has not been set, using platform encoding Cp1252,
> i.e. build is platform dependent!
> [WARNING] Error while parsing
>
> D:\projets\checkstyle_retriever\src\main\java\com\trem\checkstyle_retriever\RetrieveCheckstyleMojo.java:
> Can't use annota
> tions when running in JDK 1.4 mode!
> [INFO] checkstyle_retriever Maven Mojo Executing
> org.apache.maven.plugins:maven-checkstyle-plugin:[checkstyle]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building checkstyle_retriever Maven Mojo
> [INFO]    task-segment:
> [org.apache.maven.plugins:maven-checkstyle-plugin::checkstyle]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Setting property: classpath.resource.loader.class =>
> 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
> [INFO] Setting property: velocimacro.messages.on => 'false'.
> [INFO] Setting property: resource.loader => 'classpath'.
> [INFO] Setting property: resource.manager.logwhenfound => 'false'.
> [INFO] **************************************************************
> [INFO] Starting Jakarta Velocity v1.4
> [INFO] RuntimeInstance initializing.
> [INFO] Default Properties File:
> org\apache\velocity\runtime\defaults\velocity.properties
> [INFO] Default ResourceManager initializing. (class
> org.apache.velocity.runtime.resource.ResourceManagerImpl)
> [INFO] Resource Loader Instantiated:
> org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
> [INFO] ClasspathResourceLoader : initialization starting.
> [INFO] ClasspathResourceLoader : initialization complete.
> [INFO] ResourceCache : initialized. (class
> org.apache.velocity.runtime.resource.ResourceCacheImpl)
> [INFO] Default ResourceManager initialization complete.
> [INFO] Loaded System Directive:
> org.apache.velocity.runtime.directive.Literal
> [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
> [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
> [INFO] Loaded System Directive:
> org.apache.velocity.runtime.directive.Include
> [INFO] Loaded System Directive:
> org.apache.velocity.runtime.directive.Foreach
> [INFO] Created: 20 parsers.
> [INFO] Velocimacro : initialization starting.
> [INFO] Velocimacro : adding VMs from VM library template :
> VM_global_library.vm
> [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in
> any resource loader.
> [INFO] Velocimacro : error using  VM library template VM_global_library.vm
> :
> org.apache.velocity.exception.ResourceNotFoundException: Unable to find r
> esource 'VM_global_library.vm'
> [INFO] Velocimacro :  VM library template macro registration complete.
> [INFO] Velocimacro : allowInline = true : VMs can be defined inline in
> templates
> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may
> NOT replace previous VM definitions
> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be
> global in scope if allowed.
> [INFO] Velocimacro : initialization complete.
> [INFO] Velocity successfully started.
> [INFO] [checkstyle:checkstyle]
> [WARNING] File encoding has not been set, using platform encoding Cp1252,
> i.e. build is platform dependent!
> [INFO] checkstyle_retriever Maven Mojo Executing
> org.codehaus.mojo:taglist-maven-plugin:[taglist]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building checkstyle_retriever Maven Mojo
> [INFO]    task-segment: [org.codehaus.mojo:taglist-maven-plugin::taglist]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [taglist:taglist]
> [INFO] checkstyle_retriever Maven Mojo Executing
> org.codehaus.mojo:cobertura-maven-plugin:[cobertura]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building checkstyle_retriever Maven Mojo
> [INFO]    task-segment:
> [org.codehaus.mojo:cobertura-maven-plugin::cobertura]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Preparing cobertura:cobertura
> [INFO] [plugin:descriptor]
> [INFO] Using 2 extractors.
> [INFO] Applying extractor for language: java
> [INFO] Extractor for language: java found 1 mojo descriptors.
> [INFO] Applying extractor for language: bsh
> [INFO] Extractor for language: bsh found 0 mojo descriptors.
> [INFO] [resources:resources]
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory
> D:\projets\checkstyle_retriever\src\main\resources
> [INFO] [compiler:compile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [cobertura:instrument]
> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
> Cobertura: Loaded information on 4 classes.
> Instrumenting 4 files to
> D:\projets\checkstyle_retriever\target\generated-classes\cobertura
> Cobertura: Saved information on 4 classes.
> Instrument time: 281ms
>
> [INFO] Instrumentation was successful.
> [INFO] [resources:testResources]
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory
> D:\projets\checkstyle_retriever\src\test\resources
> [INFO] [compiler:testCompile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [surefire:test]
> [INFO] Surefire report directory:
> D:\projets\checkstyle_retriever\target\surefire-reports
>
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> There are no tests to run.
>
> Results :
>
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>
> [INFO] [cobertura:cobertura]
> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
> Cobertura: Loaded information on 4 classes.
> [cobertura] INFO  [main]
> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
> source file during CCN computation, source=[com/trem/ch
> eckstyle_retriever/GreetingMojo.java]
> [cobertura] INFO  [main]
> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
> source file during CCN computation, source=[com/trem/ch
> eckstyle_retriever/RetrieveFile.java]
> Report time: 313ms
>
> [INFO] Cobertura Report generation was successful.
> [INFO] checkstyle_retriever Maven Mojo Executing
> org.apache.maven.plugins:maven-surefire-plugin:[]
> [INFO] checkstyle_retriever Maven Mojo [class
> org.sonar.plugins.pmd.PmdMavenCollector] executing
> [INFO] checkstyle_retriever Maven Mojo [class
> org.sonar.plugins.isoqa.JDependMavenCollector] executing
> [INFO] checkstyle_retriever Maven Mojo [class
> org.sonar.plugins.isoqa.CkjmMavenCollector] executing
> java.lang.ClassNotFoundException: Exception while looking for class
> org.apache.maven.plugin.AbstractMojo: java.io.IOException: Couldn't find:
> org.apac
> he.maven.plugin.AbstractMojo.class
> java.lang.ClassNotFoundException: Exception while looking for class
> junit.framework.TestCase: java.io.IOException: Couldn't find:
> junit.framework.Test
> Case.class
> [INFO] checkstyle_retriever Maven Mojo [class
> org.sonar.plugins.squid.SquidMavenCollector] executing
> [INFO] checkstyle_retriever Maven Mojo Starting audit...
> [INFO] checkstyle_retriever Maven Mojo Audit done.
> [INFO] checkstyle_retriever Maven Mojo [class
> org.sonar.plugins.core.SaveProfileMavenCollector] executing
> [INFO] checkstyle_retriever Maven Mojo [class
> org.sonar.plugins.core.sources.ImportJavaSourcesMavenCollector] executing
> [INFO] checkstyle_retriever Maven Mojo [class
> org.sonar.plugins.core.SaveProjectLinksFromPom] executing
> [INFO] checkstyle_retriever Maven Mojo [class
> org.sonar.plugins.checkstyle.CheckstyleMavenCollector] executing
> [INFO] checkstyle_retriever Maven Mojo [class
> org.sonar.plugins.cpd.CpdMavenCollector] executing
> [INFO] checkstyle_retriever Maven Mojo Collecting duplications...
> [INFO] checkstyle_retriever Maven Mojo File suffixes : java
> [INFO] checkstyle_retriever Maven Mojo Exclusions : {}
> [INFO] checkstyle_retriever Maven Mojo [class
> org.sonar.plugins.taglist.TaglistMavenCollector] executing
> [INFO] checkstyle_retriever Maven Mojo Parsing
> D:\projets\checkstyle_retriever\target\taglist\taglist.xml
> [INFO] checkstyle_retriever Maven Mojo [class
> org.sonar.plugins.cobertura.CoberturaMavenCollector] executing
> [INFO] checkstyle_retriever Maven Mojo parsing
> D:\projets\checkstyle_retriever\target\site\cobertura\coverage.xml
> [INFO] checkstyle_retriever Maven Mojo [class
> org.sonar.plugins.surefire.SurefireMavenCollector] executing
> [INFO] checkstyle_retriever Maven Mojo parsing
> D:\projets\checkstyle_retriever\target\surefire-reports
> [INFO]  Trigger server
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 39 seconds
> [INFO] Finished at: Fri Jun 26 16:40:59 CEST 2009
> [INFO] Final Memory: 25M/45M
> [INFO]
> ------------------------------------------------------------------------
>
> --
> View this message in context:
> http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24221614.html
> Sent from the Sonar user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

Re: erro with Maven plugin MOJO

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Franck,

According to the log, unit tests are not executed by the corbertura plugin :

[INFO] [surefire:test]
[INFO] Surefire report directory:
D:\projets\checkstyle_retriever\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

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

What do you get when you launch "mvn test" ?

Thanks
Freddy

On Mon, Jun 29, 2009 at 9:36 AM, Franck Bassy <franck.bassy@...> wrote:

i'v no specific configuration :

mvn cobertura:cobertura give me :

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'cobertura'.
[INFO]
------------------------------------------------------------------------
[INFO] Building checkstyle_retriever Maven Mojo
[INFO]    task-segment: [cobertura:cobertura]
[INFO]
------------------------------------------------------------------------
[INFO] Preparing cobertura:cobertura
[INFO] [plugin:descriptor]
[INFO] Using 2 extractors.
[INFO] Applying extractor for language: java
[INFO] Extractor for language: java found 1 mojo descriptors.
[INFO] Applying extractor for language: bsh
[INFO] Extractor for language: bsh found 0 mojo descriptors.
[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
D:\projets\checkstyle_retriever\src\main\resources
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [cobertura:instrument]
[INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Cobertura: Loaded information on 4 classes.
Instrumenting 4 files to
D:\projets\checkstyle_retriever\target\generated-classes\cobertura
Cobertura: Saved information on 4 classes.
Instrument time: 328ms

[INFO] Instrumentation was successful.
[INFO] [resources:testResources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
D:\projets\checkstyle_retriever\src\test\resources
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report directory:
D:\projets\checkstyle_retriever\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

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

[INFO] [cobertura:cobertura]
[INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Cobertura: Loaded information on 4 classes.
[cobertura] INFO  [main]
net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
source file during CCN computation, source=[com/trem/ch
eckstyle_retriever/GreetingMojo.java]
[cobertura] INFO  [main]
net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
source file during CCN computation, source=[com/trem/ch
eckstyle_retriever/RetrieveFile.java]
Report time: 406ms

[INFO] Cobertura Report generation was successful.
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 13 seconds
[INFO] Finished at: Mon Jun 29 09:34:03 CEST 2009
[INFO] Final Memory: 12M/21M
[INFO]
------------------------------------------------------------------------



Freddy Mallet wrote:
>
> Hi Franck,
> Could you try to directly launch the command "mvn cobertura:cobertura" ? I
> guess you'll encounter the same issue as the cobertura plugin doesn't seem
> to be able to retrieve the unit tests. Do you have any special
> configuration
> in your pom.xml file which can impact unit tests execution ?
>
> Cheers
> Freddy
>
> On Fri, Jun 26, 2009 at 4:46 PM, Franck Bassy
> <franck.bassy@...>wrote:
>
>>
>> Hi,
>>
>> i try to execute mvn sonar:sonar on a new maven plugin MOJO and i don't
>> understand i'v no code coverage and he didn't find my units tests :x
>>
>> I need to specify some information in my pom ?
>>
>> thank for your answer
>>
>> there the stacktrace :
>>
>> [INFO] Scanning for projects...
>> [INFO] Searching repository for plugin with prefix: 'sonar'.
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building checkstyle_retriever Maven Mojo
>> [INFO]    task-segment: [sonar:sonar] (aggregator-style)
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] [sonar:sonar]
>> [INFO] Sonar host: http://w30414:9000
>> [INFO] Sonar version: 1.9.2
>> [INFO] [sonar-core:internal]
>> [INFO] Sonar JDBC URL:
>> jdbc:mysql://w30414:3306/sonar?useUnicode=true&characterEncoding=utf8
>> [INFO] Sonar JDBC login: root
>> [INFO] Sonar JDBC driver: com.mysql.jdbc.Driver
>> [INFO] Sonar branch:
>> [INFO] checkstyle_retriever Maven Mojo Getting Plugin Extensions...
>> [INFO] checkstyle_retriever Maven Mojo Selected quality profile : Sonar
>> Test, language=java
>> [INFO] checkstyle_retriever Maven Mojo Executing
>> org.apache.maven.plugins:maven-pmd-plugin:[pmd]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building checkstyle_retriever Maven Mojo
>> [INFO]    task-segment: [org.apache.maven.plugins:maven-pmd-plugin::pmd]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] [pmd:pmd]
>> [WARNING] File encoding has not been set, using platform encoding Cp1252,
>> i.e. build is platform dependent!
>> [WARNING] Error while parsing
>>
>> D:\projets\checkstyle_retriever\src\main\java\com\trem\checkstyle_retriever\RetrieveCheckstyleMojo.java:
>> Can't use annota
>> tions when running in JDK 1.4 mode!
>> [INFO] checkstyle_retriever Maven Mojo Executing
>> org.apache.maven.plugins:maven-checkstyle-plugin:[checkstyle]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building checkstyle_retriever Maven Mojo
>> [INFO]    task-segment:
>> [org.apache.maven.plugins:maven-checkstyle-plugin::checkstyle]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Setting property: classpath.resource.loader.class =>
>> 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
>> [INFO] Setting property: velocimacro.messages.on => 'false'.
>> [INFO] Setting property: resource.loader => 'classpath'.
>> [INFO] Setting property: resource.manager.logwhenfound => 'false'.
>> [INFO] **************************************************************
>> [INFO] Starting Jakarta Velocity v1.4
>> [INFO] RuntimeInstance initializing.
>> [INFO] Default Properties File:
>> org\apache\velocity\runtime\defaults\velocity.properties
>> [INFO] Default ResourceManager initializing. (class
>> org.apache.velocity.runtime.resource.ResourceManagerImpl)
>> [INFO] Resource Loader Instantiated:
>> org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
>> [INFO] ClasspathResourceLoader : initialization starting.
>> [INFO] ClasspathResourceLoader : initialization complete.
>> [INFO] ResourceCache : initialized. (class
>> org.apache.velocity.runtime.resource.ResourceCacheImpl)
>> [INFO] Default ResourceManager initialization complete.
>> [INFO] Loaded System Directive:
>> org.apache.velocity.runtime.directive.Literal
>> [INFO] Loaded System Directive:
>> org.apache.velocity.runtime.directive.Macro
>> [INFO] Loaded System Directive:
>> org.apache.velocity.runtime.directive.Parse
>> [INFO] Loaded System Directive:
>> org.apache.velocity.runtime.directive.Include
>> [INFO] Loaded System Directive:
>> org.apache.velocity.runtime.directive.Foreach
>> [INFO] Created: 20 parsers.
>> [INFO] Velocimacro : initialization starting.
>> [INFO] Velocimacro : adding VMs from VM library template :
>> VM_global_library.vm
>> [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm'
>> in
>> any resource loader.
>> [INFO] Velocimacro : error using  VM library template
>> VM_global_library.vm
>> :
>> org.apache.velocity.exception.ResourceNotFoundException: Unable to find r
>> esource 'VM_global_library.vm'
>> [INFO] Velocimacro :  VM library template macro registration complete.
>> [INFO] Velocimacro : allowInline = true : VMs can be defined inline in
>> templates
>> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline
>> may
>> NOT replace previous VM definitions
>> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will
>> be
>> global in scope if allowed.
>> [INFO] Velocimacro : initialization complete.
>> [INFO] Velocity successfully started.
>> [INFO] [checkstyle:checkstyle]
>> [WARNING] File encoding has not been set, using platform encoding Cp1252,
>> i.e. build is platform dependent!
>> [INFO] checkstyle_retriever Maven Mojo Executing
>> org.codehaus.mojo:taglist-maven-plugin:[taglist]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building checkstyle_retriever Maven Mojo
>> [INFO]    task-segment: [org.codehaus.mojo:taglist-maven-plugin::taglist]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] [taglist:taglist]
>> [INFO] checkstyle_retriever Maven Mojo Executing
>> org.codehaus.mojo:cobertura-maven-plugin:[cobertura]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building checkstyle_retriever Maven Mojo
>> [INFO]    task-segment:
>> [org.codehaus.mojo:cobertura-maven-plugin::cobertura]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Preparing cobertura:cobertura
>> [INFO] [plugin:descriptor]
>> [INFO] Using 2 extractors.
>> [INFO] Applying extractor for language: java
>> [INFO] Extractor for language: java found 1 mojo descriptors.
>> [INFO] Applying extractor for language: bsh
>> [INFO] Extractor for language: bsh found 0 mojo descriptors.
>> [INFO] [resources:resources]
>> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> resources, i.e. build is platform dependent!
>> [INFO] skip non existing resourceDirectory
>> D:\projets\checkstyle_retriever\src\main\resources
>> [INFO] [compiler:compile]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [cobertura:instrument]
>> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
>> Cobertura: Loaded information on 4 classes.
>> Instrumenting 4 files to
>> D:\projets\checkstyle_retriever\target\generated-classes\cobertura
>> Cobertura: Saved information on 4 classes.
>> Instrument time: 281ms
>>
>> [INFO] Instrumentation was successful.
>> [INFO] [resources:testResources]
>> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> resources, i.e. build is platform dependent!
>> [INFO] skip non existing resourceDirectory
>> D:\projets\checkstyle_retriever\src\test\resources
>> [INFO] [compiler:testCompile]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [surefire:test]
>> [INFO] Surefire report directory:
>> D:\projets\checkstyle_retriever\target\surefire-reports
>>
>> -------------------------------------------------------
>>  T E S T S
>> -------------------------------------------------------
>> There are no tests to run.
>>
>> Results :
>>
>> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>>
>> [INFO] [cobertura:cobertura]
>> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
>> Cobertura: Loaded information on 4 classes.
>> [cobertura] INFO  [main]
>> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
>> source file during CCN computation, source=[com/trem/ch
>> eckstyle_retriever/GreetingMojo.java]
>> [cobertura] INFO  [main]
>> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
>> source file during CCN computation, source=[com/trem/ch
>> eckstyle_retriever/RetrieveFile.java]
>> Report time: 313ms
>>
>> [INFO] Cobertura Report generation was successful.
>> [INFO] checkstyle_retriever Maven Mojo Executing
>> org.apache.maven.plugins:maven-surefire-plugin:[]
>> [INFO] checkstyle_retriever Maven Mojo [class
>> org.sonar.plugins.pmd.PmdMavenCollector] executing
>> [INFO] checkstyle_retriever Maven Mojo [class
>> org.sonar.plugins.isoqa.JDependMavenCollector] executing
>> [INFO] checkstyle_retriever Maven Mojo [class
>> org.sonar.plugins.isoqa.CkjmMavenCollector] executing
>> java.lang.ClassNotFoundException: Exception while looking for class
>> org.apache.maven.plugin.AbstractMojo: java.io.IOException: Couldn't find:
>> org.apac
>> he.maven.plugin.AbstractMojo.class
>> java.lang.ClassNotFoundException: Exception while looking for class
>> junit.framework.TestCase: java.io.IOException: Couldn't find:
>> junit.framework.Test
>> Case.class
>> [INFO] checkstyle_retriever Maven Mojo [class
>> org.sonar.plugins.squid.SquidMavenCollector] executing
>> [INFO] checkstyle_retriever Maven Mojo Starting audit...
>> [INFO] checkstyle_retriever Maven Mojo Audit done.
>> [INFO] checkstyle_retriever Maven Mojo [class
>> org.sonar.plugins.core.SaveProfileMavenCollector] executing
>> [INFO] checkstyle_retriever Maven Mojo [class
>> org.sonar.plugins.core.sources.ImportJavaSourcesMavenCollector] executing
>> [INFO] checkstyle_retriever Maven Mojo [class
>> org.sonar.plugins.core.SaveProjectLinksFromPom] executing
>> [INFO] checkstyle_retriever Maven Mojo [class
>> org.sonar.plugins.checkstyle.CheckstyleMavenCollector] executing
>> [INFO] checkstyle_retriever Maven Mojo [class
>> org.sonar.plugins.cpd.CpdMavenCollector] executing
>> [INFO] checkstyle_retriever Maven Mojo Collecting duplications...
>> [INFO] checkstyle_retriever Maven Mojo File suffixes : java
>> [INFO] checkstyle_retriever Maven Mojo Exclusions : {}
>> [INFO] checkstyle_retriever Maven Mojo [class
>> org.sonar.plugins.taglist.TaglistMavenCollector] executing
>> [INFO] checkstyle_retriever Maven Mojo Parsing
>> D:\projets\checkstyle_retriever\target\taglist\taglist.xml
>> [INFO] checkstyle_retriever Maven Mojo [class
>> org.sonar.plugins.cobertura.CoberturaMavenCollector] executing
>> [INFO] checkstyle_retriever Maven Mojo parsing
>> D:\projets\checkstyle_retriever\target\site\cobertura\coverage.xml
>> [INFO] checkstyle_retriever Maven Mojo [class
>> org.sonar.plugins.surefire.SurefireMavenCollector] executing
>> [INFO] checkstyle_retriever Maven Mojo parsing
>> D:\projets\checkstyle_retriever\target\surefire-reports
>> [INFO]  Trigger server
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESSFUL
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 39 seconds
>> [INFO] Finished at: Fri Jun 26 16:40:59 CEST 2009
>> [INFO] Final Memory: 25M/45M
>> [INFO]
>> ------------------------------------------------------------------------
>>
>> --
>> View this message in context:
>> http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24221614.html
>> Sent from the Sonar user mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>

--
View this message in context: http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24249654.html
Sent from the Sonar user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: erro with Maven plugin MOJO

by Franck Bassy () :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

but i'v one Junit Test in a folder /src/test/java/ ...

when i try mvn test i'v this :

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building checkstyle_retriever Maven Mojo
[INFO]    task-segment: [test]
[INFO] ------------------------------------------------------------------------
[INFO] [plugin:descriptor]
[INFO] Using 2 extractors.
[INFO] Applying extractor for language: java
[INFO] Extractor for language: java found 1 mojo descriptors.
[INFO] Applying extractor for language: bsh
[INFO] Extractor for language: bsh found 0 mojo descriptors.
[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\projets\checkstyle_retriever\src\main\resources
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\projets\checkstyle_retriever\src\test\resources
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report directory: D:\projets\checkstyle_retriever\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

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

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11 seconds
[INFO] Finished at: Tue Jun 30 09:21:20 CEST 2009
[INFO] Final Memory: 10M/19M
[INFO] ------------------------------------------------------------------------

Maybe it found "Extractor for language: java found 1 mojo descriptors." ??

Only one differencies between simple pom it's packaging attribute,i'v <packaging>maven-plugin</packaging>

Freddy Mallet wrote:
Hello Franck,

According to the log, unit tests are not executed by the corbertura plugin :

[INFO] [surefire:test]
[INFO] Surefire report directory:
D:\projets\checkstyle_retriever\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

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

What do you get when you launch "mvn test" ?
Thanks
Freddy

On Mon, Jun 29, 2009 at 9:36 AM, Franck Bassy
<franck.bassy@atosorigin.com>wrote:

>
> i'v no specific configuration :
>
> mvn cobertura:cobertura give me :
>
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'cobertura'.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building checkstyle_retriever Maven Mojo
> [INFO]    task-segment: [cobertura:cobertura]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Preparing cobertura:cobertura
> [INFO] [plugin:descriptor]
> [INFO] Using 2 extractors.
> [INFO] Applying extractor for language: java
> [INFO] Extractor for language: java found 1 mojo descriptors.
> [INFO] Applying extractor for language: bsh
> [INFO] Extractor for language: bsh found 0 mojo descriptors.
> [INFO] [resources:resources]
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory
> D:\projets\checkstyle_retriever\src\main\resources
> [INFO] [compiler:compile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [cobertura:instrument]
> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
> Cobertura: Loaded information on 4 classes.
> Instrumenting 4 files to
> D:\projets\checkstyle_retriever\target\generated-classes\cobertura
> Cobertura: Saved information on 4 classes.
> Instrument time: 328ms
>
> [INFO] Instrumentation was successful.
> [INFO] [resources:testResources]
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory
> D:\projets\checkstyle_retriever\src\test\resources
> [INFO] [compiler:testCompile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [surefire:test]
> [INFO] Surefire report directory:
> D:\projets\checkstyle_retriever\target\surefire-reports
>
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> There are no tests to run.
>
> Results :
>
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>
> [INFO] [cobertura:cobertura]
> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
> Cobertura: Loaded information on 4 classes.
> [cobertura] INFO  [main]
> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
> source file during CCN computation, source=[com/trem/ch
> eckstyle_retriever/GreetingMojo.java]
> [cobertura] INFO  [main]
> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
> source file during CCN computation, source=[com/trem/ch
> eckstyle_retriever/RetrieveFile.java]
> Report time: 406ms
>
> [INFO] Cobertura Report generation was successful.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 13 seconds
> [INFO] Finished at: Mon Jun 29 09:34:03 CEST 2009
> [INFO] Final Memory: 12M/21M
> [INFO]
> ------------------------------------------------------------------------
>
>
>
> Freddy Mallet wrote:
> >
> > Hi Franck,
> > Could you try to directly launch the command "mvn cobertura:cobertura" ?
> I
> > guess you'll encounter the same issue as the cobertura plugin doesn't
> seem
> > to be able to retrieve the unit tests. Do you have any special
> > configuration
> > in your pom.xml file which can impact unit tests execution ?
> >
> > Cheers
> > Freddy
> >
> > On Fri, Jun 26, 2009 at 4:46 PM, Franck Bassy
> > <franck.bassy@atosorigin.com>wrote:
> >
> >>
> >> Hi,
> >>
> >> i try to execute mvn sonar:sonar on a new maven plugin MOJO and i don't
> >> understand i'v no code coverage and he didn't find my units tests :x
> >>
> >> I need to specify some information in my pom ?
> >>
> >> thank for your answer
> >>
> >> there the stacktrace :
> >>
> >> [INFO] Scanning for projects...
> >> [INFO] Searching repository for plugin with prefix: 'sonar'.
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> [INFO]    task-segment: [sonar:sonar] (aggregator-style)
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] [sonar:sonar]
> >> [INFO] Sonar host: http://w30414:9000
> >> [INFO] Sonar version: 1.9.2
> >> [INFO] [sonar-core:internal]
> >> [INFO] Sonar JDBC URL:
> >> jdbc:mysql://w30414:3306/sonar?useUnicode=true&characterEncoding=utf8
> >> [INFO] Sonar JDBC login: root
> >> [INFO] Sonar JDBC driver: com.mysql.jdbc.Driver
> >> [INFO] Sonar branch:
> >> [INFO] checkstyle_retriever Maven Mojo Getting Plugin Extensions...
> >> [INFO] checkstyle_retriever Maven Mojo Selected quality profile : Sonar
> >> Test, language=java
> >> [INFO] checkstyle_retriever Maven Mojo Executing
> >> org.apache.maven.plugins:maven-pmd-plugin:[pmd]
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> [INFO]    task-segment: [org.apache.maven.plugins:maven-pmd-plugin::pmd]
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] [pmd:pmd]
> >> [WARNING] File encoding has not been set, using platform encoding
> Cp1252,
> >> i.e. build is platform dependent!
> >> [WARNING] Error while parsing
> >>
> >>
> D:\projets\checkstyle_retriever\src\main\java\com\trem\checkstyle_retriever\RetrieveCheckstyleMojo.java:
> >> Can't use annota
> >> tions when running in JDK 1.4 mode!
> >> [INFO] checkstyle_retriever Maven Mojo Executing
> >> org.apache.maven.plugins:maven-checkstyle-plugin:[checkstyle]
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> [INFO]    task-segment:
> >> [org.apache.maven.plugins:maven-checkstyle-plugin::checkstyle]
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] Setting property: classpath.resource.loader.class =>
> >> 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
> >> [INFO] Setting property: velocimacro.messages.on => 'false'.
> >> [INFO] Setting property: resource.loader => 'classpath'.
> >> [INFO] Setting property: resource.manager.logwhenfound => 'false'.
> >> [INFO] **************************************************************
> >> [INFO] Starting Jakarta Velocity v1.4
> >> [INFO] RuntimeInstance initializing.
> >> [INFO] Default Properties File:
> >> org\apache\velocity\runtime\defaults\velocity.properties
> >> [INFO] Default ResourceManager initializing. (class
> >> org.apache.velocity.runtime.resource.ResourceManagerImpl)
> >> [INFO] Resource Loader Instantiated:
> >> org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
> >> [INFO] ClasspathResourceLoader : initialization starting.
> >> [INFO] ClasspathResourceLoader : initialization complete.
> >> [INFO] ResourceCache : initialized. (class
> >> org.apache.velocity.runtime.resource.ResourceCacheImpl)
> >> [INFO] Default ResourceManager initialization complete.
> >> [INFO] Loaded System Directive:
> >> org.apache.velocity.runtime.directive.Literal
> >> [INFO] Loaded System Directive:
> >> org.apache.velocity.runtime.directive.Macro
> >> [INFO] Loaded System Directive:
> >> org.apache.velocity.runtime.directive.Parse
> >> [INFO] Loaded System Directive:
> >> org.apache.velocity.runtime.directive.Include
> >> [INFO] Loaded System Directive:
> >> org.apache.velocity.runtime.directive.Foreach
> >> [INFO] Created: 20 parsers.
> >> [INFO] Velocimacro : initialization starting.
> >> [INFO] Velocimacro : adding VMs from VM library template :
> >> VM_global_library.vm
> >> [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm'
> >> in
> >> any resource loader.
> >> [INFO] Velocimacro : error using  VM library template
> >> VM_global_library.vm
> >> :
> >> org.apache.velocity.exception.ResourceNotFoundException: Unable to find
> r
> >> esource 'VM_global_library.vm'
> >> [INFO] Velocimacro :  VM library template macro registration complete.
> >> [INFO] Velocimacro : allowInline = true : VMs can be defined inline in
> >> templates
> >> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline
> >> may
> >> NOT replace previous VM definitions
> >> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will
> >> be
> >> global in scope if allowed.
> >> [INFO] Velocimacro : initialization complete.
> >> [INFO] Velocity successfully started.
> >> [INFO] [checkstyle:checkstyle]
> >> [WARNING] File encoding has not been set, using platform encoding
> Cp1252,
> >> i.e. build is platform dependent!
> >> [INFO] checkstyle_retriever Maven Mojo Executing
> >> org.codehaus.mojo:taglist-maven-plugin:[taglist]
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> [INFO]    task-segment:
> [org.codehaus.mojo:taglist-maven-plugin::taglist]
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] [taglist:taglist]
> >> [INFO] checkstyle_retriever Maven Mojo Executing
> >> org.codehaus.mojo:cobertura-maven-plugin:[cobertura]
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> [INFO]    task-segment:
> >> [org.codehaus.mojo:cobertura-maven-plugin::cobertura]
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] Preparing cobertura:cobertura
> >> [INFO] [plugin:descriptor]
> >> [INFO] Using 2 extractors.
> >> [INFO] Applying extractor for language: java
> >> [INFO] Extractor for language: java found 1 mojo descriptors.
> >> [INFO] Applying extractor for language: bsh
> >> [INFO] Extractor for language: bsh found 0 mojo descriptors.
> >> [INFO] [resources:resources]
> >> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> >> resources, i.e. build is platform dependent!
> >> [INFO] skip non existing resourceDirectory
> >> D:\projets\checkstyle_retriever\src\main\resources
> >> [INFO] [compiler:compile]
> >> [INFO] Nothing to compile - all classes are up to date
> >> [INFO] [cobertura:instrument]
> >> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT
> file
> >> Cobertura: Loaded information on 4 classes.
> >> Instrumenting 4 files to
> >> D:\projets\checkstyle_retriever\target\generated-classes\cobertura
> >> Cobertura: Saved information on 4 classes.
> >> Instrument time: 281ms
> >>
> >> [INFO] Instrumentation was successful.
> >> [INFO] [resources:testResources]
> >> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> >> resources, i.e. build is platform dependent!
> >> [INFO] skip non existing resourceDirectory
> >> D:\projets\checkstyle_retriever\src\test\resources
> >> [INFO] [compiler:testCompile]
> >> [INFO] Nothing to compile - all classes are up to date
> >> [INFO] [surefire:test]
> >> [INFO] Surefire report directory:
> >> D:\projets\checkstyle_retriever\target\surefire-reports
> >>
> >> -------------------------------------------------------
> >>  T E S T S
> >> -------------------------------------------------------
> >> There are no tests to run.
> >>
> >> Results :
> >>
> >> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> >>
> >> [INFO] [cobertura:cobertura]
> >> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT
> file
> >> Cobertura: Loaded information on 4 classes.
> >> [cobertura] INFO  [main]
> >> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
> >> source file during CCN computation, source=[com/trem/ch
> >> eckstyle_retriever/GreetingMojo.java]
> >> [cobertura] INFO  [main]
> >> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
> >> source file during CCN computation, source=[com/trem/ch
> >> eckstyle_retriever/RetrieveFile.java]
> >> Report time: 313ms
> >>
> >> [INFO] Cobertura Report generation was successful.
> >> [INFO] checkstyle_retriever Maven Mojo Executing
> >> org.apache.maven.plugins:maven-surefire-plugin:[]
> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> org.sonar.plugins.pmd.PmdMavenCollector] executing
> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> org.sonar.plugins.isoqa.JDependMavenCollector] executing
> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> org.sonar.plugins.isoqa.CkjmMavenCollector] executing
> >> java.lang.ClassNotFoundException: Exception while looking for class
> >> org.apache.maven.plugin.AbstractMojo: java.io.IOException: Couldn't
> find:
> >> org.apac
> >> he.maven.plugin.AbstractMojo.class
> >> java.lang.ClassNotFoundException: Exception while looking for class
> >> junit.framework.TestCase: java.io.IOException: Couldn't find:
> >> junit.framework.Test
> >> Case.class
> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> org.sonar.plugins.squid.SquidMavenCollector] executing
> >> [INFO] checkstyle_retriever Maven Mojo Starting audit...
> >> [INFO] checkstyle_retriever Maven Mojo Audit done.
> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> org.sonar.plugins.core.SaveProfileMavenCollector] executing
> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> org.sonar.plugins.core.sources.ImportJavaSourcesMavenCollector]
> executing
> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> org.sonar.plugins.core.SaveProjectLinksFromPom] executing
> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> org.sonar.plugins.checkstyle.CheckstyleMavenCollector] executing
> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> org.sonar.plugins.cpd.CpdMavenCollector] executing
> >> [INFO] checkstyle_retriever Maven Mojo Collecting duplications...
> >> [INFO] checkstyle_retriever Maven Mojo File suffixes : java
> >> [INFO] checkstyle_retriever Maven Mojo Exclusions : {}
> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> org.sonar.plugins.taglist.TaglistMavenCollector] executing
> >> [INFO] checkstyle_retriever Maven Mojo Parsing
> >> D:\projets\checkstyle_retriever\target\taglist\taglist.xml
> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> org.sonar.plugins.cobertura.CoberturaMavenCollector] executing
> >> [INFO] checkstyle_retriever Maven Mojo parsing
> >> D:\projets\checkstyle_retriever\target\site\cobertura\coverage.xml
> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> org.sonar.plugins.surefire.SurefireMavenCollector] executing
> >> [INFO] checkstyle_retriever Maven Mojo parsing
> >> D:\projets\checkstyle_retriever\target\surefire-reports
> >> [INFO]  Trigger server
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] BUILD SUCCESSFUL
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] Total time: 39 seconds
> >> [INFO] Finished at: Fri Jun 26 16:40:59 CEST 2009
> >> [INFO] Final Memory: 25M/45M
> >> [INFO]
> >> ------------------------------------------------------------------------
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24221614.html
> >> Sent from the Sonar user mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list, please visit:
> >>
> >>    http://xircles.codehaus.org/manage_email
> >>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24249654.html
> Sent from the Sonar user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

Re: erro with Maven plugin MOJO

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Franck,

Once your junit test will be executed when "mvn test" is launched, Sonar will work :-)

Freddy

On Tue, Jun 30, 2009 at 9:24 AM, Franck Bassy <franck.bassy@...> wrote:

Hi!

but i'v one Junit Test in a folder /src/test/java/ ...

when i try mvn test i'v this :

[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building checkstyle_retriever Maven Mojo
[INFO]    task-segment: [test]
[INFO]
------------------------------------------------------------------------
[INFO] [plugin:descriptor]
[INFO] Using 2 extractors.
[INFO] Applying extractor for language: java
[INFO] Extractor for language: java found 1 mojo descriptors.
[INFO] Applying extractor for language: bsh
[INFO] Extractor for language: bsh found 0 mojo descriptors.
[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
D:\projets\checkstyle_retriever\src\main\resources
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
D:\projets\checkstyle_retriever\src\test\resources
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report directory:
D:\projets\checkstyle_retriever\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

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

[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 11 seconds
[INFO] Finished at: Tue Jun 30 09:21:20 CEST 2009
[INFO] Final Memory: 10M/19M
[INFO]
------------------------------------------------------------------------

Maybe it found "Extractor for language: java found 1 mojo descriptors." ??


Freddy Mallet wrote:
>
> Hello Franck,
>
> According to the log, unit tests are not executed by the corbertura plugin
> :
>
> [INFO] [surefire:test]
> [INFO] Surefire report directory:
> D:\projets\checkstyle_retriever\target\surefire-reports
>
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> There are no tests to run.
>
> Results :
>
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>
> What do you get when you launch "mvn test" ?
> Thanks
> Freddy
>
> On Mon, Jun 29, 2009 at 9:36 AM, Franck Bassy
> <franck.bassy@...>wrote:
>
>>
>> i'v no specific configuration :
>>
>> mvn cobertura:cobertura give me :
>>
>> [INFO] Scanning for projects...
>> [INFO] Searching repository for plugin with prefix: 'cobertura'.
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building checkstyle_retriever Maven Mojo
>> [INFO]    task-segment: [cobertura:cobertura]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Preparing cobertura:cobertura
>> [INFO] [plugin:descriptor]
>> [INFO] Using 2 extractors.
>> [INFO] Applying extractor for language: java
>> [INFO] Extractor for language: java found 1 mojo descriptors.
>> [INFO] Applying extractor for language: bsh
>> [INFO] Extractor for language: bsh found 0 mojo descriptors.
>> [INFO] [resources:resources]
>> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> resources, i.e. build is platform dependent!
>> [INFO] skip non existing resourceDirectory
>> D:\projets\checkstyle_retriever\src\main\resources
>> [INFO] [compiler:compile]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [cobertura:instrument]
>> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
>> Cobertura: Loaded information on 4 classes.
>> Instrumenting 4 files to
>> D:\projets\checkstyle_retriever\target\generated-classes\cobertura
>> Cobertura: Saved information on 4 classes.
>> Instrument time: 328ms
>>
>> [INFO] Instrumentation was successful.
>> [INFO] [resources:testResources]
>> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> resources, i.e. build is platform dependent!
>> [INFO] skip non existing resourceDirectory
>> D:\projets\checkstyle_retriever\src\test\resources
>> [INFO] [compiler:testCompile]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [surefire:test]
>> [INFO] Surefire report directory:
>> D:\projets\checkstyle_retriever\target\surefire-reports
>>
>> -------------------------------------------------------
>>  T E S T S
>> -------------------------------------------------------
>> There are no tests to run.
>>
>> Results :
>>
>> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>>
>> [INFO] [cobertura:cobertura]
>> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
>> Cobertura: Loaded information on 4 classes.
>> [cobertura] INFO  [main]
>> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
>> source file during CCN computation, source=[com/trem/ch
>> eckstyle_retriever/GreetingMojo.java]
>> [cobertura] INFO  [main]
>> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
>> source file during CCN computation, source=[com/trem/ch
>> eckstyle_retriever/RetrieveFile.java]
>> Report time: 406ms
>>
>> [INFO] Cobertura Report generation was successful.
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESSFUL
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 13 seconds
>> [INFO] Finished at: Mon Jun 29 09:34:03 CEST 2009
>> [INFO] Final Memory: 12M/21M
>> [INFO]
>> ------------------------------------------------------------------------
>>
>>
>>
>> Freddy Mallet wrote:
>> >
>> > Hi Franck,
>> > Could you try to directly launch the command "mvn cobertura:cobertura"
>> ?
>> I
>> > guess you'll encounter the same issue as the cobertura plugin doesn't
>> seem
>> > to be able to retrieve the unit tests. Do you have any special
>> > configuration
>> > in your pom.xml file which can impact unit tests execution ?
>> >
>> > Cheers
>> > Freddy
>> >
>> > On Fri, Jun 26, 2009 at 4:46 PM, Franck Bassy
>> > <franck.bassy@...>wrote:
>> >
>> >>
>> >> Hi,
>> >>
>> >> i try to execute mvn sonar:sonar on a new maven plugin MOJO and i
>> don't
>> >> understand i'v no code coverage and he didn't find my units tests :x
>> >>
>> >> I need to specify some information in my pom ?
>> >>
>> >> thank for your answer
>> >>
>> >> there the stacktrace :
>> >>
>> >> [INFO] Scanning for projects...
>> >> [INFO] Searching repository for plugin with prefix: 'sonar'.
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] Building checkstyle_retriever Maven Mojo
>> >> [INFO]    task-segment: [sonar:sonar] (aggregator-style)
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] [sonar:sonar]
>> >> [INFO] Sonar host: http://w30414:9000
>> >> [INFO] Sonar version: 1.9.2
>> >> [INFO] [sonar-core:internal]
>> >> [INFO] Sonar JDBC URL:
>> >> jdbc:mysql://w30414:3306/sonar?useUnicode=true&characterEncoding=utf8
>> >> [INFO] Sonar JDBC login: root
>> >> [INFO] Sonar JDBC driver: com.mysql.jdbc.Driver
>> >> [INFO] Sonar branch:
>> >> [INFO] checkstyle_retriever Maven Mojo Getting Plugin Extensions...
>> >> [INFO] checkstyle_retriever Maven Mojo Selected quality profile :
>> Sonar
>> >> Test, language=java
>> >> [INFO] checkstyle_retriever Maven Mojo Executing
>> >> org.apache.maven.plugins:maven-pmd-plugin:[pmd]
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] Building checkstyle_retriever Maven Mojo
>> >> [INFO]    task-segment:
>> [org.apache.maven.plugins:maven-pmd-plugin::pmd]
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] [pmd:pmd]
>> >> [WARNING] File encoding has not been set, using platform encoding
>> Cp1252,
>> >> i.e. build is platform dependent!
>> >> [WARNING] Error while parsing
>> >>
>> >>
>> D:\projets\checkstyle_retriever\src\main\java\com\trem\checkstyle_retriever\RetrieveCheckstyleMojo.java:
>> >> Can't use annota
>> >> tions when running in JDK 1.4 mode!
>> >> [INFO] checkstyle_retriever Maven Mojo Executing
>> >> org.apache.maven.plugins:maven-checkstyle-plugin:[checkstyle]
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] Building checkstyle_retriever Maven Mojo
>> >> [INFO]    task-segment:
>> >> [org.apache.maven.plugins:maven-checkstyle-plugin::checkstyle]
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] Setting property: classpath.resource.loader.class =>
>> >> 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
>> >> [INFO] Setting property: velocimacro.messages.on => 'false'.
>> >> [INFO] Setting property: resource.loader => 'classpath'.
>> >> [INFO] Setting property: resource.manager.logwhenfound => 'false'.
>> >> [INFO] **************************************************************
>> >> [INFO] Starting Jakarta Velocity v1.4
>> >> [INFO] RuntimeInstance initializing.
>> >> [INFO] Default Properties File:
>> >> org\apache\velocity\runtime\defaults\velocity.properties
>> >> [INFO] Default ResourceManager initializing. (class
>> >> org.apache.velocity.runtime.resource.ResourceManagerImpl)
>> >> [INFO] Resource Loader Instantiated:
>> >> org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
>> >> [INFO] ClasspathResourceLoader : initialization starting.
>> >> [INFO] ClasspathResourceLoader : initialization complete.
>> >> [INFO] ResourceCache : initialized. (class
>> >> org.apache.velocity.runtime.resource.ResourceCacheImpl)
>> >> [INFO] Default ResourceManager initialization complete.
>> >> [INFO] Loaded System Directive:
>> >> org.apache.velocity.runtime.directive.Literal
>> >> [INFO] Loaded System Directive:
>> >> org.apache.velocity.runtime.directive.Macro
>> >> [INFO] Loaded System Directive:
>> >> org.apache.velocity.runtime.directive.Parse
>> >> [INFO] Loaded System Directive:
>> >> org.apache.velocity.runtime.directive.Include
>> >> [INFO] Loaded System Directive:
>> >> org.apache.velocity.runtime.directive.Foreach
>> >> [INFO] Created: 20 parsers.
>> >> [INFO] Velocimacro : initialization starting.
>> >> [INFO] Velocimacro : adding VMs from VM library template :
>> >> VM_global_library.vm
>> >> [ERROR] ResourceManager : unable to find resource
>> 'VM_global_library.vm'
>> >> in
>> >> any resource loader.
>> >> [INFO] Velocimacro : error using  VM library template
>> >> VM_global_library.vm
>> >> :
>> >> org.apache.velocity.exception.ResourceNotFoundException: Unable to
>> find
>> r
>> >> esource 'VM_global_library.vm'
>> >> [INFO] Velocimacro :  VM library template macro registration complete.
>> >> [INFO] Velocimacro : allowInline = true : VMs can be defined inline in
>> >> templates
>> >> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined
>> inline
>> >> may
>> >> NOT replace previous VM definitions
>> >> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline
>> will
>> >> be
>> >> global in scope if allowed.
>> >> [INFO] Velocimacro : initialization complete.
>> >> [INFO] Velocity successfully started.
>> >> [INFO] [checkstyle:checkstyle]
>> >> [WARNING] File encoding has not been set, using platform encoding
>> Cp1252,
>> >> i.e. build is platform dependent!
>> >> [INFO] checkstyle_retriever Maven Mojo Executing
>> >> org.codehaus.mojo:taglist-maven-plugin:[taglist]
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] Building checkstyle_retriever Maven Mojo
>> >> [INFO]    task-segment:
>> [org.codehaus.mojo:taglist-maven-plugin::taglist]
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] [taglist:taglist]
>> >> [INFO] checkstyle_retriever Maven Mojo Executing
>> >> org.codehaus.mojo:cobertura-maven-plugin:[cobertura]
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] Building checkstyle_retriever Maven Mojo
>> >> [INFO]    task-segment:
>> >> [org.codehaus.mojo:cobertura-maven-plugin::cobertura]
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] Preparing cobertura:cobertura
>> >> [INFO] [plugin:descriptor]
>> >> [INFO] Using 2 extractors.
>> >> [INFO] Applying extractor for language: java
>> >> [INFO] Extractor for language: java found 1 mojo descriptors.
>> >> [INFO] Applying extractor for language: bsh
>> >> [INFO] Extractor for language: bsh found 0 mojo descriptors.
>> >> [INFO] [resources:resources]
>> >> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> >> resources, i.e. build is platform dependent!
>> >> [INFO] skip non existing resourceDirectory
>> >> D:\projets\checkstyle_retriever\src\main\resources
>> >> [INFO] [compiler:compile]
>> >> [INFO] Nothing to compile - all classes are up to date
>> >> [INFO] [cobertura:instrument]
>> >> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT
>> file
>> >> Cobertura: Loaded information on 4 classes.
>> >> Instrumenting 4 files to
>> >> D:\projets\checkstyle_retriever\target\generated-classes\cobertura
>> >> Cobertura: Saved information on 4 classes.
>> >> Instrument time: 281ms
>> >>
>> >> [INFO] Instrumentation was successful.
>> >> [INFO] [resources:testResources]
>> >> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> >> resources, i.e. build is platform dependent!
>> >> [INFO] skip non existing resourceDirectory
>> >> D:\projets\checkstyle_retriever\src\test\resources
>> >> [INFO] [compiler:testCompile]
>> >> [INFO] Nothing to compile - all classes are up to date
>> >> [INFO] [surefire:test]
>> >> [INFO] Surefire report directory:
>> >> D:\projets\checkstyle_retriever\target\surefire-reports
>> >>
>> >> -------------------------------------------------------
>> >>  T E S T S
>> >> -------------------------------------------------------
>> >> There are no tests to run.
>> >>
>> >> Results :
>> >>
>> >> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>> >>
>> >> [INFO] [cobertura:cobertura]
>> >> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT
>> file
>> >> Cobertura: Loaded information on 4 classes.
>> >> [cobertura] INFO  [main]
>> >> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
>> >> source file during CCN computation, source=[com/trem/ch
>> >> eckstyle_retriever/GreetingMojo.java]
>> >> [cobertura] INFO  [main]
>> >> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
>> >> source file during CCN computation, source=[com/trem/ch
>> >> eckstyle_retriever/RetrieveFile.java]
>> >> Report time: 313ms
>> >>
>> >> [INFO] Cobertura Report generation was successful.
>> >> [INFO] checkstyle_retriever Maven Mojo Executing
>> >> org.apache.maven.plugins:maven-surefire-plugin:[]
>> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> org.sonar.plugins.pmd.PmdMavenCollector] executing
>> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> org.sonar.plugins.isoqa.JDependMavenCollector] executing
>> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> org.sonar.plugins.isoqa.CkjmMavenCollector] executing
>> >> java.lang.ClassNotFoundException: Exception while looking for class
>> >> org.apache.maven.plugin.AbstractMojo: java.io.IOException: Couldn't
>> find:
>> >> org.apac
>> >> he.maven.plugin.AbstractMojo.class
>> >> java.lang.ClassNotFoundException: Exception while looking for class
>> >> junit.framework.TestCase: java.io.IOException: Couldn't find:
>> >> junit.framework.Test
>> >> Case.class
>> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> org.sonar.plugins.squid.SquidMavenCollector] executing
>> >> [INFO] checkstyle_retriever Maven Mojo Starting audit...
>> >> [INFO] checkstyle_retriever Maven Mojo Audit done.
>> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> org.sonar.plugins.core.SaveProfileMavenCollector] executing
>> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> org.sonar.plugins.core.sources.ImportJavaSourcesMavenCollector]
>> executing
>> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> org.sonar.plugins.core.SaveProjectLinksFromPom] executing
>> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> org.sonar.plugins.checkstyle.CheckstyleMavenCollector] executing
>> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> org.sonar.plugins.cpd.CpdMavenCollector] executing
>> >> [INFO] checkstyle_retriever Maven Mojo Collecting duplications...
>> >> [INFO] checkstyle_retriever Maven Mojo File suffixes : java
>> >> [INFO] checkstyle_retriever Maven Mojo Exclusions : {}
>> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> org.sonar.plugins.taglist.TaglistMavenCollector] executing
>> >> [INFO] checkstyle_retriever Maven Mojo Parsing
>> >> D:\projets\checkstyle_retriever\target\taglist\taglist.xml
>> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> org.sonar.plugins.cobertura.CoberturaMavenCollector] executing
>> >> [INFO] checkstyle_retriever Maven Mojo parsing
>> >> D:\projets\checkstyle_retriever\target\site\cobertura\coverage.xml
>> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> org.sonar.plugins.surefire.SurefireMavenCollector] executing
>> >> [INFO] checkstyle_retriever Maven Mojo parsing
>> >> D:\projets\checkstyle_retriever\target\surefire-reports
>> >> [INFO]  Trigger server
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] BUILD SUCCESSFUL
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] Total time: 39 seconds
>> >> [INFO] Finished at: Fri Jun 26 16:40:59 CEST 2009
>> >> [INFO] Final Memory: 25M/45M
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24221614.html
>> >> Sent from the Sonar user mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe from this list, please visit:
>> >>
>> >>    http://xircles.codehaus.org/manage_email
>> >>
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24249654.html
>> Sent from the Sonar user mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>

--
View this message in context: http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24267332.html
Sent from the Sonar user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Simulation/branch mode

by Niels B Nielsen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi there,

 

First of all thanks for putting the effort into producing such a product. I feel tempted to contribute if I did have sufficient time and need for it.

 

However, two quick questions.

 

1) How well does Sonar handle branch of the same product. So far I haven't experimented much, but it seems to only recognize groupId+artifactId as the project identifier. That must make it hard to measure quality on trunk and branches, for those of us who use both at the same time.

 

2) Simulation mode

 

I was thinking. We sometimes want to identify if certain changes would improve or not the overall quality of the build before we check it in. The reasoning is, that often when the project is checked in, developers focus on the next task ahead. If we had the ability to show potential impact, it would be easier for the developer to go the last mile. Especially when we want to encourage a peer review development model.

 

Is there anyway a measure could be not committed in the DB, but a diff created in any way? I assume the answer is no, but a bit more elaborated :-)

 

Regards,

/Niels


This email is confidential and subject to important disclaimers and conditions including on offers for the purchase or sale of securities, accuracy and completeness of information, viruses, confidentiality, legal privilege, and legal entity disclaimers, available at http://www.jpmorgan.com/pages/disclosures/email.


Re: Simulation/branch mode

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Niels,

1) How well does Sonar handle branch of the same product. So far I haven't experimented much, but it seems to only recognize groupId+artifactId as the project identifier. That must make it hard to measure quality on trunk and branches, for those of us who use both at the same time.


The parameter -Dbranch=name_of_your_branch is certainly what you're looking for. With this parameter two projects with the same groupId+artifactId are considered as different by Sonar.

 

 2) Simulation mode

 I was thinking. We sometimes want to identify if certain changes would improve or not the overall quality of the build before we check it in. The reasoning is, that often when the project is checked in, developers focus on the next task ahead. If we had the ability to show potential impact, it would be easier for the developer to go the last mile. Especially when we want to encourage a peer review development model.

 Is there anyway a measure could be not committed in the DB, but a diff created in any way? I assume the answer is no, but a bit more elaborated :-)

My following point of view is totally biased by my agile sensibility :-) :

A good developer should be able to split his work in very elementary baby steps and should commit his changes as soon as a baby step has been done, that is to say each 4, 2 or even 1 hours. By the way, the commit frequency will be  one day a metric available in Sonar. This continuous development flow should not be broken or even perturbed for any reasons. The developer must compile and execute unit tests before committing anything but asking him/her to launch locally a Sonar quality analysis is a kind of perturbation.

On the other side, if the developer is starting a big refactoring and doesn't want to alter the stability of the trunk, he/she must work on a branch and the first solution works (using the branch parameter).

It's why we are more willing to better show and trac what have changed in the near past (http://jira.codehaus.org/browse/SONAR-249) than offering a way to launch Sonar on the developer desktop (even if this is quite easy with the use of the default embedded DB).

Regards
Freddy


Re: erro with Maven plugin MOJO

by Franck Bassy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

it work when i use mvn sonar:sonar -Dtest=RetrieveFile.java

i need to specify my Junit test...

thanks


Freddy Mallet wrote:
Hi Franck,
Once your junit test will be executed when "mvn test" is launched, Sonar
will work :-)

Freddy

On Tue, Jun 30, 2009 at 9:24 AM, Franck Bassy
<franck.bassy@atosorigin.com>wrote:

>
> Hi!
>
> but i'v one Junit Test in a folder /src/test/java/ ...
>
> when i try mvn test i'v this :
>
> [INFO] Scanning for projects...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building checkstyle_retriever Maven Mojo
> [INFO]    task-segment: [test]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [plugin:descriptor]
> [INFO] Using 2 extractors.
> [INFO] Applying extractor for language: java
> [INFO] Extractor for language: java found 1 mojo descriptors.
> [INFO] Applying extractor for language: bsh
> [INFO] Extractor for language: bsh found 0 mojo descriptors.
> [INFO] [resources:resources]
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory
> D:\projets\checkstyle_retriever\src\main\resources
> [INFO] [compiler:compile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [resources:testResources]
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory
> D:\projets\checkstyle_retriever\src\test\resources
> [INFO] [compiler:testCompile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [surefire:test]
> [INFO] Surefire report directory:
> D:\projets\checkstyle_retriever\target\surefire-reports
>
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> There are no tests to run.
>
> Results :
>
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 11 seconds
> [INFO] Finished at: Tue Jun 30 09:21:20 CEST 2009
> [INFO] Final Memory: 10M/19M
> [INFO]
> ------------------------------------------------------------------------
>
> Maybe it found "Extractor for language: java found 1 mojo descriptors." ??
>
>
> Freddy Mallet wrote:
> >
> > Hello Franck,
> >
> > According to the log, unit tests are not executed by the corbertura
> plugin
> > :
> >
> > [INFO] [surefire:test]
> > [INFO] Surefire report directory:
> > D:\projets\checkstyle_retriever\target\surefire-reports
> >
> > -------------------------------------------------------
> >  T E S T S
> > -------------------------------------------------------
> > There are no tests to run.
> >
> > Results :
> >
> > Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> >
> > What do you get when you launch "mvn test" ?
> > Thanks
> > Freddy
> >
> > On Mon, Jun 29, 2009 at 9:36 AM, Franck Bassy
> > <franck.bassy@atosorigin.com>wrote:
> >
> >>
> >> i'v no specific configuration :
> >>
> >> mvn cobertura:cobertura give me :
> >>
> >> [INFO] Scanning for projects...
> >> [INFO] Searching repository for plugin with prefix: 'cobertura'.
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> [INFO]    task-segment: [cobertura:cobertura]
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] Preparing cobertura:cobertura
> >> [INFO] [plugin:descriptor]
> >> [INFO] Using 2 extractors.
> >> [INFO] Applying extractor for language: java
> >> [INFO] Extractor for language: java found 1 mojo descriptors.
> >> [INFO] Applying extractor for language: bsh
> >> [INFO] Extractor for language: bsh found 0 mojo descriptors.
> >> [INFO] [resources:resources]
> >> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> >> resources, i.e. build is platform dependent!
> >> [INFO] skip non existing resourceDirectory
> >> D:\projets\checkstyle_retriever\src\main\resources
> >> [INFO] [compiler:compile]
> >> [INFO] Nothing to compile - all classes are up to date
> >> [INFO] [cobertura:instrument]
> >> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT
> file
> >> Cobertura: Loaded information on 4 classes.
> >> Instrumenting 4 files to
> >> D:\projets\checkstyle_retriever\target\generated-classes\cobertura
> >> Cobertura: Saved information on 4 classes.
> >> Instrument time: 328ms
> >>
> >> [INFO] Instrumentation was successful.
> >> [INFO] [resources:testResources]
> >> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> >> resources, i.e. build is platform dependent!
> >> [INFO] skip non existing resourceDirectory
> >> D:\projets\checkstyle_retriever\src\test\resources
> >> [INFO] [compiler:testCompile]
> >> [INFO] Nothing to compile - all classes are up to date
> >> [INFO] [surefire:test]
> >> [INFO] Surefire report directory:
> >> D:\projets\checkstyle_retriever\target\surefire-reports
> >>
> >> -------------------------------------------------------
> >>  T E S T S
> >> -------------------------------------------------------
> >> There are no tests to run.
> >>
> >> Results :
> >>
> >> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> >>
> >> [INFO] [cobertura:cobertura]
> >> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT
> file
> >> Cobertura: Loaded information on 4 classes.
> >> [cobertura] INFO  [main]
> >> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
> >> source file during CCN computation, source=[com/trem/ch
> >> eckstyle_retriever/GreetingMojo.java]
> >> [cobertura] INFO  [main]
> >> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
> >> source file during CCN computation, source=[com/trem/ch
> >> eckstyle_retriever/RetrieveFile.java]
> >> Report time: 406ms
> >>
> >> [INFO] Cobertura Report generation was successful.
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] BUILD SUCCESSFUL
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] Total time: 13 seconds
> >> [INFO] Finished at: Mon Jun 29 09:34:03 CEST 2009
> >> [INFO] Final Memory: 12M/21M
> >> [INFO]
> >> ------------------------------------------------------------------------
> >>
> >>
> >>
> >> Freddy Mallet wrote:
> >> >
> >> > Hi Franck,
> >> > Could you try to directly launch the command "mvn cobertura:cobertura"
> >> ?
> >> I
> >> > guess you'll encounter the same issue as the cobertura plugin doesn't
> >> seem
> >> > to be able to retrieve the unit tests. Do you have any special
> >> > configuration
> >> > in your pom.xml file which can impact unit tests execution ?
> >> >
> >> > Cheers
> >> > Freddy
> >> >
> >> > On Fri, Jun 26, 2009 at 4:46 PM, Franck Bassy
> >> > <franck.bassy@atosorigin.com>wrote:
> >> >
> >> >>
> >> >> Hi,
> >> >>
> >> >> i try to execute mvn sonar:sonar on a new maven plugin MOJO and i
> >> don't
> >> >> understand i'v no code coverage and he didn't find my units tests :x
> >> >>
> >> >> I need to specify some information in my pom ?
> >> >>
> >> >> thank for your answer
> >> >>
> >> >> there the stacktrace :
> >> >>
> >> >> [INFO] Scanning for projects...
> >> >> [INFO] Searching repository for plugin with prefix: 'sonar'.
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> >> [INFO]    task-segment: [sonar:sonar] (aggregator-style)
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >> [INFO] [sonar:sonar]
> >> >> [INFO] Sonar host: http://w30414:9000
> >> >> [INFO] Sonar version: 1.9.2
> >> >> [INFO] [sonar-core:internal]
> >> >> [INFO] Sonar JDBC URL:
> >> >> jdbc:mysql://w30414:3306/sonar?useUnicode=true&characterEncoding=utf8
> >> >> [INFO] Sonar JDBC login: root
> >> >> [INFO] Sonar JDBC driver: com.mysql.jdbc.Driver
> >> >> [INFO] Sonar branch:
> >> >> [INFO] checkstyle_retriever Maven Mojo Getting Plugin Extensions...
> >> >> [INFO] checkstyle_retriever Maven Mojo Selected quality profile :
> >> Sonar
> >> >> Test, language=java
> >> >> [INFO] checkstyle_retriever Maven Mojo Executing
> >> >> org.apache.maven.plugins:maven-pmd-plugin:[pmd]
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> >> [INFO]    task-segment:
> >> [org.apache.maven.plugins:maven-pmd-plugin::pmd]
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >> [INFO] [pmd:pmd]
> >> >> [WARNING] File encoding has not been set, using platform encoding
> >> Cp1252,
> >> >> i.e. build is platform dependent!
> >> >> [WARNING] Error while parsing
> >> >>
> >> >>
> >>
> D:\projets\checkstyle_retriever\src\main\java\com\trem\checkstyle_retriever\RetrieveCheckstyleMojo.java:
> >> >> Can't use annota
> >> >> tions when running in JDK 1.4 mode!
> >> >> [INFO] checkstyle_retriever Maven Mojo Executing
> >> >> org.apache.maven.plugins:maven-checkstyle-plugin:[checkstyle]
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> >> [INFO]    task-segment:
> >> >> [org.apache.maven.plugins:maven-checkstyle-plugin::checkstyle]
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >> [INFO] Setting property: classpath.resource.loader.class =>
> >> >> 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
> >> >> [INFO] Setting property: velocimacro.messages.on => 'false'.
> >> >> [INFO] Setting property: resource.loader => 'classpath'.
> >> >> [INFO] Setting property: resource.manager.logwhenfound => 'false'.
> >> >> [INFO] **************************************************************
> >> >> [INFO] Starting Jakarta Velocity v1.4
> >> >> [INFO] RuntimeInstance initializing.
> >> >> [INFO] Default Properties File:
> >> >> org\apache\velocity\runtime\defaults\velocity.properties
> >> >> [INFO] Default ResourceManager initializing. (class
> >> >> org.apache.velocity.runtime.resource.ResourceManagerImpl)
> >> >> [INFO] Resource Loader Instantiated:
> >> >> org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
> >> >> [INFO] ClasspathResourceLoader : initialization starting.
> >> >> [INFO] ClasspathResourceLoader : initialization complete.
> >> >> [INFO] ResourceCache : initialized. (class
> >> >> org.apache.velocity.runtime.resource.ResourceCacheImpl)
> >> >> [INFO] Default ResourceManager initialization complete.
> >> >> [INFO] Loaded System Directive:
> >> >> org.apache.velocity.runtime.directive.Literal
> >> >> [INFO] Loaded System Directive:
> >> >> org.apache.velocity.runtime.directive.Macro
> >> >> [INFO] Loaded System Directive:
> >> >> org.apache.velocity.runtime.directive.Parse
> >> >> [INFO] Loaded System Directive:
> >> >> org.apache.velocity.runtime.directive.Include
> >> >> [INFO] Loaded System Directive:
> >> >> org.apache.velocity.runtime.directive.Foreach
> >> >> [INFO] Created: 20 parsers.
> >> >> [INFO] Velocimacro : initialization starting.
> >> >> [INFO] Velocimacro : adding VMs from VM library template :
> >> >> VM_global_library.vm
> >> >> [ERROR] ResourceManager : unable to find resource
> >> 'VM_global_library.vm'
> >> >> in
> >> >> any resource loader.
> >> >> [INFO] Velocimacro : error using  VM library template
> >> >> VM_global_library.vm
> >> >> :
> >> >> org.apache.velocity.exception.ResourceNotFoundException: Unable to
> >> find
> >> r
> >> >> esource 'VM_global_library.vm'
> >> >> [INFO] Velocimacro :  VM library template macro registration
> complete.
> >> >> [INFO] Velocimacro : allowInline = true : VMs can be defined inline
> in
> >> >> templates
> >> >> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined
> >> inline
> >> >> may
> >> >> NOT replace previous VM definitions
> >> >> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline
> >> will
> >> >> be
> >> >> global in scope if allowed.
> >> >> [INFO] Velocimacro : initialization complete.
> >> >> [INFO] Velocity successfully started.
> >> >> [INFO] [checkstyle:checkstyle]
> >> >> [WARNING] File encoding has not been set, using platform encoding
> >> Cp1252,
> >> >> i.e. build is platform dependent!
> >> >> [INFO] checkstyle_retriever Maven Mojo Executing
> >> >> org.codehaus.mojo:taglist-maven-plugin:[taglist]
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> >> [INFO]    task-segment:
> >> [org.codehaus.mojo:taglist-maven-plugin::taglist]
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >> [INFO] [taglist:taglist]
> >> >> [INFO] checkstyle_retriever Maven Mojo Executing
> >> >> org.codehaus.mojo:cobertura-maven-plugin:[cobertura]
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> >> [INFO]    task-segment:
> >> >> [org.codehaus.mojo:cobertura-maven-plugin::cobertura]
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >> [INFO] Preparing cobertura:cobertura
> >> >> [INFO] [plugin:descriptor]
> >> >> [INFO] Using 2 extractors.
> >> >> [INFO] Applying extractor for language: java
> >> >> [INFO] Extractor for language: java found 1 mojo descriptors.
> >> >> [INFO] Applying extractor for language: bsh
> >> >> [INFO] Extractor for language: bsh found 0 mojo descriptors.
> >> >> [INFO] [resources:resources]
> >> >> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> >> >> resources, i.e. build is platform dependent!
> >> >> [INFO] skip non existing resourceDirectory
> >> >> D:\projets\checkstyle_retriever\src\main\resources
> >> >> [INFO] [compiler:compile]
> >> >> [INFO] Nothing to compile - all classes are up to date
> >> >> [INFO] [cobertura:instrument]
> >> >> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT
> >> file
> >> >> Cobertura: Loaded information on 4 classes.
> >> >> Instrumenting 4 files to
> >> >> D:\projets\checkstyle_retriever\target\generated-classes\cobertura
> >> >> Cobertura: Saved information on 4 classes.
> >> >> Instrument time: 281ms
> >> >>
> >> >> [INFO] Instrumentation was successful.
> >> >> [INFO] [resources:testResources]
> >> >> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> >> >> resources, i.e. build is platform dependent!
> >> >> [INFO] skip non existing resourceDirectory
> >> >> D:\projets\checkstyle_retriever\src\test\resources
> >> >> [INFO] [compiler:testCompile]
> >> >> [INFO] Nothing to compile - all classes are up to date
> >> >> [INFO] [surefire:test]
> >> >> [INFO] Surefire report directory:
> >> >> D:\projets\checkstyle_retriever\target\surefire-reports
> >> >>
> >> >> -------------------------------------------------------
> >> >>  T E S T S
> >> >> -------------------------------------------------------
> >> >> There are no tests to run.
> >> >>
> >> >> Results :
> >> >>
> >> >> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> >> >>
> >> >> [INFO] [cobertura:cobertura]
> >> >> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT
> >> file
> >> >> Cobertura: Loaded information on 4 classes.
> >> >> [cobertura] INFO  [main]
> >> >> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot
> find
> >> >> source file during CCN computation, source=[com/trem/ch
> >> >> eckstyle_retriever/GreetingMojo.java]
> >> >> [cobertura] INFO  [main]
> >> >> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot
> find
> >> >> source file during CCN computation, source=[com/trem/ch
> >> >> eckstyle_retriever/RetrieveFile.java]
> >> >> Report time: 313ms
> >> >>
> >> >> [INFO] Cobertura Report generation was successful.
> >> >> [INFO] checkstyle_retriever Maven Mojo Executing
> >> >> org.apache.maven.plugins:maven-surefire-plugin:[]
> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> org.sonar.plugins.pmd.PmdMavenCollector] executing
> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> org.sonar.plugins.isoqa.JDependMavenCollector] executing
> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> org.sonar.plugins.isoqa.CkjmMavenCollector] executing
> >> >> java.lang.ClassNotFoundException: Exception while looking for class
> >> >> org.apache.maven.plugin.AbstractMojo: java.io.IOException: Couldn't
> >> find:
> >> >> org.apac
> >> >> he.maven.plugin.AbstractMojo.class
> >> >> java.lang.ClassNotFoundException: Exception while looking for class
> >> >> junit.framework.TestCase: java.io.IOException: Couldn't find:
> >> >> junit.framework.Test
> >> >> Case.class
> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> org.sonar.plugins.squid.SquidMavenCollector] executing
> >> >> [INFO] checkstyle_retriever Maven Mojo Starting audit...
> >> >> [INFO] checkstyle_retriever Maven Mojo Audit done.
> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> org.sonar.plugins.core.SaveProfileMavenCollector] executing
> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> org.sonar.plugins.core.sources.ImportJavaSourcesMavenCollector]
> >> executing
> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> org.sonar.plugins.core.SaveProjectLinksFromPom] executing
> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> org.sonar.plugins.checkstyle.CheckstyleMavenCollector] executing
> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> org.sonar.plugins.cpd.CpdMavenCollector] executing
> >> >> [INFO] checkstyle_retriever Maven Mojo Collecting duplications...
> >> >> [INFO] checkstyle_retriever Maven Mojo File suffixes : java
> >> >> [INFO] checkstyle_retriever Maven Mojo Exclusions : {}
> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> org.sonar.plugins.taglist.TaglistMavenCollector] executing
> >> >> [INFO] checkstyle_retriever Maven Mojo Parsing
> >> >> D:\projets\checkstyle_retriever\target\taglist\taglist.xml
> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> org.sonar.plugins.cobertura.CoberturaMavenCollector] executing
> >> >> [INFO] checkstyle_retriever Maven Mojo parsing
> >> >> D:\projets\checkstyle_retriever\target\site\cobertura\coverage.xml
> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> org.sonar.plugins.surefire.SurefireMavenCollector] executing
> >> >> [INFO] checkstyle_retriever Maven Mojo parsing
> >> >> D:\projets\checkstyle_retriever\target\surefire-reports
> >> >> [INFO]  Trigger server
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >> [INFO] BUILD SUCCESSFUL
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >> [INFO] Total time: 39 seconds
> >> >> [INFO] Finished at: Fri Jun 26 16:40:59 CEST 2009
> >> >> [INFO] Final Memory: 25M/45M
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24221614.html
> >> >> Sent from the Sonar user mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe from this list, please visit:
> >> >>
> >> >>    http://xircles.codehaus.org/manage_email
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24249654.html
> >> Sent from the Sonar user mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list, please visit:
> >>
> >>    http://xircles.codehaus.org/manage_email
> >>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24267332.html
> Sent from the Sonar user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

Re: erro with Maven plugin MOJO

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Franck,

Rename RetrieveFile.java in RetriveFileTest.java, this is a standard Maven convention !

Freddy


On Wed, Jul 1, 2009 at 3:40 PM, Franck Bassy <franck.bassy@...> wrote:

Hi,

it work when i use mvn sonar:sonar -Dtest=RetrieveFile.java

i need to specify my Junit test...

thanks



Freddy Mallet wrote:
>
> Hi Franck,
> Once your junit test will be executed when "mvn test" is launched, Sonar
> will work :-)
>
> Freddy
>
> On Tue, Jun 30, 2009 at 9:24 AM, Franck Bassy
> <franck.bassy@...>wrote:
>
>>
>> Hi!
>>
>> but i'v one Junit Test in a folder /src/test/java/ ...
>>
>> when i try mvn test i'v this :
>>
>> [INFO] Scanning for projects...
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building checkstyle_retriever Maven Mojo
>> [INFO]    task-segment: [test]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] [plugin:descriptor]
>> [INFO] Using 2 extractors.
>> [INFO] Applying extractor for language: java
>> [INFO] Extractor for language: java found 1 mojo descriptors.
>> [INFO] Applying extractor for language: bsh
>> [INFO] Extractor for language: bsh found 0 mojo descriptors.
>> [INFO] [resources:resources]
>> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> resources, i.e. build is platform dependent!
>> [INFO] skip non existing resourceDirectory
>> D:\projets\checkstyle_retriever\src\main\resources
>> [INFO] [compiler:compile]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [resources:testResources]
>> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> resources, i.e. build is platform dependent!
>> [INFO] skip non existing resourceDirectory
>> D:\projets\checkstyle_retriever\src\test\resources
>> [INFO] [compiler:testCompile]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [surefire:test]
>> [INFO] Surefire report directory:
>> D:\projets\checkstyle_retriever\target\surefire-reports
>>
>> -------------------------------------------------------
>>  T E S T S
>> -------------------------------------------------------
>> There are no tests to run.
>>
>> Results :
>>
>> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESSFUL
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 11 seconds
>> [INFO] Finished at: Tue Jun 30 09:21:20 CEST 2009
>> [INFO] Final Memory: 10M/19M
>> [INFO]
>> ------------------------------------------------------------------------
>>
>> Maybe it found "Extractor for language: java found 1 mojo descriptors."
>> ??
>>
>>
>> Freddy Mallet wrote:
>> >
>> > Hello Franck,
>> >
>> > According to the log, unit tests are not executed by the corbertura
>> plugin
>> > :
>> >
>> > [INFO] [surefire:test]
>> > [INFO] Surefire report directory:
>> > D:\projets\checkstyle_retriever\target\surefire-reports
>> >
>> > -------------------------------------------------------
>> >  T E S T S
>> > -------------------------------------------------------
>> > There are no tests to run.
>> >
>> > Results :
>> >
>> > Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>> >
>> > What do you get when you launch "mvn test" ?
>> > Thanks
>> > Freddy
>> >
>> > On Mon, Jun 29, 2009 at 9:36 AM, Franck Bassy
>> > <franck.bassy@...>wrote:
>> >
>> >>
>> >> i'v no specific configuration :
>> >>
>> >> mvn cobertura:cobertura give me :
>> >>
>> >> [INFO] Scanning for projects...
>> >> [INFO] Searching repository for plugin with prefix: 'cobertura'.
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] Building checkstyle_retriever Maven Mojo
>> >> [INFO]    task-segment: [cobertura:cobertura]
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] Preparing cobertura:cobertura
>> >> [INFO] [plugin:descriptor]
>> >> [INFO] Using 2 extractors.
>> >> [INFO] Applying extractor for language: java
>> >> [INFO] Extractor for language: java found 1 mojo descriptors.
>> >> [INFO] Applying extractor for language: bsh
>> >> [INFO] Extractor for language: bsh found 0 mojo descriptors.
>> >> [INFO] [resources:resources]
>> >> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> >> resources, i.e. build is platform dependent!
>> >> [INFO] skip non existing resourceDirectory
>> >> D:\projets\checkstyle_retriever\src\main\resources
>> >> [INFO] [compiler:compile]
>> >> [INFO] Nothing to compile - all classes are up to date
>> >> [INFO] [cobertura:instrument]
>> >> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT
>> file
>> >> Cobertura: Loaded information on 4 classes.
>> >> Instrumenting 4 files to
>> >> D:\projets\checkstyle_retriever\target\generated-classes\cobertura
>> >> Cobertura: Saved information on 4 classes.
>> >> Instrument time: 328ms
>> >>
>> >> [INFO] Instrumentation was successful.
>> >> [INFO] [resources:testResources]
>> >> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> >> resources, i.e. build is platform dependent!
>> >> [INFO] skip non existing resourceDirectory
>> >> D:\projets\checkstyle_retriever\src\test\resources
>> >> [INFO] [compiler:testCompile]
>> >> [INFO] Nothing to compile - all classes are up to date
>> >> [INFO] [surefire:test]
>> >> [INFO] Surefire report directory:
>> >> D:\projets\checkstyle_retriever\target\surefire-reports
>> >>
>> >> -------------------------------------------------------
>> >>  T E S T S
>> >> -------------------------------------------------------
>> >> There are no tests to run.
>> >>
>> >> Results :
>> >>
>> >> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>> >>
>> >> [INFO] [cobertura:cobertura]
>> >> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT
>> file
>> >> Cobertura: Loaded information on 4 classes.
>> >> [cobertura] INFO  [main]
>> >> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
>> >> source file during CCN computation, source=[com/trem/ch
>> >> eckstyle_retriever/GreetingMojo.java]
>> >> [cobertura] INFO  [main]
>> >> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot find
>> >> source file during CCN computation, source=[com/trem/ch
>> >> eckstyle_retriever/RetrieveFile.java]
>> >> Report time: 406ms
>> >>
>> >> [INFO] Cobertura Report generation was successful.
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] BUILD SUCCESSFUL
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] Total time: 13 seconds
>> >> [INFO] Finished at: Mon Jun 29 09:34:03 CEST 2009
>> >> [INFO] Final Memory: 12M/21M
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >>
>> >>
>> >>
>> >> Freddy Mallet wrote:
>> >> >
>> >> > Hi Franck,
>> >> > Could you try to directly launch the command "mvn
>> cobertura:cobertura"
>> >> ?
>> >> I
>> >> > guess you'll encounter the same issue as the cobertura plugin
>> doesn't
>> >> seem
>> >> > to be able to retrieve the unit tests. Do you have any special
>> >> > configuration
>> >> > in your pom.xml file which can impact unit tests execution ?
>> >> >
>> >> > Cheers
>> >> > Freddy
>> >> >
>> >> > On Fri, Jun 26, 2009 at 4:46 PM, Franck Bassy
>> >> > <franck.bassy@...>wrote:
>> >> >
>> >> >>
>> >> >> Hi,
>> >> >>
>> >> >> i try to execute mvn sonar:sonar on a new maven plugin MOJO and i
>> >> don't
>> >> >> understand i'v no code coverage and he didn't find my units tests
>> :x
>> >> >>
>> >> >> I need to specify some information in my pom ?
>> >> >>
>> >> >> thank for your answer
>> >> >>
>> >> >> there the stacktrace :
>> >> >>
>> >> >> [INFO] Scanning for projects...
>> >> >> [INFO] Searching repository for plugin with prefix: 'sonar'.
>> >> >> [INFO]
>> >> >>
>> >>
>> ------------------------------------------------------------------------
>> >> >> [INFO] Building checkstyle_retriever Maven Mojo
>> >> >> [INFO]    task-segment: [sonar:sonar] (aggregator-style)
>> >> >> [INFO]
>> >> >>
>> >>
>> ------------------------------------------------------------------------
>> >> >> [INFO] [sonar:sonar]
>> >> >> [INFO] Sonar host: http://w30414:9000
>> >> >> [INFO] Sonar version: 1.9.2
>> >> >> [INFO] [sonar-core:internal]
>> >> >> [INFO] Sonar JDBC URL:
>> >> >>
>> jdbc:mysql://w30414:3306/sonar?useUnicode=true&characterEncoding=utf8
>> >> >> [INFO] Sonar JDBC login: root
>> >> >> [INFO] Sonar JDBC driver: com.mysql.jdbc.Driver
>> >> >> [INFO] Sonar branch:
>> >> >> [INFO] checkstyle_retriever Maven Mojo Getting Plugin Extensions...
>> >> >> [INFO] checkstyle_retriever Maven Mojo Selected quality profile :
>> >> Sonar
>> >> >> Test, language=java
>> >> >> [INFO] checkstyle_retriever Maven Mojo Executing
>> >> >> org.apache.maven.plugins:maven-pmd-plugin:[pmd]
>> >> >> [INFO]
>> >> >>
>> >>
>> ------------------------------------------------------------------------
>> >> >> [INFO] Building checkstyle_retriever Maven Mojo
>> >> >> [INFO]    task-segment:
>> >> [org.apache.maven.plugins:maven-pmd-plugin::pmd]
>> >> >> [INFO]
>> >> >>
>> >>
>> ------------------------------------------------------------------------
>> >> >> [INFO] [pmd:pmd]
>> >> >> [WARNING] File encoding has not been set, using platform encoding
>> >> Cp1252,
>> >> >> i.e. build is platform dependent!
>> >> >> [WARNING] Error while parsing
>> >> >>
>> >> >>
>> >>
>> D:\projets\checkstyle_retriever\src\main\java\com\trem\checkstyle_retriever\RetrieveCheckstyleMojo.java:
>> >> >> Can't use annota
>> >> >> tions when running in JDK 1.4 mode!
>> >> >> [INFO] checkstyle_retriever Maven Mojo Executing
>> >> >> org.apache.maven.plugins:maven-checkstyle-plugin:[checkstyle]
>> >> >> [INFO]
>> >> >>
>> >>
>> ------------------------------------------------------------------------
>> >> >> [INFO] Building checkstyle_retriever Maven Mojo
>> >> >> [INFO]    task-segment:
>> >> >> [org.apache.maven.plugins:maven-checkstyle-plugin::checkstyle]
>> >> >> [INFO]
>> >> >>
>> >>
>> ------------------------------------------------------------------------
>> >> >> [INFO] Setting property: classpath.resource.loader.class =>
>> >> >> 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
>> >> >> [INFO] Setting property: velocimacro.messages.on => 'false'.
>> >> >> [INFO] Setting property: resource.loader => 'classpath'.
>> >> >> [INFO] Setting property: resource.manager.logwhenfound => 'false'.
>> >> >> [INFO]
>> **************************************************************
>> >> >> [INFO] Starting Jakarta Velocity v1.4
>> >> >> [INFO] RuntimeInstance initializing.
>> >> >> [INFO] Default Properties File:
>> >> >> org\apache\velocity\runtime\defaults\velocity.properties
>> >> >> [INFO] Default ResourceManager initializing. (class
>> >> >> org.apache.velocity.runtime.resource.ResourceManagerImpl)
>> >> >> [INFO] Resource Loader Instantiated:
>> >> >> org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
>> >> >> [INFO] ClasspathResourceLoader : initialization starting.
>> >> >> [INFO] ClasspathResourceLoader : initialization complete.
>> >> >> [INFO] ResourceCache : initialized. (class
>> >> >> org.apache.velocity.runtime.resource.ResourceCacheImpl)
>> >> >> [INFO] Default ResourceManager initialization complete.
>> >> >> [INFO] Loaded System Directive:
>> >> >> org.apache.velocity.runtime.directive.Literal
>> >> >> [INFO] Loaded System Directive:
>> >> >> org.apache.velocity.runtime.directive.Macro
>> >> >> [INFO] Loaded System Directive:
>> >> >> org.apache.velocity.runtime.directive.Parse
>> >> >> [INFO] Loaded System Directive:
>> >> >> org.apache.velocity.runtime.directive.Include
>> >> >> [INFO] Loaded System Directive:
>> >> >> org.apache.velocity.runtime.directive.Foreach
>> >> >> [INFO] Created: 20 parsers.
>> >> >> [INFO] Velocimacro : initialization starting.
>> >> >> [INFO] Velocimacro : adding VMs from VM library template :
>> >> >> VM_global_library.vm
>> >> >> [ERROR] ResourceManager : unable to find resource
>> >> 'VM_global_library.vm'
>> >> >> in
>> >> >> any resource loader.
>> >> >> [INFO] Velocimacro : error using  VM library template
>> >> >> VM_global_library.vm
>> >> >> :
>> >> >> org.apache.velocity.exception.ResourceNotFoundException: Unable to
>> >> find
>> >> r
>> >> >> esource 'VM_global_library.vm'
>> >> >> [INFO] Velocimacro :  VM library template macro registration
>> complete.
>> >> >> [INFO] Velocimacro : allowInline = true : VMs can be defined inline
>> in
>> >> >> templates
>> >> >> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined
>> >> inline
>> >> >> may
>> >> >> NOT replace previous VM definitions
>> >> >> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline
>> >> will
>> >> >> be
>> >> >> global in scope if allowed.
>> >> >> [INFO] Velocimacro : initialization complete.
>> >> >> [INFO] Velocity successfully started.
>> >> >> [INFO] [checkstyle:checkstyle]
>> >> >> [WARNING] File encoding has not been set, using platform encoding
>> >> Cp1252,
>> >> >> i.e. build is platform dependent!
>> >> >> [INFO] checkstyle_retriever Maven Mojo Executing
>> >> >> org.codehaus.mojo:taglist-maven-plugin:[taglist]
>> >> >> [INFO]
>> >> >>
>> >>
>> ------------------------------------------------------------------------
>> >> >> [INFO] Building checkstyle_retriever Maven Mojo
>> >> >> [INFO]    task-segment:
>> >> [org.codehaus.mojo:taglist-maven-plugin::taglist]
>> >> >> [INFO]
>> >> >>
>> >>
>> ------------------------------------------------------------------------
>> >> >> [INFO] [taglist:taglist]
>> >> >> [INFO] checkstyle_retriever Maven Mojo Executing
>> >> >> org.codehaus.mojo:cobertura-maven-plugin:[cobertura]
>> >> >> [INFO]
>> >> >>
>> >>
>> ------------------------------------------------------------------------
>> >> >> [INFO] Building checkstyle_retriever Maven Mojo
>> >> >> [INFO]    task-segment:
>> >> >> [org.codehaus.mojo:cobertura-maven-plugin::cobertura]
>> >> >> [INFO]
>> >> >>
>> >>
>> ------------------------------------------------------------------------
>> >> >> [INFO] Preparing cobertura:cobertura
>> >> >> [INFO] [plugin:descriptor]
>> >> >> [INFO] Using 2 extractors.
>> >> >> [INFO] Applying extractor for language: java
>> >> >> [INFO] Extractor for language: java found 1 mojo descriptors.
>> >> >> [INFO] Applying extractor for language: bsh
>> >> >> [INFO] Extractor for language: bsh found 0 mojo descriptors.
>> >> >> [INFO] [resources:resources]
>> >> >> [WARNING] Using platform encoding (Cp1252 actually) to copy
>> filtered
>> >> >> resources, i.e. build is platform dependent!
>> >> >> [INFO] skip non existing resourceDirectory
>> >> >> D:\projets\checkstyle_retriever\src\main\resources
>> >> >> [INFO] [compiler:compile]
>> >> >> [INFO] Nothing to compile - all classes are up to date
>> >> >> [INFO] [cobertura:instrument]
>> >> >> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See
>> COPYRIGHT
>> >> file
>> >> >> Cobertura: Loaded information on 4 classes.
>> >> >> Instrumenting 4 files to
>> >> >> D:\projets\checkstyle_retriever\target\generated-classes\cobertura
>> >> >> Cobertura: Saved information on 4 classes.
>> >> >> Instrument time: 281ms
>> >> >>
>> >> >> [INFO] Instrumentation was successful.
>> >> >> [INFO] [resources:testResources]
>> >> >> [WARNING] Using platform encoding (Cp1252 actually) to copy
>> filtered
>> >> >> resources, i.e. build is platform dependent!
>> >> >> [INFO] skip non existing resourceDirectory
>> >> >> D:\projets\checkstyle_retriever\src\test\resources
>> >> >> [INFO] [compiler:testCompile]
>> >> >> [INFO] Nothing to compile - all classes are up to date
>> >> >> [INFO] [surefire:test]
>> >> >> [INFO] Surefire report directory:
>> >> >> D:\projets\checkstyle_retriever\target\surefire-reports
>> >> >>
>> >> >> -------------------------------------------------------
>> >> >>  T E S T S
>> >> >> -------------------------------------------------------
>> >> >> There are no tests to run.
>> >> >>
>> >> >> Results :
>> >> >>
>> >> >> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>> >> >>
>> >> >> [INFO] [cobertura:cobertura]
>> >> >> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See
>> COPYRIGHT
>> >> file
>> >> >> Cobertura: Loaded information on 4 classes.
>> >> >> [cobertura] INFO  [main]
>> >> >> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot
>> find
>> >> >> source file during CCN computation, source=[com/trem/ch
>> >> >> eckstyle_retriever/GreetingMojo.java]
>> >> >> [cobertura] INFO  [main]
>> >> >> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot
>> find
>> >> >> source file during CCN computation, source=[com/trem/ch
>> >> >> eckstyle_retriever/RetrieveFile.java]
>> >> >> Report time: 313ms
>> >> >>
>> >> >> [INFO] Cobertura Report generation was successful.
>> >> >> [INFO] checkstyle_retriever Maven Mojo Executing
>> >> >> org.apache.maven.plugins:maven-surefire-plugin:[]
>> >> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> >> org.sonar.plugins.pmd.PmdMavenCollector] executing
>> >> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> >> org.sonar.plugins.isoqa.JDependMavenCollector] executing
>> >> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> >> org.sonar.plugins.isoqa.CkjmMavenCollector] executing
>> >> >> java.lang.ClassNotFoundException: Exception while looking for class
>> >> >> org.apache.maven.plugin.AbstractMojo: java.io.IOException: Couldn't
>> >> find:
>> >> >> org.apac
>> >> >> he.maven.plugin.AbstractMojo.class
>> >> >> java.lang.ClassNotFoundException: Exception while looking for class
>> >> >> junit.framework.TestCase: java.io.IOException: Couldn't find:
>> >> >> junit.framework.Test
>> >> >> Case.class
>> >> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> >> org.sonar.plugins.squid.SquidMavenCollector] executing
>> >> >> [INFO] checkstyle_retriever Maven Mojo Starting audit...
>> >> >> [INFO] checkstyle_retriever Maven Mojo Audit done.
>> >> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> >> org.sonar.plugins.core.SaveProfileMavenCollector] executing
>> >> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> >> org.sonar.plugins.core.sources.ImportJavaSourcesMavenCollector]
>> >> executing
>> >> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> >> org.sonar.plugins.core.SaveProjectLinksFromPom] executing
>> >> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> >> org.sonar.plugins.checkstyle.CheckstyleMavenCollector] executing
>> >> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> >> org.sonar.plugins.cpd.CpdMavenCollector] executing
>> >> >> [INFO] checkstyle_retriever Maven Mojo Collecting duplications...
>> >> >> [INFO] checkstyle_retriever Maven Mojo File suffixes : java
>> >> >> [INFO] checkstyle_retriever Maven Mojo Exclusions : {}
>> >> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> >> org.sonar.plugins.taglist.TaglistMavenCollector] executing
>> >> >> [INFO] checkstyle_retriever Maven Mojo Parsing
>> >> >> D:\projets\checkstyle_retriever\target\taglist\taglist.xml
>> >> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> >> org.sonar.plugins.cobertura.CoberturaMavenCollector] executing
>> >> >> [INFO] checkstyle_retriever Maven Mojo parsing
>> >> >> D:\projets\checkstyle_retriever\target\site\cobertura\coverage.xml
>> >> >> [INFO] checkstyle_retriever Maven Mojo [class
>> >> >> org.sonar.plugins.surefire.SurefireMavenCollector] executing
>> >> >> [INFO] checkstyle_retriever Maven Mojo parsing
>> >> >> D:\projets\checkstyle_retriever\target\surefire-reports
>> >> >> [INFO]  Trigger server
>> >> >> [INFO]
>> >> >>
>> >>
>> ------------------------------------------------------------------------
>> >> >> [INFO] BUILD SUCCESSFUL
>> >> >> [INFO]
>> >> >>
>> >>
>> ------------------------------------------------------------------------
>> >> >> [INFO] Total time: 39 seconds
>> >> >> [INFO] Finished at: Fri Jun 26 16:40:59 CEST 2009
>> >> >> [INFO] Final Memory: 25M/45M
>> >> >> [INFO]
>> >> >>
>> >>
>> ------------------------------------------------------------------------
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >>
>> http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24221614.html
>> >> >> Sent from the Sonar user mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> To unsubscribe from this list, please visit:
>> >> >>
>> >> >>    http://xircles.codehaus.org/manage_email
>> >> >>
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24249654.html
>> >> Sent from the Sonar user mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe from this list, please visit:
>> >>
>> >>    http://xircles.codehaus.org/manage_email
>> >>
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24267332.html
>> Sent from the Sonar user mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>

--
View this message in context: http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24289967.html
Sent from the Sonar user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: erro with Maven plugin MOJO

by Franck Bassy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OMG that's true i didn't see that, now it work :x


Thanks !
Freddy Mallet wrote:
Franck,

Rename RetrieveFile.java in RetriveFileTest.java, this is a standard Maven
convention !

Freddy


On Wed, Jul 1, 2009 at 3:40 PM, Franck Bassy <franck.bassy@atosorigin.com>wrote:

>
> Hi,
>
> it work when i use mvn sonar:sonar -Dtest=RetrieveFile.java
>
> i need to specify my Junit test...
>
> thanks
>
>
>
> Freddy Mallet wrote:
> >
> > Hi Franck,
> > Once your junit test will be executed when "mvn test" is launched, Sonar
> > will work :-)
> >
> > Freddy
> >
> > On Tue, Jun 30, 2009 at 9:24 AM, Franck Bassy
> > <franck.bassy@atosorigin.com>wrote:
> >
> >>
> >> Hi!
> >>
> >> but i'v one Junit Test in a folder /src/test/java/ ...
> >>
> >> when i try mvn test i'v this :
> >>
> >> [INFO] Scanning for projects...
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> [INFO]    task-segment: [test]
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] [plugin:descriptor]
> >> [INFO] Using 2 extractors.
> >> [INFO] Applying extractor for language: java
> >> [INFO] Extractor for language: java found 1 mojo descriptors.
> >> [INFO] Applying extractor for language: bsh
> >> [INFO] Extractor for language: bsh found 0 mojo descriptors.
> >> [INFO] [resources:resources]
> >> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> >> resources, i.e. build is platform dependent!
> >> [INFO] skip non existing resourceDirectory
> >> D:\projets\checkstyle_retriever\src\main\resources
> >> [INFO] [compiler:compile]
> >> [INFO] Nothing to compile - all classes are up to date
> >> [INFO] [resources:testResources]
> >> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> >> resources, i.e. build is platform dependent!
> >> [INFO] skip non existing resourceDirectory
> >> D:\projets\checkstyle_retriever\src\test\resources
> >> [INFO] [compiler:testCompile]
> >> [INFO] Nothing to compile - all classes are up to date
> >> [INFO] [surefire:test]
> >> [INFO] Surefire report directory:
> >> D:\projets\checkstyle_retriever\target\surefire-reports
> >>
> >> -------------------------------------------------------
> >>  T E S T S
> >> -------------------------------------------------------
> >> There are no tests to run.
> >>
> >> Results :
> >>
> >> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> >>
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] BUILD SUCCESSFUL
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] Total time: 11 seconds
> >> [INFO] Finished at: Tue Jun 30 09:21:20 CEST 2009
> >> [INFO] Final Memory: 10M/19M
> >> [INFO]
> >> ------------------------------------------------------------------------
> >>
> >> Maybe it found "Extractor for language: java found 1 mojo descriptors."
> >> ??
> >>
> >>
> >> Freddy Mallet wrote:
> >> >
> >> > Hello Franck,
> >> >
> >> > According to the log, unit tests are not executed by the corbertura
> >> plugin
> >> > :
> >> >
> >> > [INFO] [surefire:test]
> >> > [INFO] Surefire report directory:
> >> > D:\projets\checkstyle_retriever\target\surefire-reports
> >> >
> >> > -------------------------------------------------------
> >> >  T E S T S
> >> > -------------------------------------------------------
> >> > There are no tests to run.
> >> >
> >> > Results :
> >> >
> >> > Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> >> >
> >> > What do you get when you launch "mvn test" ?
> >> > Thanks
> >> > Freddy
> >> >
> >> > On Mon, Jun 29, 2009 at 9:36 AM, Franck Bassy
> >> > <franck.bassy@atosorigin.com>wrote:
> >> >
> >> >>
> >> >> i'v no specific configuration :
> >> >>
> >> >> mvn cobertura:cobertura give me :
> >> >>
> >> >> [INFO] Scanning for projects...
> >> >> [INFO] Searching repository for plugin with prefix: 'cobertura'.
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> >> [INFO]    task-segment: [cobertura:cobertura]
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >> [INFO] Preparing cobertura:cobertura
> >> >> [INFO] [plugin:descriptor]
> >> >> [INFO] Using 2 extractors.
> >> >> [INFO] Applying extractor for language: java
> >> >> [INFO] Extractor for language: java found 1 mojo descriptors.
> >> >> [INFO] Applying extractor for language: bsh
> >> >> [INFO] Extractor for language: bsh found 0 mojo descriptors.
> >> >> [INFO] [resources:resources]
> >> >> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> >> >> resources, i.e. build is platform dependent!
> >> >> [INFO] skip non existing resourceDirectory
> >> >> D:\projets\checkstyle_retriever\src\main\resources
> >> >> [INFO] [compiler:compile]
> >> >> [INFO] Nothing to compile - all classes are up to date
> >> >> [INFO] [cobertura:instrument]
> >> >> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT
> >> file
> >> >> Cobertura: Loaded information on 4 classes.
> >> >> Instrumenting 4 files to
> >> >> D:\projets\checkstyle_retriever\target\generated-classes\cobertura
> >> >> Cobertura: Saved information on 4 classes.
> >> >> Instrument time: 328ms
> >> >>
> >> >> [INFO] Instrumentation was successful.
> >> >> [INFO] [resources:testResources]
> >> >> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> >> >> resources, i.e. build is platform dependent!
> >> >> [INFO] skip non existing resourceDirectory
> >> >> D:\projets\checkstyle_retriever\src\test\resources
> >> >> [INFO] [compiler:testCompile]
> >> >> [INFO] Nothing to compile - all classes are up to date
> >> >> [INFO] [surefire:test]
> >> >> [INFO] Surefire report directory:
> >> >> D:\projets\checkstyle_retriever\target\surefire-reports
> >> >>
> >> >> -------------------------------------------------------
> >> >>  T E S T S
> >> >> -------------------------------------------------------
> >> >> There are no tests to run.
> >> >>
> >> >> Results :
> >> >>
> >> >> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> >> >>
> >> >> [INFO] [cobertura:cobertura]
> >> >> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT
> >> file
> >> >> Cobertura: Loaded information on 4 classes.
> >> >> [cobertura] INFO  [main]
> >> >> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot
> find
> >> >> source file during CCN computation, source=[com/trem/ch
> >> >> eckstyle_retriever/GreetingMojo.java]
> >> >> [cobertura] INFO  [main]
> >> >> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot
> find
> >> >> source file during CCN computation, source=[com/trem/ch
> >> >> eckstyle_retriever/RetrieveFile.java]
> >> >> Report time: 406ms
> >> >>
> >> >> [INFO] Cobertura Report generation was successful.
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >> [INFO] BUILD SUCCESSFUL
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >> [INFO] Total time: 13 seconds
> >> >> [INFO] Finished at: Mon Jun 29 09:34:03 CEST 2009
> >> >> [INFO] Final Memory: 12M/21M
> >> >> [INFO]
> >> >>
> >> ------------------------------------------------------------------------
> >> >>
> >> >>
> >> >>
> >> >> Freddy Mallet wrote:
> >> >> >
> >> >> > Hi Franck,
> >> >> > Could you try to directly launch the command "mvn
> >> cobertura:cobertura"
> >> >> ?
> >> >> I
> >> >> > guess you'll encounter the same issue as the cobertura plugin
> >> doesn't
> >> >> seem
> >> >> > to be able to retrieve the unit tests. Do you have any special
> >> >> > configuration
> >> >> > in your pom.xml file which can impact unit tests execution ?
> >> >> >
> >> >> > Cheers
> >> >> > Freddy
> >> >> >
> >> >> > On Fri, Jun 26, 2009 at 4:46 PM, Franck Bassy
> >> >> > <franck.bassy@atosorigin.com>wrote:
> >> >> >
> >> >> >>
> >> >> >> Hi,
> >> >> >>
> >> >> >> i try to execute mvn sonar:sonar on a new maven plugin MOJO and i
> >> >> don't
> >> >> >> understand i'v no code coverage and he didn't find my units tests
> >> :x
> >> >> >>
> >> >> >> I need to specify some information in my pom ?
> >> >> >>
> >> >> >> thank for your answer
> >> >> >>
> >> >> >> there the stacktrace :
> >> >> >>
> >> >> >> [INFO] Scanning for projects...
> >> >> >> [INFO] Searching repository for plugin with prefix: 'sonar'.
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> >> >> [INFO]    task-segment: [sonar:sonar] (aggregator-style)
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] [sonar:sonar]
> >> >> >> [INFO] Sonar host: http://w30414:9000
> >> >> >> [INFO] Sonar version: 1.9.2
> >> >> >> [INFO] [sonar-core:internal]
> >> >> >> [INFO] Sonar JDBC URL:
> >> >> >>
> >> jdbc:mysql://w30414:3306/sonar?useUnicode=true&characterEncoding=utf8
> >> >> >> [INFO] Sonar JDBC login: root
> >> >> >> [INFO] Sonar JDBC driver: com.mysql.jdbc.Driver
> >> >> >> [INFO] Sonar branch:
> >> >> >> [INFO] checkstyle_retriever Maven Mojo Getting Plugin
> Extensions...
> >> >> >> [INFO] checkstyle_retriever Maven Mojo Selected quality profile :
> >> >> Sonar
> >> >> >> Test, language=java
> >> >> >> [INFO] checkstyle_retriever Maven Mojo Executing
> >> >> >> org.apache.maven.plugins:maven-pmd-plugin:[pmd]
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> >> >> [INFO]    task-segment:
> >> >> [org.apache.maven.plugins:maven-pmd-plugin::pmd]
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] [pmd:pmd]
> >> >> >> [WARNING] File encoding has not been set, using platform encoding
> >> >> Cp1252,
> >> >> >> i.e. build is platform dependent!
> >> >> >> [WARNING] Error while parsing
> >> >> >>
> >> >> >>
> >> >>
> >>
> D:\projets\checkstyle_retriever\src\main\java\com\trem\checkstyle_retriever\RetrieveCheckstyleMojo.java:
> >> >> >> Can't use annota
> >> >> >> tions when running in JDK 1.4 mode!
> >> >> >> [INFO] checkstyle_retriever Maven Mojo Executing
> >> >> >> org.apache.maven.plugins:maven-checkstyle-plugin:[checkstyle]
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> >> >> [INFO]    task-segment:
> >> >> >> [org.apache.maven.plugins:maven-checkstyle-plugin::checkstyle]
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] Setting property: classpath.resource.loader.class =>
> >> >> >> 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
> >> >> >> [INFO] Setting property: velocimacro.messages.on => 'false'.
> >> >> >> [INFO] Setting property: resource.loader => 'classpath'.
> >> >> >> [INFO] Setting property: resource.manager.logwhenfound => 'false'.
> >> >> >> [INFO]
> >> **************************************************************
> >> >> >> [INFO] Starting Jakarta Velocity v1.4
> >> >> >> [INFO] RuntimeInstance initializing.
> >> >> >> [INFO] Default Properties File:
> >> >> >> org\apache\velocity\runtime\defaults\velocity.properties
> >> >> >> [INFO] Default ResourceManager initializing. (class
> >> >> >> org.apache.velocity.runtime.resource.ResourceManagerImpl)
> >> >> >> [INFO] Resource Loader Instantiated:
> >> >> >> org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
> >> >> >> [INFO] ClasspathResourceLoader : initialization starting.
> >> >> >> [INFO] ClasspathResourceLoader : initialization complete.
> >> >> >> [INFO] ResourceCache : initialized. (class
> >> >> >> org.apache.velocity.runtime.resource.ResourceCacheImpl)
> >> >> >> [INFO] Default ResourceManager initialization complete.
> >> >> >> [INFO] Loaded System Directive:
> >> >> >> org.apache.velocity.runtime.directive.Literal
> >> >> >> [INFO] Loaded System Directive:
> >> >> >> org.apache.velocity.runtime.directive.Macro
> >> >> >> [INFO] Loaded System Directive:
> >> >> >> org.apache.velocity.runtime.directive.Parse
> >> >> >> [INFO] Loaded System Directive:
> >> >> >> org.apache.velocity.runtime.directive.Include
> >> >> >> [INFO] Loaded System Directive:
> >> >> >> org.apache.velocity.runtime.directive.Foreach
> >> >> >> [INFO] Created: 20 parsers.
> >> >> >> [INFO] Velocimacro : initialization starting.
> >> >> >> [INFO] Velocimacro : adding VMs from VM library template :
> >> >> >> VM_global_library.vm
> >> >> >> [ERROR] ResourceManager : unable to find resource
> >> >> 'VM_global_library.vm'
> >> >> >> in
> >> >> >> any resource loader.
> >> >> >> [INFO] Velocimacro : error using  VM library template
> >> >> >> VM_global_library.vm
> >> >> >> :
> >> >> >> org.apache.velocity.exception.ResourceNotFoundException: Unable to
> >> >> find
> >> >> r
> >> >> >> esource 'VM_global_library.vm'
> >> >> >> [INFO] Velocimacro :  VM library template macro registration
> >> complete.
> >> >> >> [INFO] Velocimacro : allowInline = true : VMs can be defined
> inline
> >> in
> >> >> >> templates
> >> >> >> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined
> >> >> inline
> >> >> >> may
> >> >> >> NOT replace previous VM definitions
> >> >> >> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline
> >> >> will
> >> >> >> be
> >> >> >> global in scope if allowed.
> >> >> >> [INFO] Velocimacro : initialization complete.
> >> >> >> [INFO] Velocity successfully started.
> >> >> >> [INFO] [checkstyle:checkstyle]
> >> >> >> [WARNING] File encoding has not been set, using platform encoding
> >> >> Cp1252,
> >> >> >> i.e. build is platform dependent!
> >> >> >> [INFO] checkstyle_retriever Maven Mojo Executing
> >> >> >> org.codehaus.mojo:taglist-maven-plugin:[taglist]
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> >> >> [INFO]    task-segment:
> >> >> [org.codehaus.mojo:taglist-maven-plugin::taglist]
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] [taglist:taglist]
> >> >> >> [INFO] checkstyle_retriever Maven Mojo Executing
> >> >> >> org.codehaus.mojo:cobertura-maven-plugin:[cobertura]
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] Building checkstyle_retriever Maven Mojo
> >> >> >> [INFO]    task-segment:
> >> >> >> [org.codehaus.mojo:cobertura-maven-plugin::cobertura]
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] Preparing cobertura:cobertura
> >> >> >> [INFO] [plugin:descriptor]
> >> >> >> [INFO] Using 2 extractors.
> >> >> >> [INFO] Applying extractor for language: java
> >> >> >> [INFO] Extractor for language: java found 1 mojo descriptors.
> >> >> >> [INFO] Applying extractor for language: bsh
> >> >> >> [INFO] Extractor for language: bsh found 0 mojo descriptors.
> >> >> >> [INFO] [resources:resources]
> >> >> >> [WARNING] Using platform encoding (Cp1252 actually) to copy
> >> filtered
> >> >> >> resources, i.e. build is platform dependent!
> >> >> >> [INFO] skip non existing resourceDirectory
> >> >> >> D:\projets\checkstyle_retriever\src\main\resources
> >> >> >> [INFO] [compiler:compile]
> >> >> >> [INFO] Nothing to compile - all classes are up to date
> >> >> >> [INFO] [cobertura:instrument]
> >> >> >> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See
> >> COPYRIGHT
> >> >> file
> >> >> >> Cobertura: Loaded information on 4 classes.
> >> >> >> Instrumenting 4 files to
> >> >> >> D:\projets\checkstyle_retriever\target\generated-classes\cobertura
> >> >> >> Cobertura: Saved information on 4 classes.
> >> >> >> Instrument time: 281ms
> >> >> >>
> >> >> >> [INFO] Instrumentation was successful.
> >> >> >> [INFO] [resources:testResources]
> >> >> >> [WARNING] Using platform encoding (Cp1252 actually) to copy
> >> filtered
> >> >> >> resources, i.e. build is platform dependent!
> >> >> >> [INFO] skip non existing resourceDirectory
> >> >> >> D:\projets\checkstyle_retriever\src\test\resources
> >> >> >> [INFO] [compiler:testCompile]
> >> >> >> [INFO] Nothing to compile - all classes are up to date
> >> >> >> [INFO] [surefire:test]
> >> >> >> [INFO] Surefire report directory:
> >> >> >> D:\projets\checkstyle_retriever\target\surefire-reports
> >> >> >>
> >> >> >> -------------------------------------------------------
> >> >> >>  T E S T S
> >> >> >> -------------------------------------------------------
> >> >> >> There are no tests to run.
> >> >> >>
> >> >> >> Results :
> >> >> >>
> >> >> >> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> >> >> >>
> >> >> >> [INFO] [cobertura:cobertura]
> >> >> >> [INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See
> >> COPYRIGHT
> >> >> file
> >> >> >> Cobertura: Loaded information on 4 classes.
> >> >> >> [cobertura] INFO  [main]
> >> >> >> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot
> >> find
> >> >> >> source file during CCN computation, source=[com/trem/ch
> >> >> >> eckstyle_retriever/GreetingMojo.java]
> >> >> >> [cobertura] INFO  [main]
> >> >> >> net.sourceforge.cobertura.reporting.ComplexityCalculator - Cannot
> >> find
> >> >> >> source file during CCN computation, source=[com/trem/ch
> >> >> >> eckstyle_retriever/RetrieveFile.java]
> >> >> >> Report time: 313ms
> >> >> >>
> >> >> >> [INFO] Cobertura Report generation was successful.
> >> >> >> [INFO] checkstyle_retriever Maven Mojo Executing
> >> >> >> org.apache.maven.plugins:maven-surefire-plugin:[]
> >> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> >> org.sonar.plugins.pmd.PmdMavenCollector] executing
> >> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> >> org.sonar.plugins.isoqa.JDependMavenCollector] executing
> >> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> >> org.sonar.plugins.isoqa.CkjmMavenCollector] executing
> >> >> >> java.lang.ClassNotFoundException: Exception while looking for
> class
> >> >> >> org.apache.maven.plugin.AbstractMojo: java.io.IOException:
> Couldn't
> >> >> find:
> >> >> >> org.apac
> >> >> >> he.maven.plugin.AbstractMojo.class
> >> >> >> java.lang.ClassNotFoundException: Exception while looking for
> class
> >> >> >> junit.framework.TestCase: java.io.IOException: Couldn't find:
> >> >> >> junit.framework.Test
> >> >> >> Case.class
> >> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> >> org.sonar.plugins.squid.SquidMavenCollector] executing
> >> >> >> [INFO] checkstyle_retriever Maven Mojo Starting audit...
> >> >> >> [INFO] checkstyle_retriever Maven Mojo Audit done.
> >> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> >> org.sonar.plugins.core.SaveProfileMavenCollector] executing
> >> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> >> org.sonar.plugins.core.sources.ImportJavaSourcesMavenCollector]
> >> >> executing
> >> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> >> org.sonar.plugins.core.SaveProjectLinksFromPom] executing
> >> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> >> org.sonar.plugins.checkstyle.CheckstyleMavenCollector] executing
> >> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> >> org.sonar.plugins.cpd.CpdMavenCollector] executing
> >> >> >> [INFO] checkstyle_retriever Maven Mojo Collecting duplications...
> >> >> >> [INFO] checkstyle_retriever Maven Mojo File suffixes : java
> >> >> >> [INFO] checkstyle_retriever Maven Mojo Exclusions : {}
> >> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> >> org.sonar.plugins.taglist.TaglistMavenCollector] executing
> >> >> >> [INFO] checkstyle_retriever Maven Mojo Parsing
> >> >> >> D:\projets\checkstyle_retriever\target\taglist\taglist.xml
> >> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> >> org.sonar.plugins.cobertura.CoberturaMavenCollector] executing
> >> >> >> [INFO] checkstyle_retriever Maven Mojo parsing
> >> >> >> D:\projets\checkstyle_retriever\target\site\cobertura\coverage.xml
> >> >> >> [INFO] checkstyle_retriever Maven Mojo [class
> >> >> >> org.sonar.plugins.surefire.SurefireMavenCollector] executing
> >> >> >> [INFO] checkstyle_retriever Maven Mojo parsing
> >> >> >> D:\projets\checkstyle_retriever\target\surefire-reports
> >> >> >> [INFO]  Trigger server
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] BUILD SUCCESSFUL
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >> [INFO] Total time: 39 seconds
> >> >> >> [INFO] Finished at: Fri Jun 26 16:40:59 CEST 2009
> >> >> >> [INFO] Final Memory: 25M/45M
> >> >> >> [INFO]
> >> >> >>
> >> >>
> >> ------------------------------------------------------------------------
> >> >> >>
> >> >> >> --
> >> >> >> View this message in context:
> >> >> >>
> >> >>
> >>
> http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24221614.html
> >> >> >> Sent from the Sonar user mailing list archive at Nabble.com.
> >> >> >>
> >> >> >>
> >> >> >>
> >> ---------------------------------------------------------------------
> >> >> >> To unsubscribe from this list, please visit:
> >> >> >>
> >> >> >>    http://xircles.codehaus.org/manage_email
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24249654.html
> >> >> Sent from the Sonar user mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe from this list, please visit:
> >> >>
> >> >>    http://xircles.codehaus.org/manage_email
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24267332.html
> >> Sent from the Sonar user mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list, please visit:
> >>
> >>    http://xircles.codehaus.org/manage_email
> >>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/erro-with-Maven-plugin-MOJO-tp24221614p24289967.html
> Sent from the Sonar user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

Re: Simulation/branch mode

by Olivier Gaudin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Niels,

1. Sonar can handle branches fine by using the the branch property [1]. In that case, the key becomes groupId+artifactId + branch.

2. no ;-)
More seriously, what you are talking about is kind of a sand box that would pre-validate the code before check in. I can see an immediate issue to this idea : the time the code analysis is going to take. Waiting for 5 or 10 (or more) minutes before you know the quality of the code you want to check in seems unrealistic for developers unless you already have a pre-check in stage in your process ?

Olivier

[1] http://docs.codehaus.org/display/SONAR/Advanced+parameters


On Tue, Jun 30, 2009 at 10:11 PM, Niels B Nielsen <niels.b.nielsen@...> wrote:

Hi there,

 

First of all thanks for putting the effort into producing such a product. I feel tempted to contribute if I did have sufficient time and need for it.

 

However, two quick questions.

 

1) How well does Sonar handle branch of the same product. So far I haven't experimented much, but it seems to only recognize groupId+artifactId as the project identifier. That must make it hard to measure quality on trunk and branches, for those of us who use both at the same time.

 

2) Simulation mode

 

I was thinking. We sometimes want to identify if certain changes would improve or not the overall quality of the build before we check it in. The reasoning is, that often when the project is checked in, developers focus on the next task ahead. If we had the ability to show potential impact, it would be easier for the developer to go the last mile. Especially when we want to encourage a peer review development model.

 

Is there anyway a measure could be not committed in the DB, but a diff created in any way? I assume the answer is no, but a bit more elaborated :-)

 

Regards,

/Niels


This email is confidential and subject to important disclaimers and conditions including on offers for the purchase or sale of securities, accuracy and completeness of information, viruses, confidentiality, legal privilege, and legal entity disclaimers, available at http://www.jpmorgan.com/pages/disclosures/email.