Hi!

I'm working on JCLOUDS-149 [1] to make the checkstyle configuration
available to all repos. There are three options:

1. Copy the configuration to all repos (not maintainable).
2. Use a public URL pointing to the ckeckstyle.xml (offline builds
won't be able to run checkstyle).
3. Add the checkstyle.xml to the class path and reference it in the
maven-checkstyle-plugin configuration.

I've made some changes in the jclouds-resources [2] project to include
the checkstyle.xml in the generated jar, so it can be read from all
repos. This configuration works for the other repos (I've tried it
with jclouds-chef), but not entirely for the main repo. I'm quite
blocked here, so let's summon the Maven gurus:

In order to use the checkstyle.ml config from the classpath, the
maven-checkstyle-plugin must declare the jclouds-resources dependency
in its configuration. The problem is that the plugin is configured in
the jclouds-project, which is the parent pom, and that means the
jclouds-project needs to have the jclouds-resources.jar in the maven
repo *before* it can be actually built, and this is where the build
breaks.

I haven't figured out how to properly configure this (if possible).
Another option could be to reference file in the main repo as a local
file, and override the maven-checkstyle-plugin configuration in every
repo to use the one in the class path. That should work *but* that
means overriding the plugin config in every pom.xml that inherits from
jclouds-project (and this is every single maven project in labs, which
is not practical).


Does anyone have a better approach or ideas?


Thanks!


[1] https://issues.apache.org/jira/browse/JCLOUDS-149
[2] 
https://github.com/nacx/jclouds/commit/02199355b959bedea87f88f138503702ce549ada

Reply via email to