Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved support for multi-module maven projects #210

Merged
merged 3 commits into from
Feb 26, 2018

Commits on Feb 26, 2018

  1. Improved support for multi-module maven projects

    Some steps in the maven plugin require paths to configuration files.
    For example eclipse formatter and scalafmt. In multi-module maven
    projects it is desirable to specify paths only once and not duplicate
    configs in multiple modules. Each sub-project should not assume
    anything about the general project structure and should not refer to
    files in parent modules using relative paths. It is recommended to
    create a separate module with configuration files and depend on it
    in the plugin. This approach is taken by the Checkstyle and PMD plugins:
    
    http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html
    https://maven.apache.org/plugins/maven-pmd-plugin/examples/multi-module-config.html
    
    Such approach means configuration files no longer live within the
    project and might be inside a JAR. Thus specified value of `<file>`
    require special resolution.
    
    Both Checkstyle and PMD use builtin plexus `ResourceManager` which is
    able to locate files from regular file system, URL or JAR. Located file
    is then copied to the output directory (usually `./target/`) and used as
    a regular file.
    
    This commit makes spotless plugin also use `ResourceManager` in order
    to support multi-module configuration with config files in a dedicated
    module. Every step that contains `<file>` is updated to perform the
    resolution. It is also possible to specify configuration file URLs,
    though this feature is not tested.
    lutovich committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    2cfb63c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    daeba28 View commit details
    Browse the repository at this point in the history
  3. Removed <relativePath> from multi-module test POMs

    It's default value is `..` so no need to be explicit about it.
    lutovich committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    79e5322 View commit details
    Browse the repository at this point in the history