question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Error] Unable to resolve all the dependencies.

See original GitHub issue

Hi,

First of all, thanks for coming up with such a great idea of a Maven plugin. Love it!

Running the plugin as described in the Readme.md with versions 1.1.0 and 1.1.2 leads always to the error message [Error] Unable to resolve all the dependencies.

Running Maven in debug mode with -X did not really help … any idea what could be wrong? I tried to declare the plugin in the pom but also just ran the plugin directly from the command line with all the params in the CLI.

Btw. we develop the apps in an enterprise setup where we have proxies, self-signed certs and so on.

Best, Patrick

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15

github_iconTop GitHub Comments

1reaction
patbaumgartnercommented, Jan 25, 2021

Thanks @cesarsotovalero

It works now, but the result is not satisfying. Anyhow, wow! I am impressed! 👍

C:\Users\myUser\Downloads\demo>mvn se.kth.castor:depclean-maven-plugin:1.1.2-SNAPSHOT:depclean
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< com.example:demo >--------------------------
[INFO] Building demo 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- depclean-maven-plugin:1.1.2-SNAPSHOT:depclean (default-cli) @ demo ---
-------------------------------------------------------
[INFO] Starting DepClean dependency analysis
-------------------------------------------------------
DIRECT DEPENDENCIES: [org.springframework.boot:spring-boot-starter-web:jar:2.4.2:compile, org.springframework.boot:spring-boot-starter-test:jar:2.4.2:test]
-------------------------------------------------------
TRANSITIVE DEPENDENCIES: [org.springframework.boot:spring-boot-starter:jar:2.4.2:compile, org.springframework.boot:spring-boot:jar:2.4.2:compile, org.springframework.boot:spring-boot-autoconfigure:jar:2.4.2:compile, org.springframework.boot:spring-boot-starter-logging:jar:2.4.2:compile, ch.qos.logback:logback-classic:jar:1.2.3:compile, ch.qos.logback:logback-core:jar:1.2.3:compile, org.apache.logging.log4j:log4j-to-slf4j:jar:2.13.3:compile, org.apache.logging.log4j:log4j-api:jar:2.13.3:compile, org.slf4j:jul-to-slf4j:jar:1.7.30:compile, jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile, org.yaml:snakeyaml:jar:1.27:compile, org.springframework.boot:spring-boot-starter-json:jar:2.4.2:compile, com.fasterxml.jackson.core:jackson-databind:jar:2.11.4:compile, com.fasterxml.jackson.core:jackson-annotations:jar:2.11.4:compile, com.fasterxml.jackson.core:jackson-core:jar:2.11.4:compile, com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.11.4:compile, com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.11.4:compile, com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.11.4:compile, org.springframework.boot:spring-boot-starter-tomcat:jar:2.4.2:compile, org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.41:compile, org.glassfish:jakarta.el:jar:3.0.3:compile, org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.41:compile, org.springframework:spring-web:jar:5.3.3:compile, org.springframework:spring-beans:jar:5.3.3:compile, org.springframework:spring-webmvc:jar:5.3.3:compile, org.springframework:spring-aop:jar:5.3.3:compile, org.springframework:spring-context:jar:5.3.3:compile, org.springframework:spring-expression:jar:5.3.3:compile, org.springframework.boot:spring-boot-test:jar:2.4.2:test, org.springframework.boot:spring-boot-test-autoconfigure:jar:2.4.2:test, com.jayway.jsonpath:json-path:jar:2.4.0:test, net.minidev:json-smart:jar:2.3:test, net.minidev:accessors-smart:jar:1.2:test, org.ow2.asm:asm:jar:5.0.4:test, org.slf4j:slf4j-api:jar:1.7.30:compile, jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:test, jakarta.activation:jakarta.activation-api:jar:1.2.2:test, org.assertj:assertj-core:jar:3.18.1:test, org.hamcrest:hamcrest:jar:2.2:test, org.junit.jupiter:junit-jupiter:jar:5.7.0:test, org.junit.jupiter:junit-jupiter-api:jar:5.7.0:test, org.apiguardian:apiguardian-api:jar:1.1.0:test, org.opentest4j:opentest4j:jar:1.2.0:test, org.junit.platform:junit-platform-commons:jar:1.7.0:test, org.junit.jupiter:junit-jupiter-params:jar:5.7.0:test, org.junit.jupiter:junit-jupiter-engine:jar:5.7.0:test, org.junit.platform:junit-platform-engine:jar:1.7.0:test, org.mockito:mockito-core:jar:3.6.28:test, net.bytebuddy:byte-buddy:jar:1.10.19:test, net.bytebuddy:byte-buddy-agent:jar:1.10.19:test, org.objenesis:objenesis:jar:3.1:test, org.mockito:mockito-junit-jupiter:jar:3.6.28:test, org.skyscreamer:jsonassert:jar:1.5.0:test, com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test, org.springframework:spring-core:jar:5.3.3:compile, org.springframework:spring-jcl:jar:5.3.3:compile, org.springframework:spring-test:jar:5.3.3:test, org.xmlunit:xmlunit-core:jar:2.7.0:test]
-------------------------------------------------------
USED DEPENDENCIES: []
-------------------------------------------------------
 D E P C L E A N   A N A L Y S I S   R E S U L T S
