A few comments:
1. There are numerous software packages available (many free) that
allow you to access a file in SCM with a web url. So you could install
ViewVC or another and still access the file in SCM from a HTTP URL.

2. You can package your Checkstyle configuration in a Jar which you
then reference as a dependency in this project. So you'd make another
Maven2 project, assign it a version, package and install/deploy it,
and then reference it in your other projects with <plugin>...
checkstyle... <dependencies><dependency>your jar here</>.

Wayne

On 5/17/07, Tim Foster <[EMAIL PROTECTED]> wrote:
Newbie here.  We have a checkstyle config file that we would like for
all modules within the project hierarchy to use.  Our plan was to store
the config file in a 'buildtools' subdirectory at the top of the project
hierarchy and reference it from the top-level pom.xml file as such:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-checkstyle-plugin</artifactId>
   <configuration>
       <configLocation>./buildtools/checkstyle.xml</configLocation>
   </configuration>
</plugin>

The problem is that I don't know how to specify the path so that it is
always computed correctly for the current level of the hierarchy.  That
is, this setup only works for the top-level POM, while the
<configLocation> path is wrong for the lower-level ones.  I tried using
the ${basedir} variable, but the value of it changes depending upon the
level of the hierarchy.  What I would like is a variable with a value of
the relative path to the top-level directory.

The only way we've been able to get this to work is to store the file in
our internal repository and reference by an absolute url as such:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-checkstyle-plugin</artifactId>
   <configuration>
<configLocation>http://mavenrepo:8080/internal/checkstyle/checkstyle.xml
</configLocation>
   </configuration>
</plugin>

But, I would rather manage this config file in the source control
system.  Of course this problem is not unique to checkstyle as the same
issue exists for any file that needs to be shared across the hierarchy.
Is there a way compute a variable to contain the value of the path
relative to the top-level pom directory?  Or is there a better way to
achieve what I'm trying to do?

Thanks,

Tim


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to