Hi Dennis, Done:
http://jira.codehaus.org/browse/MCHECKSTYLE-99 Title: <includeTestSourceDirectory> should use default test sources xref output dir: ${project.reporting.outputDirectory}/xref-test http://jira.codehaus.org/browse/MCHECKSTYLE-100 Title: Using <includeTestSourceDirectory> element truncates xref link to "production" (non-test) classes Thanks, Dan Subject: Re: [m2] maven-checkstyle-plugin, v2.2 - includeTestSourceDirectory, xref links broken From: Dennis Lundberg <[EMAIL PROTECTED]> Date: Thu, 31 Jul 2008 21:08:42 +0200 To: Maven Users List <[email protected]> Hi Dan Please file these as 2 different issues for the Checkstyle Plugin: http://jira.codehaus.org/browse/MCHECKSTYLE Please include a complete pom.xml for each one, as it helps us to debug that particular issue. Dan Rollo wrote: > I have configured the reporting section of my pom.xml to include the jxr > report AND the checkstyle report (with the <includeTestSourceDirectory> > element) as shown below: > > <!-- generates a cross-reference of the project's sources --> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-jxr-plugin</artifactId> > <version>2.1</version> > </plugin> > > <!-- generates report regarding the code style --> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-checkstyle-plugin</artifactId> > <version>2.2</version> > <configuration> > <!-- based on config/sun_checks.xml, but also checks for > headers in source files --> > > <configLocation>config/jdbc4olap_checks.xml</configLocation> > > <includeTestSourceDirectory>true</includeTestSourceDirectory> > </configuration> > </plugin> > > > I'm seeing the problems below: > > 1. The xref link to the Source pages in the checkstyle report page is > broken. The source xref link for Unit Test Source files is not using the > default value of the destDir for jxr test sources. From the jxr plugin docs > for jxr:test-jxr: > > destDir > > Folder where the Xref files will be copied to. > > * Type: java.lang.String > * Required: No > * Expression: ${project.reporting.outputDirectory}/xref-test > > I think the checkstyle plugin should: > - assume the default dir for jxr:test-jxr > - provide it's own additional override setting (similar to xrefLocation, > but for test sources). like: testXrefLocation. > > 2. When I include the <includeTestSourceDirectory> element, the source xref > link for "production" (non-test) classes has a mangled URL: the first letter > of the package is ommitted in the link: > file:///.../jdbc4olap/target/site/xref/org/jdbc4olap/xmla/XmlaProperties.html#10 > <missing "o" or "org"> > file:///.../jdbc4olap/target/site/xref/rg/jdbc4olap/xmla/XmlaProperties.html#10 > > If I remove the <includeTestSourceDirectory> element, the xref links to > production sources are fine. > > [BTW, there is a LICENSE.txt file at the root of my project (in case anyone > thought a missing default header file would affect this), and the checkstyle > report properly flags missing headers.] > > I searched for prior posts and jira issues about this, but found none. Is > this a known issue? Should I file a jira? Any ideas on a workaround that > would allow me to both <includeTestSourceDirectory> AND link to sources? > > Thanks, > Dan > -- Dennis Lundberg