-------------------------------------------------------
USED DIRECT DEPENDENCIES [0]:
USED INHERITED DEPENDENCIES [0]:
USED TRANSITIVE DEPENDENCIES [0]:
POTENTIALLY UNUSED DIRECT DEPENDENCIES [2]:
        org.springframework.boot:spring-boot-starter-web:2.4.2:compile (4 KB)
        org.springframework.boot:spring-boot-starter-test:2.4.2:test (4 KB)
POTENTIALLY UNUSED INHERITED DEPENDENCIES [0]:
POTENTIALLY UNUSED TRANSITIVE DEPENDENCIES [58]:
        org.assertj:assertj-core:3.18.1:test (4 MB)
        net.bytebuddy:byte-buddy:1.10.19:test (3 MB)
        org.apache.tomcat.embed:tomcat-embed-core:9.0.41:compile (3 MB)
        org.springframework:spring-web:5.3.3:compile (1 MB)
        org.springframework.boot:spring-boot-autoconfigure:2.4.2:compile (1 MB)
        org.springframework:spring-core:5.3.3:compile (1 MB)
        com.fasterxml.jackson.core:jackson-databind:2.11.4:compile (1 MB)
        org.springframework.boot:spring-boot:2.4.2:compile (1 MB)
        org.springframework:spring-context:5.3.3:compile (1 MB)

Would be great if it could find all jars needed if I start the app. .e.g Tomcat, Spring Context/Beans, etc. should be shown.

0reactions
cesarsotovalerocommented, Jan 25, 2021

Hi @patbaumgartner,

Is there a possibility to add hints like for Spring Boot with the web-starter that we could add the embedded Tomcat as a mandatory dependency and then we continue the search?

DepClean has an ignoreDependencies parameter to skip the analysis of custom dependencies (see https://github.com/castor-software/depclean#optional-parameters). Since we cannot cover all the possible reflection-based libraries, we prefer to let this decision to developers 😄

Would it be possible to search for strings which look like a package, method which is used during reflection and continue the search?

DepClean can detect classes or class members that are created or invoked dynamically using basic constructs such as class.forName("someClass") or class.getMethod("someMethod", null). To do so, DepClean parses the constant pool of the class files (see https://github.com/castor-software/depclean/blob/master/depclean-core/src/main/java/se/kth/depclean/core/analysis/asm/ConstantPoolParser.java#L94-L158)

If you know any other trick to deal with reflection: your contribution is more than welcome!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to resolve dependency for ':app@debug ...
I just figured out how to remove this gradle error, follow the following steps. Go to "File". Click on Invalidate Cache/ Restart.
Read more >
Android Studio “Unable to resolve dependency” Error - Medium
The most of users encounter errors like “Unable to resolve dependency for ':app@debug/ compileClasspath': Could not find any
Read more >
Problem: Unable to resolve dependencies of NuGet packages
Solution. To resolve the problem, perform the following: Clear the NuGet cache files. You do this in the following way:
Read more >
Could not resolve all dependencies - Manjaro Linux Forum
Could not resolve all dependencies ... makepkg -i ==> Making package: packettracer 8.1.1-1 (Tue 24 May 2022 06:05:01 AM MDT) ==> Checking runtime ......
Read more >
Unable to resolve dependency tree error in Angular while ...
To fix Unable to resolve dependency tree error in Angular while installing `npm` packages follow the below steps. 1.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found