MavenRepoInSvn |
In which Brett advises to add <properties><scope>xxx</scope></properties> to dependencies in m1 build files
<model> <modelVersion>4.0.0</modelVersion> <groupId>org.apache.shale</groupId> <artifactId>shale</artifactId> <version>1.0.0-dev</version> <packaging>pom</packaging> <name>Apache Shale Framework</name> <url>http://struts.apache.org/shale</url> <modules> <module>core-library</module> <!-- module == directory name --> <module>tiles</module> <module>spring</module> </modules> </model>
By default, Maven wants to place downloaded dependencies under your home directory. On Windows, that's C:\Documents and Settings\username.DOMAIN. (You will often see your home directory referred to as just '~' in documentation.) In some corporate environments, placing large numbers of files in this location can be problematic. For example, with roaming profiles enabled, *everything* in that directory will be synchronized with the server when you log out.
To move your local repository to a different directory, place a 'settings.xml' file in the '.m2' directory (yes, the '.' is important) under your home directory. (Good luck creating the '.m2' directory if it doesn't already exist-- you'll have to do it at a command prompt as the Windows Explorer insists that you type a filename.)
Example:
~/.m2/settings.xml <settings> <localRepository>C:\\java\\m2-repository</localRepository> </settings>