Hello

    $ mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:resolve-plugins
    ...
    Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.29/checkstyle-8.29.pom
    Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.29/checkstyle-8.29.pom
 (124 KB at 137.2 KB/sec)
    ...
    Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.29/checkstyle-8.29.jar
    Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.29/checkstyle-8.29.jar
 (1317 KB at 2938.7 KB/sec)
    ...
    [INFO] The following plugins have been resolved:
    [INFO]    
org.apache.maven.plugins:maven-checkstyle-plugin:maven-plugin:3.1.1:runtime
    [INFO]       ...
    [INFO]       com.puppycrawl.tools:checkstyle:jar:8.29
    [INFO]       ...


    $ mvn -o verify
    ...
    [ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-checkstyle-plugin:3.1.1:check (default) on 
project redisson: Execution default of goal 
org.apache.maven.plugins:maven-checkstyle-plugin:3.1.1:check failed: Plugin 
org.apache.maven.plugins:maven-checkstyle-plugin:3.1.1 or one of its 
dependencies could not be resolved: Failed to collect dependencies at 
org.apache.maven.plugins:maven-checkstyle-plugin:jar:3.1.1 -> 
com.puppycrawl.tools:checkstyle:jar:[8.18,): No versions available for 
com.puppycrawl.tools:checkstyle:jar:[8.18,) within specified range -> [Help 1]


Note, usual dependencies were resolved otherwise (when building dependency 
tree),
that's why compilation succeeded in the offline mode.

Full reproduction steps:

    git clone https://github.com/redisson/redisson.git
    cd redisson
     # to be sure we speak of the same version:
    git checkout 2a507699c3208e6856b6fb0f67a8b921718f7945
    # in case you accidentially already have some version of checkstyle.jar
    # that will make the case behave differently:
    rm -r ~/.m2/repository/com/puppycrawl/tools/checkstyle/
    mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:tree
    mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:resolve-plugins
    mvn -o verify

So it seems the dependency:resolve-plugins uses different algorithm for 
dependency
resolution than is used during real build.

BTW, the same can be said about the dependency:resolve / dependency:go-offline
mojos. I have two project that I can build successsfully, successfully generate
dependency tree. But dependency:resolve / dependency:go-offline fail
for them (one of those projects is the above used redisson, try
dependency:resolve on it).

Interestingly, if I remove the -o flag, the build log has this:

Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/maven-metadata.xml
Downloading: 
https://repository.apache.org/snapshots/com/puppycrawl/tools/checkstyle/maven-metadata.xml
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/maven-metadata.xml
 (4 KB at 3.3 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.18/checkstyle-8.18.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.18/checkstyle-8.18.pom
 (123 KB at 718.7 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.19/checkstyle-8.19.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.19/checkstyle-8.19.pom
 (124 KB at 1099.3 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.20/checkstyle-8.20.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.20/checkstyle-8.20.pom
 (123 KB at 1208.4 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.21/checkstyle-8.21.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.21/checkstyle-8.21.pom
 (123 KB at 1274.6 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.22/checkstyle-8.22.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.22/checkstyle-8.22.pom
 (123 KB at 1425.0 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.23/checkstyle-8.23.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.23/checkstyle-8.23.pom
 (123 KB at 827.9 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.24/checkstyle-8.24.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.24/checkstyle-8.24.pom
 (123 KB at 1332.4 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.25/checkstyle-8.25.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.25/checkstyle-8.25.pom
 (122 KB at 1385.3 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.26/checkstyle-8.26.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.26/checkstyle-8.26.pom
 (122 KB at 1310.9 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.27/checkstyle-8.27.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.27/checkstyle-8.27.pom
 (123 KB at 1331.0 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.28/checkstyle-8.28.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.28/checkstyle-8.28.pom
 (122 KB at 1448.8 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.30/checkstyle-8.30.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.30/checkstyle-8.30.pom
 (124 KB at 1361.2 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.31/checkstyle-8.31.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.31/checkstyle-8.31.pom
 (125 KB at 1377.8 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.32/checkstyle-8.32.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.32/checkstyle-8.32.pom
 (125 KB at 1447.3 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.33/checkstyle-8.33.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.33/checkstyle-8.33.pom
 (125 KB at 1367.6 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.34/checkstyle-8.34.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.34/checkstyle-8.34.pom
 (126 KB at 1252.0 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.35/checkstyle-8.35.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.35/checkstyle-8.35.pom
 (127 KB at 1476.1 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.36/checkstyle-8.36.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.36/checkstyle-8.36.pom
 (132 KB at 1373.4 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.36.1/checkstyle-8.36.1.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.36.1/checkstyle-8.36.1.pom
 (132 KB at 1433.2 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.36.2/checkstyle-8.36.2.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.36.2/checkstyle-8.36.2.pom
 (132 KB at 1498.2 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.37/checkstyle-8.37.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.37/checkstyle-8.37.pom
 (132 KB at 1388.3 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.37/checkstyle-8.37.jar
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.37/checkstyle-8.37.jar
 (1576 KB at 2626.5 KB/sec)

Best regards,
- Anton


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to