Wendy Smoak <mailto:[email protected]> schreef op maandag 28 februari 2011 17:31:
> On Mon, Feb 28, 2011 at 6:13 AM, Adelita Padilla > <[email protected]> wrote: >> Instead of having a profile (sounds error-prone), we could > set the path as property (we could use the 'localRepository' > property) using a command line switch (so it still match the > behavior of Maven). >> >> So for example, user will input > -DlocalRepository="D:\test\repository", NPanday will assume > that both settings.xml and npanday-settings.xml are located > in "D:\test" directory. Since npanday-settings.xml is > generated, NPanday will check on the specified directory for > that file. If ever npanday-settings.xml doesn't exist yet, > NPanday will generate the file in that specified path. >> >> Does it make sense? > > No... a property called localRepository should be only the > location of the local repository. Adding "magic" like > expecting to find the settings files one level up from that > will get you into trouble. What if someone puts their local > repository in f:\ ? What if the user doesn't have permission > to write to the parent directory? > > Maven uses the -s switch on the command line to point to the settings > file. Is there any reason you need more than that? > > Before you invent a property, does Maven already have one it > knows about for the regular settings.xml file? There are two well known locations; one in the .m2 directory that is in the users %HOMEDRIVE% or %HOME% directory (or user profile directory), this depends on), the other is a system level in %M2_HOME%\conf The system level one is always there, the user level one doesn't have to be there, I think... When you run mvn w/ -X you can see it 1st tries to load the system file and then th euser file. R:\Bureaublad>mvn -X Apache Maven 3.0.2 (r1056850; 2011-01-09 01:58:10+0100) Java version: 1.6.0_24, vendor: Sun Microsystems Inc. Java home: C:\Program Files\Java\jdk1.6.0_24\jre Default locale: nl_NL, platform encoding: UTF-8 OS name: "windows xp", version: "5.1", arch: "x86", family: "windows" [INFO] Error stacktraces are turned on. [DEBUG] Reading global settings from E:\dev\apache-maven-3.0.2\conf\settings.xml [DEBUG] Reading user settings from R:\.m2\settings.xml [DEBUG] Using local repository at C:\maven-repository [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for C:\maven-repository [INFO] Scanning for projects... [DEBUG] Extension realms for project org.apache.maven:standalone-pom:pom:1: (none) [DEBUG] Looking up lifecyle mappings for packaging pom from ClassRealm[plexus.core, parent: null] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.125s [INFO] Finished at: Mon Feb 28 18:26:31 CET 2011 [INFO] Final Memory: 2M/247M [INFO] ------------------------------------------------------------------------ Met vriendelijke groet, Mark Prins senior applicatieontwikkelaar GIS ........................................................................ GIS Competence Center Dienst Landelijk Gebied Herman Gorterstraat 5 | 3511 EW | Utrecht | Kamer 11.27 Postbus 20021 | 3502 LA | Utrecht ........................................................................ T 0652401009 F 0302756999 [email protected] @mc_prins ........................................................................ -- Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is gezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten. This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages.
