• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

stop downloading libraries everytime

 
Ranch Hand
Posts: 400
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Folks,

How to stop downloading the libraries(mentioned into pom) every time when you run/compile/test the project??


 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If it's downloading *every* time then something is wrong--once the library is in your local repository it shouldn't need to download anything unless a dependency changes.
 
Minhaj Mehmood
Ranch Hand
Posts: 400
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:If it's downloading *every* time then something is wrong--once the library is in your local repository it shouldn't need to download anything unless a dependency changes.



yes it's download everytime and that's making my compilation process too slow!!


what could be the problem any hint??
 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
mvn dependency:go-offline
This is to prepare for compiling off-line
mvn <phase or goal> -o
This to instruct Maven to run in off-line mode
 
Minhaj Mehmood
Ranch Hand
Posts: 400
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

John Todd wrote:\
mvn <phase or goal> -o
This to instruct Maven to run in off-line mode



GREAT HELP!! THANK YOU JOHN
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It still shouldn't be downloading every time, and depending on how the POM is set up, this might not be the desired solution, though.
 
Hussein Baghdadi
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not a Maven ninja but I think Maven will try to reach the internet every time, it may not download a dependency but it will hit the network any way.
This is why I run the two previous commands when using Maven.
Any way, I'm investing a little in Gradle build tool these days, I think it is more practical than Ant, Gant and Maven
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, it'll go to the network--that's its job. But it shouldn't download the dependencies each time, unless both (a) the dependency versions aren't explicitly listed in the POM (in which case it will get latest) and (b) the dependencies are wildly updating themselves (possible, but not probable). Or something's wrong with the local repository and it's getting cleaned out over and over (more probable than (b)).

IMO something's wrong with the OP's setup and/or POM and/or cmdline. Going offline is certainly a solution, but may not be the most desirable one--that's all I'm saying.
 
reply
    Bookmark Topic Watch Topic
  • New Topic