• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to set an output directory

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • 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: 227
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic