Should it be created if it doesn't exist? I suggest only automatic creation, when it is set to default location.
Else it can be scaffolded using the generate-settings goal. What does maven do, if settings location is overridden? -- Message sent from mobile device Am 01.03.2011 um 18:09 schrieb Brett Porter <[email protected]>: > > On 28/02/2011, at 9:27 AM, Prins, drs. M.C. (Mark) wrote: >>> 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. > > Yep. We don't need the global location as npanday-settings doesn't currently > merge those and it shouldn't write anything into the installation. You can > lookup where -s pointed to, but I wouldn't rely on magic to write to the same > directory. > > Since everything in NPanday originates from a mojo, I think the best thing to > do is to always have a mojo property for expression ${npanday.settings}. That > will honour both a property in a profile and on the command line, as well as > being able to set it in the plugin configuration on a per-execution basis. If > not set, it can default to ${user.home}/.m2/npanday-settings.xml. > > From the mojo, this value needs to be passed into method calls that require > it (or lookup a central component and set the value). > > - Brett > > -- > Brett Porter > [email protected] > http://brettporter.wordpress.com/ >
