0

I'm using mvn dependency:tree to print out dependency of my project.

I have 2 pom.xml in my project, 1st pom.xml genearates a.jar, 2nd project uses a.jar

I'm removing some unused dependencies from 1st pom.xml. But when I ran mvn dependency:tree on 2nd project, I can see a.jar is in the dependent list, but it still depends on those dependencies already removed from 1st project locally. So I guess when the command is run, a.jar is pulled from the remote repo so it still contains the dependencies removed locally?

If it's true, how to get a dependncy tree from local pom.xml so that all local changes are reflected?

Thanks

2
  • Show us the POM of 2nd project: how does it reference project1? Commented Sep 4, 2023 at 18:48
  • Problem seems to be solved by -o option which run offline Commented Sep 5, 2023 at 12:30

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.