📚
Maven/Gradleでプラグインの依存関係を確認する
Maven/Gradleで利用しているプラグインの依存関係を確認する方法です。
Maven
mvn dependency:resolve-plugins
を利用します。
$ mvn dependency:resolve-plugins
[INFO] org.springframework.boot:spring-boot-maven-plugin:maven-plugin:2.6.3:runtime
[INFO] org.springframework.boot:spring-boot-maven-plugin:jar:2.6.3
[INFO] org.springframework.boot:spring-boot-buildpack-platform:jar:2.6.3
[INFO] com.fasterxml.jackson.core:jackson-databind:jar:2.13.1
[INFO] com.fasterxml.jackson.core:jackson-annotations:jar:2.13.1
[INFO] com.fasterxml.jackson.core:jackson-core:jar:2.13.1
[INFO] com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.13.1
[INFO] net.java.dev.jna:jna-platform:jar:5.7.0
[INFO] net.java.dev.jna:jna:jar:5.7.0
[INFO] org.apache.commons:commons-compress:jar:1.21
[INFO] org.apache.httpcomponents:httpclient:jar:4.5.13
[INFO] org.apache.httpcomponents:httpcore:jar:4.4.13
[INFO] commons-codec:commons-codec:jar:1.11
[INFO] org.springframework:spring-core:jar:5.3.15
[INFO] org.springframework:spring-jcl:jar:5.3.15
[INFO] org.tomlj:tomlj:jar:1.0.0
[INFO] org.antlr:antlr4-runtime:jar:4.7.2
[INFO] com.google.code.findbugs:jsr305:jar:3.0.2
[INFO] org.springframework.boot:spring-boot-loader-tools:jar:2.6.3
[INFO] org.apache.maven.shared:maven-common-artifact-filters:jar:3.2.0
[INFO] org.apache.maven:maven-artifact:jar:3.1.1
[INFO] org.apache.maven:maven-model:jar:3.1.1
[INFO] org.apache.maven:maven-core:jar:3.1.1
[INFO] org.apache.maven:maven-settings:jar:3.1.1
[INFO] org.apache.maven:maven-settings-builder:jar:3.1.1
[INFO] org.apache.maven:maven-repository-metadata:jar:3.1.1
[INFO] org.apache.maven:maven-model-builder:jar:3.1.1
[INFO] org.apache.maven:maven-aether-provider:jar:3.1.1
[INFO] org.eclipse.aether:aether-spi:jar:0.9.0.M2
[INFO] org.eclipse.aether:aether-impl:jar:0.9.0.M2
[INFO] org.codehaus.plexus:plexus-interpolation:jar:1.19
[INFO] org.codehaus.plexus:plexus-component-annotations:jar:1.5.5
[INFO] org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3
[INFO] org.sonatype.plexus:plexus-cipher:jar:1.4
[INFO] commons-io:commons-io:jar:2.6
[INFO] org.eclipse.aether:aether-api:jar:0.9.0.M2
[INFO] org.eclipse.aether:aether-util:jar:0.9.0.M2
[INFO] org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.0.0.M5
[INFO] org.sonatype.sisu:sisu-guice:jar:no_aop:3.1.0
[INFO] aopalliance:aopalliance:jar:1.0
[INFO] org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.0.0.M5
[INFO] org.apache.maven.shared:maven-shared-utils:jar:3.3.3
[INFO] org.apache.maven:maven-plugin-api:jar:3.6.3
[INFO] org.codehaus.plexus:plexus-utils:jar:3.2.1
[INFO] org.codehaus.plexus:plexus-classworlds:jar:2.6.0
[INFO] org.sonatype.plexus:plexus-build-api:jar:0.0.7
[INFO] org.apache.maven.plugins:maven-shade-plugin:jar:3.2.4
[INFO] org.apache.maven.shared:maven-artifact-transfer:jar:0.12.0
[INFO] org.slf4j:slf4j-api:jar:1.7.5
[INFO] org.ow2.asm:asm:jar:8.0
[INFO] org.ow2.asm:asm-commons:jar:8.0
[INFO] org.ow2.asm:asm-tree:jar:8.0
[INFO] org.ow2.asm:asm-analysis:jar:8.0
[INFO] org.jdom:jdom2:jar:2.0.6
[INFO] org.apache.maven.shared:maven-dependency-tree:jar:3.0.1
[INFO] org.vafer:jdependency:jar:2.4.0
[INFO] org.ow2.asm:asm-util:jar:8.0
[INFO] com.google.guava:guava:jar:28.2-android
[INFO] com.google.guava:failureaccess:jar:1.0.1
[INFO] com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava
[INFO] org.checkerframework:checker-compat-qual:jar:2.5.5
[INFO] com.google.errorprone:error_prone_annotations:jar:2.3.4
[INFO] com.google.j2objc:j2objc-annotations:jar:1.3
[INFO] org.apache.commons:commons-lang3:jar:3.7
Gradle
gradlew buildEnvironment
を利用します。
$ ./gradlew buildEnvironment
classpath
+--- org.springframework.boot:org.springframework.boot.gradle.plugin:2.6.3
| \--- org.springframework.boot:spring-boot-gradle-plugin:2.6.3
| +--- org.springframework.boot:spring-boot-buildpack-platform:2.6.3
| | +--- com.fasterxml.jackson.core:jackson-databind:2.13.1
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.13.1
| | | | \--- com.fasterxml.jackson:jackson-bom:2.13.1
| | | | +--- com.fasterxml.jackson.core:jackson-annotations:2.13.1 (c)
| | | | +--- com.fasterxml.jackson.core:jackson-core:2.13.1 (c)
| | | | +--- com.fasterxml.jackson.core:jackson-databind:2.13.1 (c)
| | | | \--- com.fasterxml.jackson.module:jackson-module-parameter-names:2.13.1 (c)
| | | +--- com.fasterxml.jackson.core:jackson-core:2.13.1
| | | | \--- com.fasterxml.jackson:jackson-bom:2.13.1 (*)
| | | \--- com.fasterxml.jackson:jackson-bom:2.13.1 (*)
| | +--- com.fasterxml.jackson.module:jackson-module-parameter-names:2.13.1
| | | +--- com.fasterxml.jackson.core:jackson-core:2.13.1 (*)
| | | +--- com.fasterxml.jackson.core:jackson-databind:2.13.1 (*)
| | | \--- com.fasterxml.jackson:jackson-bom:2.13.1 (*)
| | +--- net.java.dev.jna:jna-platform:5.7.0
| | | \--- net.java.dev.jna:jna:5.7.0
| | +--- org.apache.commons:commons-compress:1.21
| | +--- org.apache.httpcomponents:httpclient:4.5.13
| | | +--- org.apache.httpcomponents:httpcore:4.4.13
| | | \--- commons-codec:commons-codec:1.11
| | +--- org.springframework:spring-core:5.3.15
| | | \--- org.springframework:spring-jcl:5.3.15
| | \--- org.tomlj:tomlj:1.0.0
| | +--- org.antlr:antlr4-runtime:4.7.2
| | \--- com.google.code.findbugs:jsr305:3.0.2
| +--- org.springframework.boot:spring-boot-loader-tools:2.6.3
| | +--- org.apache.commons:commons-compress:1.21
| | \--- org.springframework:spring-core:5.3.15 (*)
| +--- io.spring.gradle:dependency-management-plugin:1.0.11.RELEASE
| +--- org.apache.commons:commons-compress:1.21
| \--- org.springframework:spring-core:5.3.15 (*)
\--- io.spring.dependency-management:io.spring.dependency-management.gradle.plugin:1.0.11.RELEASE
\--- io.spring.gradle:dependency-management-plugin:1.0.11.RELEASE
Discussion