Rolf Strijdhorst wrote:
Hi,
this is the exception i recieve:
[INFO] There are 3 checkstyle errors.
[WARN] Unable to locate Source XRef to link to - DISABLED
[WARN] org.apache.velocity.runtime.exception.ReferenceException:
reference :
template = org/apache/maven/plugin/checkstyle/checkstyle-rss.vm [line
6,column 11] : ${project.url} is not a valid reference.
[WARN] org.apache.velocity.runtime.exception.ReferenceException:
reference :
template = org/apache/maven/plugin/checkstyle/checkstyle-rss.vm [line
1,column 1] : ${project.url} is not a valid reference.
[DEBUG] File
C:\workspaces\br_java_Rolf_32\maven_build\target\site/checkstyle.rss
created...
[DEBUG] Configuring mojo '
org.apache.maven.plugins:maven-checkstyle-plugin:2.1:check' -->
[DEBUG] (f) failOnViolation = true
[DEBUG] (f) outputFile =
C:\workspaces\br_java_Rolf_32\maven_build\target\checkstyle-result.xml
[DEBUG] (f) outputFileFormat = xml
[DEBUG] -- end configuration --
[INFO] checkstyle:check {execution: basicstyles}
[ERROR] mojo-execute : checkstyle:check {execution: basicstyles}
Diagnosis: You have 3 checkstyle violations.
FATAL ERROR: Error executing Maven for a project
[ERROR] project-execute : org.dji:maven_build:jar:0.0.1 ( task-segment:
[package] )
Diagnosis: You have 3 checkstyle violations.
FATAL ERROR: Error executing Maven for a project
org.apache.maven.BuildFailureException: You have 3 checkstyle violations.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:555)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
(DefaultLifecycleExecutor.java:475)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:454)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:306)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:273)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java:140)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java
:441)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java
:382)
at org.maven.ide.eclipse.Maven2Executor.main(Maven2Executor.java:68)
Caused by: org.apache.maven.plugin.MojoFailureException: You have 3
checkstyle violations.
at
org.apache.maven.plugin.checkstyle.CheckstyleViolationCheckMojo.execute(
CheckstyleViolationCheckMojo.java:96)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
DefaultPluginManager.java:412)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:534)
... 8 more
And these are my settings:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyle.version}</version>
<executions>
<execution>
<id>basicstyles</id>
<phase>process-sources</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<configLocation>
${checkstyle.location}
</configLocation>
<suppressionsLocation>
${checkstyle.suppressions.location}
</suppressionsLocation>
<failOnViolation>true</failOnViolation>
</configuration>
<dependencies>
<dependency>
<groupId>org.dji.checkstyle</groupId>
<artifactId>brcheckstyle</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.dji.checkstyle</groupId>
<artifactId>checkstyle-optional</artifactId>
<version>4.2</version>
</dependency>
<dependency>
<groupId>org.dji.checkstyle</groupId>
<artifactId>PGITChecks</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
As said before the error is correct but it just doesn't fail nicely
Rolf
On 10/11/06, Rolf Strijdhorst <[EMAIL PROTECTED]> wrote:
monday I will put the exception on this list
thanx anyway
Rolf
On 10/10/06, Dennis Lundberg <[EMAIL PROTECTED] > wrote:
>
> Rolf Strijdhorst wrote:
> > Hi when running the checkstyle plugin and some code styles are
> violated the
> > build fails with an exception.
> > It does not fail nicely like the pmd plugin.
> >
> > Is this supposed to happen like this?
> >
> > thanx
> > Rolf
> >
>
> Do you have an example that you can share with us?
>
> --
> Dennis Lundberg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
I've tried, but have not been able to get a build to fail using the
settings you provided. I don't even get a "BUILD FAILED" let alone a
stack trace, even though the error count is high in the generated report.
You seem to be using version 2.1. Could you please try using the latest
snapshot?
--
Dennis Lundberg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]