On a MacBook Pro running Snow Leopard am getting this error in STS 2.3.1 on a "clean package" operation (Run As ...Maven Build....)
Code:
The specified user settings file does not exist: /Users/rdg/.m2/settings.xml
It's a brand new MacBook (my first Mac, I'm a Mac newbie). I thought maybe I could force creation of /Users/rdg/.m2/settings.xml by creating a new directory in a terminal window (outside of STS) and typing:
Code:
mvn archetype:generate (etc)
and creating a dummy maven project. I did that, and it put a lot of things into the local repository, but I can't figure out the location of the local repository where it put the jars.
I don't see a ".m2" directory in Users/rdg. Maybe it's considered a hidden folder the way it is in Windows? Is there a way on a Mac to show folders and file that begin with "."?
Wait... I just discovered the "." folders and files appear in a terminal window via the command "ls -lsa". So the problem is that "." folders and files do not appear in the Mac "finder". Anybody know a way to make "finder" show folders and files that begin with "." ? I will apparently need to create a settings.xml file myself in Users/rdg/.m2.
I could see a case being made for the Spring STS install documentation to have more instructions on configuring maven on a MAC.
Wait again... I just found a way to show the hidden files and folders in Finder. Simply go to a terminal window and type:
Code:
new-host:.m2 rdg$ defaults write com.apple.finder AppleShowAllFiles TRUE
new-host:.m2 rdg$ killall Finder
The solution, then, is simply to copy /usr/share/java/maven-2.2.0/conf/settings.xml into Users/rdg/.m2 :-)