Actually, the checkstyle 4.1 pom was ok.
However the commons-beanutils-core/1.7.0 had a typo in its pom
<version>1.7</version>
it should have been
<version>1.7.0</version>
Carlos has already fixed this.
/* joakim */
Brett Porter wrote:
When checkstyle was upgraded to 4.1, nobody checked the checkstyle POM,
which is a dud. It's missing dependencies.
I'd like to know how that managed to happen. Was it automatically synced in?
- Brett
Vincent Massol wrote:
Hi,
I'm trying to set up the m2 checkstyle plugin so that my build will fail in
case of violations. I've read the tips.apt file and I have created a
build-tools/ project.
Here's the content of my parent pom.xml file:
<build>
<extensions>
<extension>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-build-tools</artifactId>
<version>0.7-SNAPSHOT</version>
</extension>
</extensions>
<plugins>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<executions>
<execution>
<configuration>
<configLocation>build-tools/checkstyle.xml</configLocation>
<headerLocation>build-tools/checkstyle.license</headerLocation>
<suppressionsLocation>build-tools/checkstyle-suppressions.xml</suppressionsL
ocation>
</configuration>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
When I run this, I get:
C:\dev\cargo\trunk\core\api\util>mvn clean install
[...]
[INFO] [jar:jar]
[INFO] Building jar:
C:\dev\cargo\trunk\core\api\util\target\cargo-core-api-util-0.7-SNAPSHOT.jar
[INFO] Preparing checkstyle:check
[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] Velocity successfully started.
[INFO] [checkstyle:checkstyle]
[INFO]
----------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
----------------------------------------------------------------------------
[INFO] org/apache/commons/beanutils/Converter
[INFO]
----------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError: org/apache/commons/beanutils/Converter
at
org.apache.maven.plugin.checkstyle.CheckstyleReport.executeCheckstyle(Checks
tyleReport.java:620)
at
org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(Checkstyle
Report.java:457)
[...]
Any idea what I'm doing wrong?
Has anyone succeeded in implementing this use case (which IMO is the only
valid use case when it comes to using checkstyle in a build - Reports are
not really useful)?
Thanks
-Vincent
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]