maven-dependency

Systematic approach with Maven to deal with dependency hell

北城余情 提交于 2019-11-27 13:53:40
问题 I'm struggling with how to approach jar dependency hell. I have a Maven-IntelliJ Scala project that uses some aws sdk's. Recently adding the kinesis sdk has introduced incompatible versions of Jackson. My question is : how do I systemically approach the problem of Jar hell? I understand class loaders and how maven chooses between duplicate Jars, but I am still at a loss regarding actual practical steps to fix the issue. My attempts at the moment are based on trial and error, and I am

Maven: Command to update repository after adding dependency to POM

假装没事ソ 提交于 2019-11-27 02:22:42
I've added a new dependency to my POM. Is there a simple command I can run to download this dependency to my repository? mvn install (or mvn package ) will always work. You can use mvn compile to download compile time dependencies or mvn test for compile time and test dependencies but I prefer something that always works. Andrew Spencer If you want to only download dependencies without doing anything else, then it's: mvn dependency:resolve Or to download a single dependency: mvn dependency:get -Dartifact=groupId:artifactId:version If you need to download from a specific repository, you can

Maven: Command to update repository after adding dependency to POM

半腔热情 提交于 2019-11-26 10:05:24
问题 I\'ve added a new dependency to my POM. Is there a simple command I can run to download this dependency to my repository? 回答1: mvn install (or mvn package ) will always work. You can use mvn compile to download compile time dependencies or mvn test for compile time and test dependencies but I prefer something that always works. 回答2: If you want to only download dependencies without doing anything else, then it's: mvn dependency:resolve Or to download a single dependency: mvn dependency:get