You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Allison, Bob" <ro...@qwest.com> on 2005/09/06 21:49:13 UTC

[m2] Question About Checkstyle Property Specification

In our m102 environment, we have a style.xml file and a header.java file
at the top directory of the build tree.  The top-level directory's
project.xml contains the settings for all subprojects, including the
reports to be generated in each project.  To be able to perform style
checking on each subproject (which is two levels below the top level),
the project.properties at the top level contains:
   maven.checkstyle.properties=${basedir}/../../style.xml
   maven.checkstyle.header.file=${basedir}/../../header.java
Unfortunately, this has the side effect that if any projects in the
directories just below the top level has Java code in it, we cannot
generate documentation for the project since the pointers in the two
properties shown above don't point to the correct directory.

In the m2 checkstyle plugin, I noticed that there is a parameter named
"propertiesURL" which would seem to allow me to use a URL rather than
file reference so that all of the subprojects can reference the same
file.  If I try to use this parameter, however, I get an exception:
   Cannot assign configuration entry 'propertiesURL' to 'class
java.net.URL' from 'http://host.name/m2/style.xml', which is of type
class java.lang.String

Is there a means to set a filename parameter relative to the top-level
project in such a way as to allow subprojects in other directories to
inherit the filename and use the file without having to know the path to
the parent project?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [m2] Question About Checkstyle Property Specification

Posted by Edwin Punzalan <ep...@exist.com>.
when setting the URL in the configuration, try this:

    <propertiesURL 
implementation="java.net.URL">http://host.name/m2/style.xml</propertiesURL>


This may become a problem, I guess we should change the parameter to String.


Allison, Bob wrote:

>In our m102 environment, we have a style.xml file and a header.java file
>at the top directory of the build tree.  The top-level directory's
>project.xml contains the settings for all subprojects, including the
>reports to be generated in each project.  To be able to perform style
>checking on each subproject (which is two levels below the top level),
>the project.properties at the top level contains:
>   maven.checkstyle.properties=${basedir}/../../style.xml
>   maven.checkstyle.header.file=${basedir}/../../header.java
>Unfortunately, this has the side effect that if any projects in the
>directories just below the top level has Java code in it, we cannot
>generate documentation for the project since the pointers in the two
>properties shown above don't point to the correct directory.
>
>In the m2 checkstyle plugin, I noticed that there is a parameter named
>"propertiesURL" which would seem to allow me to use a URL rather than
>file reference so that all of the subprojects can reference the same
>file.  If I try to use this parameter, however, I get an exception:
>   Cannot assign configuration entry 'propertiesURL' to 'class
>java.net.URL' from 'http://host.name/m2/style.xml', which is of type
>class java.lang.String
>
>Is there a means to set a filename parameter relative to the top-level
>project in such a way as to allow subprojects in other directories to
>inherit the filename and use the file without having to know the path to
>the parent project?
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>For additional commands, e-mail: dev-help@maven.apache.org
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org