Hi Nik,
I tried the following:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
and I got:
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'site'.
[INFO]
----------------------------------------------------------------------------
[INFO] Building Maven Quick Start Archetype
[INFO] task-segment: [site:site]
[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
resource '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] [site:site]
[INFO] Generate "Continuous Integration" report.
[ERROR] VM #displayTree: error : too few arguments to macro. Wanted 2 got 0
[ERROR] VM #menuItem: error : too few arguments to macro. Wanted 1 got 0
[INFO] Generate "Dependencies" report.
[INFO] Generate "Issue Tracking" report.
[INFO] Generate "Project License" report.
[INFO] Generate "Mailing Lists" report.
[INFO] Generate "Source Repository" report.
[INFO] Generate "Project Team" report.
[INFO] Generate "Checkstyle" report.
[INFO]
----------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
----------------------------------------------------------------------------
---------------------------------------------------
constituent[0]:
file:/usr/local/java/app/maven/2.0/lib/maven-reporting-api-2.0.jar
constituent[1]: file:/usr/local/java/app/maven/2.0/lib/maven-model-2.0.jar
constituent[2]:
file:/usr/local/java/app/maven/2.0/lib/maven-artifact-manager-2.0-1.jar
constituent[3]:
file:/usr/local/java/app/maven/2.0/lib/wagon-file-1.0-alpha-5.jar
constituent[4]: file:/usr/local/java/app/maven/2.0/lib/maven-profile-2.0.jar
constituent[5]: file:/usr/local/java/app/maven/2.0/lib/maven-monitor-2.0.jar
constituent[6]: file:/usr/local/java/app/maven/2.0/lib/jsch-0.1.23.jar
constituent[7]:
file:/usr/local/java/app/maven/2.0/lib/wagon-http-lightweight-1.0-alpha-5.jar
constituent[8]: file:/usr/local/java/app/maven/2.0/lib/commons-cli-1.0.jar
constituent[9]:
file:/usr/local/java/app/maven/2.0/lib/plexus-interactivity-api-1.0-alpha-4.jar
constituent[10]:
file:/usr/local/java/app/maven/2.0/lib/maven-settings-2.0.jar
constituent[11]:
file:/usr/local/java/app/maven/2.0/lib/maven-project-2.0-1.jar
constituent[12]:
file:/usr/local/java/app/maven/2.0/lib/maven-plugin-registry-2.0.jar
constituent[13]:
file:/usr/local/java/app/maven/2.0/lib/maven-artifact-2.0-1.jar
constituent[14]:
file:/usr/local/java/app/maven/2.0/lib/doxia-sink-api-1.0-alpha-4.jar
constituent[15]:
file:/usr/local/java/app/maven/2.0/lib/maven-plugin-parameter-documenter-2.0.jar
constituent[16]:
file:/usr/local/java/app/maven/2.0/lib/maven-repository-metadata-2.0.jar
constituent[17]:
file:/usr/local/java/app/maven/2.0/lib/maven-plugin-api-2.0.jar
constituent[18]: file:/usr/local/java/app/maven/2.0/lib/maven-core-2.0.jar
constituent[19]:
file:/usr/local/java/app/maven/2.0/lib/wagon-ssh-1.0-alpha-5.jar
constituent[20]:
file:/usr/local/java/app/maven/2.0/lib/maven-plugin-descriptor-2.0.jar
constituent[21]:
file:/usr/local/java/app/maven/2.0/lib/maven-error-diagnostics-2.0.jar
constituent[22]:
file:/usr/local/java/app/maven/2.0/lib/wagon-provider-api-1.0-alpha-5.jar
---------------------------------------------------
java.lang.NullPointerException
at
org.apache.maven.usability.diagnostics.DiagnosisUtils.appendRootCauseIfPresentAndUnique(DiagnosisUtils.java:89)
at
org.apache.maven.usability.diagnostics.ErrorDiagnostics$PuntErrorDiagnoser.diagnose(ErrorDiagnostics.java:132)
at
org.apache.maven.usability.diagnostics.ErrorDiagnostics.diagnose(ErrorDiagnostics.java:104)
at
org.apache.maven.DefaultMaven.logDiagnostics(DefaultMaven.java:693)
at org.apache.maven.DefaultMaven.logFatal(DefaultMaven.java:627)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:143)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
with -X option there are the following additonal lines concerning
checkstyle:
[DEBUG] maven-checkstyle-plugin: resolved to version 2.0-beta-1 from
repository central
[DEBUG] Retrieving parent-POM from the repository for project:
null:maven-checkstyle-plugin:maven-plugin:2.0-beta-1
[DEBUG]
org.apache.maven.plugins:maven-checkstyle-plugin:maven-plugin:2.0-beta-1
(selected for runtime)
[DEBUG] checkstyle:checkstyle-optional:jar:3.4 (selected for runtime)
[DEBUG] checkstyle:checkstyle:jar:3.4 (selected for runtime)
[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-checkstyle-plugin:2.0-beta-1:checkstyle' -->
[DEBUG] (f) cacheFile = [...]/target/checkstyle-cachefile
[DEBUG] (f) outputFile = [...]/target/checkstyle-result.txt
[DEBUG] (f) reports =
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED]
[DEBUG] (f) resourcesDirectory = [...]/src/site/resources
[DEBUG] (f) siteDirectory = [...]/src/site
[DEBUG] -- end configuration --
I also tried
<plugin>
<groupId>checkstyle</groupId>
<artifactId>checkstyle</artifactId>
<version>3.4</version>
</plugin>
[INFO]
----------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
----------------------------------------------------------------------------
[INFO] null
[INFO]
----------------------------------------------------------------------------
[DEBUG] Trace
java.lang.NullPointerException
at
org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginManager.java:292)
at
org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:198)
at
org.apache.maven.plugin.DefaultPluginManager.verifyReportPlugin(DefaultPluginManager.java:474)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyReportPlugin(DefaultLifecycleExecutor.java:1135)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getReports(DefaultLifecycleExecutor.java:642)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getReports(DefaultLifecycleExecutor.java:622)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:501)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:482)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:452)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:301)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
and
<plugin>
<groupId>checkstyle</groupId>
<artifactId>checkstyle</artifactId>
<version>4.0-beta6</version>
</plugin>
[DEBUG] Trying repository central
Downloading:
http://repo1.maven.org/maven2/checkstyle/checkstyle/4.0-beta6/checkstyle-4.0-beta6.pom
158b downloaded
[DEBUG] Artifact resolved
[DEBUG] Trying repository central
Downloading:
http://repo1.maven.org/maven2/checkstyle/checkstyle/4.0-beta6/checkstyle-4.0-beta6.jar
510K downloaded <--------- I removed the directory in my local
repository before to check wether it load the right version.
[DEBUG] Artifact resolved
[INFO]
----------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
----------------------------------------------------------------------------
[INFO] null
[INFO]
----------------------------------------------------------------------------
[DEBUG] Trace
java.lang.NullPointerException
at
org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginManager.java:292)
at
org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:198)
at
org.apache.maven.plugin.DefaultPluginManager.verifyReportPlugin(DefaultPluginManager.java:474)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyReportPlugin(DefaultLifecycleExecutor.java:1135)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getReports(DefaultLifecycleExecutor.java:642)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getReports(DefaultLifecycleExecutor.java:622)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:501)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:482)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:452)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:301)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
the command
mvn checkstyle:checkstyle
for versions 3.4 and 4.0-beta6
works fine
Any ideas?
Thanks,
Volker
P.S.: I used Maven 2.0 for these outputs.
Nik Gonzalez wrote:
Hi Volker,
What error did you get when you ran mvn site:site? Please copy it here.
Thanks,
Nik
Volker Hartmann wrote:
Hi,
I tried to generate a report for my first project.
(I used the Maven Quick Start Archetype.)
I added the following lines in the pom.xml
<project>
...
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
</plugins>
</reporting>
</project>
(Maybe somone can explain me why the documentation uses this
groupId and artifactId is mentioned nowhere else in the documentation
but in the example together with an old version!?
http://maven.apache.org/plugins/maven-checkstyle-plugin/howto.html )
But I got an error message. I tried several versions (3.4, 4.0 beta
6, ...) with different
errors.
I also tried
<plugin>
<groupId>checkstyle</groupId>
<artifactId>checkstyle</artifactId>
</plugin>
with no success.
Another problem is that I can call the goal directly via
mvn checkstyle:checkstyle but the configuration set in pom.xml
seems to be ignored.
BTW: I use Maven 2.0 but I also tried the 2.0.1 from the SVN
I appreciate any help and thanks in advance
Volker
P.S.: I also tried to generate a report for findbugs without
any success.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
| Volker Hartmann
_|____________________________________________________________________
###### FORSCHUNGSZENTRUM KARLSRUHE in der Helmholtz-Gesellschaft
# Institute for Data Processing and Electronics (IPE)
#
_|____________________________________________________________________
###### P.O. Box 3640, 76021 Karlsruhe, GERMANY
# phone: +49 7247 82-6033
# fax: +49 7247 82-3560
| email: [EMAIL PROTECTED]
| http://fuzzy.fzk.de/~hartmann/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]