On your first point, that checkstyle did not run when you execute mvn package, 
that is completely true, since verify comes after package.

I don't know why it did not fail. Are you sure, you're using the latest version 
of the checkstyle plugin. Always version your plugins in your pom. The latest 
is version 2.2.

The option failOnViolation defaults to true and the option violationSeverity 
defaults to error. Are you sure you're seeing errors and not warnings?

Hth,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



-----Original Message-----
From: Jeroen Verhagen [mailto:[EMAIL PROTECTED]
Sent: Thu 6/26/2008 13:42
To: Maven Users List
Subject: Re: Enforce Checkstyle using Maven?
 
Thanks for your reply,

On Thu, Jun 26, 2008 at 11:52 AM,  <[EMAIL PROTECTED]> wrote:
> Yes, that is possible with the checkstyle:check goal [1].

I tried to use the checkstyle plugin like this:

<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-checkstyle-plugin</artifactId>
      <configuration>
        <configLocation>
          http://our-server:8080/checkstyle/mpoCheckstyleConfig.xml
        </configLocation>
      </configuration>
      <executions>
        <execution>
          <phase>verify</phase>
          <goals>
            <goal>check</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>

However when I run 'mvn package' I don't see that Checkstyle is run
and when I run 'mvn verify' explicitly Checkstyle is run but it
doesn't report errors even though when I run 'mvn checkstyle:check'
manually it reports 7 errors!

What could be causing this problem?


-- 

regards,

Jeroen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to