简体   繁体   中英

Disable download for a single dependency

I am downright annoyed because the Quartz release I'm importing does not have a proper POM file deployed ( maven repo ).

Therefore maven dutifully tries to download it on every build .

Downloading: http://repo1.maven.org/maven2/opensymphony/quartz/1.6.3/quartz-1.6.3.pom

I'd like to skip this step but without going completely offline since that is useful.

Ideas?

Add an additional repository, with this artifact and make sure the POM is correct. This way the main repo POM will be overridden. You can run repository manager such as artifactory or nexus locally

如果它是实际上不需要的传递依赖,那么您可以使用<exclude />元素来实现此目的。

You could host the POM in a local repository manager, or in your local repository. If it's really bugging you I'd recommend contacting the project team and asking them to fix their metadata or raising a request directly against the central repository with your own fix. Details on how to raise a request can be found here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM