maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [maven-checkstyle-plugin] zregvart commented on issue #5: [MCHECKSTYLE-353] - Don't resolve any dependencies
Date Fri, 05 Apr 2019 09:34:24 GMT
zregvart commented on issue #5: [MCHECKSTYLE-353] - Don't resolve any dependencies
URL: https://github.com/apache/maven-checkstyle-plugin/pull/5#issuecomment-480211964
 
 
   @eolivelli I made my tests, here's what I've found:
   
   To prepare for the tests:
   
    1. installed the maven-checkstyle-plugin to an empty directory that will serve as a local
Maven repository (`/tmp/no-dep`):
   
           $ git clone https://github.com/zregvart/maven-checkstyle-plugin.git
           $ cd maven-checkstyle-plugin
           $ git checkout no-dep # this PR
           $ mvn install -Dmaven.repo.local=/tmp/no-dep
   
    1. cloned the apache-camel git repository:
   
           $ git clone https://gitbox.apache.org/repos/asf/camel.git
           $ cd camel
   
    1. to run with `3.0.0-SNAPSHOT` the version from this PR, I've changed `parent/pom.xml`
`maven-checkstyle-plugin-version` property to `3.0.0-SNAPSHOT` and run:
   
           ./mvnw -Dmaven.repo.local=/tmp/no-dep -DskipSpringBootStarters -Psourcecheck checkstyle:check
   
    1. to run with the `3.0.0` released version that requires dependency resolution I made
sure that `parent/pom.xml` `maven-checkstyle-plugin-version` property is set to `3.0.0` and
run:
   
           ./mvnw -Dmaven.repo.local=/tmp/dep -DskipSpringBootStarters -Psourcecheck checkstyle:check
   
   The only difference is the different local Maven repository (`/tmp/dep` and `/tmp/no-dep`)
and the maven-checkstyle-plugin version (released, and from this PR)
   
   In both cases 522 Maven modules are built, without -DskipSpringBootStarters this number
rises to 800.
   
   These are the results:
   
   Without dependencies (3.0.0-SNAPSHOT with PR #5):
    - takes 01:51 min
    - local Maven repository size 102MB (103944 kB)
   
   With dependencies (3.0.0):
    - takes 12:46 min
    - local Maven repository size 1.7GB (1700456 kB)
    - the build fails in one of the examples as it tries to download an artefact that is not
present in the reactor (the build is not executing `package` or `install` phase) and not installed
in the local repository, but is not required to run checkstyle as demonstrated by the build
without dependencies that succeeded.
   
   With that my conclusion is that not only that the dependency resolution increases the build
time simply by downloading 1.6GB of dependencies, but it can also fail the build if we don't
previously install all the dependencies from the project or make them available in a remote
Maven repository.
   
   The 7x difference in execution time simply comes from the fact that unused dependencies
are downloaded.
   
   I still maintain and I argue the point that any dependency needed by the maven-checkstyle-plugin
should not be put in the main `<dependencies>` section of the POM and should be declared
in the `<dependencies>` section of the plugin.
   
   If you think that this might break backward compatibility I'm happy to have this included
in a non-patch release.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message