• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

How to set an output directory

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know nothing about Maven. But I am working through a tutorial that includes a pom.xml. Inside are listed all the dependant jars. When I run maven I cannot see where it downloads all the jars to. How can I specify a directory to which maven will put all the jars it downloads?
 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Friend

If it is WIndows machine
C:\documents and settings\<LOGON ID>\.maven\repository
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is called the 'local repository' in Maven. If you want to specify a different directory, in your %USER_HOME%\.m2 directory create a file called 'settings.xml' and place the following in it:


if you want your repository to be in C:\.m2 (or you can specify any other location). On a windows machine, you may actually have to do this because of the spaces in the path of the default repository location - it causes some plugins to throw weird errors like 'and is not a recognized protocol' - because of file:///Documents *and* Settings/....)
 
Rusty Enisin
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey. Thanks. That really helps. I also found that I just needed to run "mvn package" and it would put everything in a directory called "target". And it compiled the .war file. Very smooth tool once you figure out how to use it.
 
Your mind is under my control .... your will is now mine .... read this tiny ad
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic