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)
Signup
Maven 2.x Checkstyle Plugin
  • Maven 2.x Checkstyle Plugin
  • MCHECKSTYLE-70

Support for multiple source folders

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 2.1
  • Fix Version/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

It would be great if this plugin would support multiple source folders added by http://mojo.codehaus.org/build-helper-maven-plugin/ (or similar), and by default inspect sources from these folders instead of just $

{project.build.sourceDirectory}

. Correspondingly with respect to test sources if those are configured to be included.

There are other plugins available solving this problem (somehow), eg:

  • http://mojo.codehaus.org/jdepend-maven-plugin/
  • http://mojo.codehaus.org/findbugs-maven-plugin/

Maybe they can give some inspiration for how to make this possible?

Issue Links

is duplicated by

Wish - General wishlist item MCHECKSTYLE-77 Allow multiple sources directories in input

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Jan Palmquist added a comment - 17/Feb/07 10:21 AM

Many other plugins have the same limitation, and after looking at the pmd-plugin, I found a way to solve my issue temporarily simply letting <sourceDirectory> point to the parent project src/main instead of pointing to src/main/java.
This, however, breaks the xref-links since the src/main is not the actual source folder.
In my case, I have an additional source folder src/main/java-generated holding generated source code which I wan't to be separated from the hand written source in order to delete it whenever I run mvn clean...

Show
Jan Palmquist added a comment - 17/Feb/07 10:21 AM Many other plugins have the same limitation, and after looking at the pmd-plugin, I found a way to solve my issue temporarily simply letting <sourceDirectory> point to the parent project src/main instead of pointing to src/main/java. This, however, breaks the xref-links since the src/main is not the actual source folder. In my case, I have an additional source folder src/main/java-generated holding generated source code which I wan't to be separated from the hand written source in order to delete it whenever I run mvn clean...
Hide
Permalink
Michael Tamm added a comment - 28/Mar/07 7:14 AM

src/main/resources should also be included a a source directory by default, and the default for the includes configuration should be "*/.java,*/.properties" - otherwise the <module name="Translation" /> (see http://checkstyle.sourceforge.net/config_misc.html#Translation) does not work.

Show
Michael Tamm added a comment - 28/Mar/07 7:14 AM src/main/resources should also be included a a source directory by default, and the default for the includes configuration should be "* / .java,* / .properties" - otherwise the <module name="Translation" /> (see http://checkstyle.sourceforge.net/config_misc.html#Translation ) does not work.
Hide
Permalink
Dennis Lundberg added a comment - 03/Feb/08 9:40 AM

Michael,

With the solution of MCHECKSTYLE-40, your problem should be solved. Please try the latest 2.2-SNAPSHOT version.

Show
Dennis Lundberg added a comment - 03/Feb/08 9:40 AM Michael, With the solution of MCHECKSTYLE-40 , your problem should be solved. Please try the latest 2.2-SNAPSHOT version.
Hide
Permalink
Taciano Tres added a comment - 30/Jun/10 5:56 AM

Is this already solved?

Show
Taciano Tres added a comment - 30/Jun/10 5:56 AM Is this already solved?
Hide
Permalink
Anthony Whitford added a comment - 28/Aug/11 6:13 PM

No, I don't see this solved... I think the Checkstyle plugin should ask the MavenProject for its compileSourceRoots. See:

http://maven.apache.org/ref/3.0.3/maven-core/apidocs/org/apache/maven/project/MavenProject.html#getCompileSourceRoots()

Show
Anthony Whitford added a comment - 28/Aug/11 6:13 PM No, I don't see this solved... I think the Checkstyle plugin should ask the MavenProject for its compileSourceRoots. See: http://maven.apache.org/ref/3.0.3/maven-core/apidocs/org/apache/maven/project/MavenProject.html#getCompileSourceRoots( )

People

  • Assignee:
    Unassigned
    Reporter:
    Jan Palmquist
Vote (12)
Watch (9)

Dates

  • Created:
    17/Feb/07 9:46 AM
    Updated:
    28/Aug/11 6:13 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.