Hi,
In STS 2.3.0.RELEASE, how can you change the classpath variable, M2_REPO, to where my repository actually is and not where it thinks it should be, ie. c:\Documents and Settings\myid\.m2\repository.
Thanks,
Henry
Printable View
Hi,
In STS 2.3.0.RELEASE, how can you change the classpath variable, M2_REPO, to where my repository actually is and not where it thinks it should be, ie. c:\Documents and Settings\myid\.m2\repository.
Thanks,
Henry
freemarket,
you can modify the location of your repo in the Preferences -> Maven -> User Settings. Point to a custom settings.xml.
Within that settings.xml you can specify the location of the Maven repo as follows. This should also update M2_REPO variable.
HTHCode:<?xml version="1.0" encoding="UTF-8"?>
<settings>
<localRepository>/Applications/rich-web-2.1.3/repository</localRepository>
<offline>true</offline>
</settings>
Christian
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....)
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:The specified user settings file does not exist: /Users/rdg/.m2/settings.xml
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.Code:mvn archetype:generate (etc)
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:
The solution, then, is simply to copy /usr/share/java/maven-2.2.0/conf/settings.xml into Users/rdg/.m2 :-)Code:new-host:.m2 rdg$ defaults write com.apple.finder AppleShowAllFiles TRUE
new-host:.m2 rdg$ killall Finder
Alternatively, if you like a nice GUI with a checkbox to "Show hidden and system files" then you can download the indispensable free app TinkerTool