jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x Checkstyle Plugin
  • MCHECKSTYLE-27

checktyle:check does not use custom checkstyle xml files when used in a multiproject mode with a build-tools project passed as a plugin dependency

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: None
  • Labels:
    None

Description

Here's the config I have:

<build>
    <plugins>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-build-tools</artifactId>
            <version>0.8-SNAPSHOT</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <configuration>
              <configLocation>build-tools/checkstyle.xml</configLocation>
              <headerLocation>build-tools/checkstyle.license</headerLocation>
              <suppressionsLocation>build-tools/checkstyle-suppressions.xml</suppressionsLocation>
            </configuration>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

When i run the project I get lots of checkstyle errors due to the fact that checkstyle is using the default rules and not my projcect's.

Note that I have created a build-tools project as defined in tips.apt.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Vincent Massol added a comment - 01/Feb/06 2:18 PM

I just wanted to say that I have tried it again with checkstyle plugin v2.0 and it's not working any better....

Show
Vincent Massol added a comment - 01/Feb/06 2:18 PM I just wanted to say that I have tried it again with checkstyle plugin v2.0 and it's not working any better....
Hide
Permalink
Edwin Punzalan added a comment - 27/Mar/06 4:07 AM

The above configuration fails because the configuration tag is within the the executions of the goal "check" which does not have any parameters for configLocation and the others.

The right way to do this is to put the configuration outside the <executions> so that when the goal "check" calls "checkstyle" then the checkstyle goal will get the configuration.

Show
Edwin Punzalan added a comment - 27/Mar/06 4:07 AM The above configuration fails because the configuration tag is within the the executions of the goal "check" which does not have any parameters for configLocation and the others. The right way to do this is to put the configuration outside the <executions> so that when the goal "check" calls "checkstyle" then the checkstyle goal will get the configuration.

People

  • Assignee:
    Edwin Punzalan
    Reporter:
    Vincent Massol
Vote (0)
Watch (1)

Dates

  • Created:
    31/Dec/05 3:34 AM
    Updated:
    28/Mar/06 11:11 PM
    Resolved:
    27/Mar/06 4:07 AM

Time Tracking

Estimated:
2h
Original Estimate - 2 hours
Remaining:
2h
Remaining Estimate - 2 hours
Logged:
Not Specified
Time Spent - Not Specified
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.