Thanks, especially for the TL;DR; :)

On Mon, Oct 6, 2014 at 3:32 PM, Andrew Phillips <aphill...@qrmedia.com> wrote:
> TL;DR: Checkstyle has now been re-enabled on master and will run
> automatically in the validate phase of the Maven build. [1]
>
> For those with 5min to spare, here some more details on what the problem was
> here and how the PR addresses it:
>
> As you probably all know, the project POM [2] is the ultimate "top-level"
> POM for all jclouds projects - not just those in jclouds/jclouds, but also
> in downstream repos such as labs or labs-openstack. It contains the
> "default" build settings to be used by all projects.
>
> Part of those default settings are Checkstyle and, now, Modernizer plugin
> invocations. These require configuration files in the resources project. In
> order for downstream repos to be able to access these files, the default
> configuration for Checkstyle and Modernizer is to depend on the
> jclouds-resources JAR, which bundles up the necessary config.
>
> This works fine for pretty much all projects, but creates two problems:
>
> 1. It introduces a cyclic dependency project -> resources (through the
> plugins) -> project (because resources inherits from project)
> 2. It introduces a self-dependency in resources
>
> 1. is addressed in the following way: the default configuration in the
> project POM is actually split into all the stuff in <build> [3] *and the
> settings in the "not-jclouds-project" profile* [4]. There is another
> profile, "jclouds-project" [5], that contains build settings specific to
> jclouds-project itself, i.e. settings that are *not* to be inherited by
> downstream projects. This profile configures the Checkstyle and Modernizer
> plugins to use local file references, rather then dependencies, to access
> the config files.
>
> 2. is addressed by overriding the inherited configuration in the resources
> POM [6] to, again, reference local files rather than dependencies. For some
> reason, this seems to work, even though 'mvn help:effective-pom' still lists
> the plugins as having the dependencies.
>
> The takeaway here is: if you want to add dependencies to the project POM
> that are built in a jclouds project, please ensure the project that
> *provides* those dependencies is configured in such a way as to avoid
> circular deps.
>
> Regards
>
> ap
>
> [1] https://github.com/jclouds/jclouds/pull/551
> [2] https://github.com/jclouds/jclouds/blob/master/project/pom.xml
> [3] https://github.com/jclouds/jclouds/blob/master/project/pom.xml#L351-L944
> [4]
> https://github.com/jclouds/jclouds/blob/master/project/pom.xml#L1096-L1142
> [5]
> https://github.com/jclouds/jclouds/blob/master/project/pom.xml#L1054-L1095
> [6] https://github.com/jclouds/jclouds/blob/master/resources/pom.xml#L44-L67

Reply via email to