You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dan Rollo <da...@gmail.com> on 2008/07/31 20:07:40 UTC
[m2] maven-checkstyle-plugin, v2.2 - includeTestSourceDirectory, xref links broken
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
Re: [m2] maven-checkstyle-plugin, v2.2 - includeTestSourceDirectory,
xref links broken
Posted by Dennis Lundberg <de...@apache.org>.
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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org