---- Simon Kitching <[EMAIL PROTECTED]> schrieb: > ---- Matthew Tordoff <[EMAIL PROTECTED]> schrieb: > > Thanks for that but I have already looked at the appropriate > > documentation. I have tried setting the system property in all of those > > locations and for some reason none of the settings are passed through. I > > did find a JIRA bug opened against this problem somewhere, and thus am > > guessing this functionality isn't yet available. > > Are you trying to set a "global" property, or one specific to just a > particular plugin? > > You appear to be trying to do the latter by nesting your properties info > inside a <configuration> tag. However the page I referred you to says about > configuration: > The configuration as DOM object. > which strongly implies to me that this is only interpreted by the plugin, and > you cannot assume that maven looks in here, ie the plugin alone is > responsible for interpreting the contents. I could be wrong here, but don't > think so.. > > Setting properties in a pom which are global to all stuff in the pom (and > child poms) is trivial, and definitely works when *not* nested within a > <configuration> element (as documented in the page I referred you to): > > <project> > ... > <properties> > <foo>fooval</foo> > </properties> > </project> > > It also works in settings.xml, but you do need to be sure that the profile it > is defined within is active.. >
Ah..hang on a minute. Your original mail said: <quote> Setting in the above way is the only way in which I appear to be able to access the file at a later stage from one of my MOJOs via System.getProperty("systemprop") . </quote> So your problem is not setting properties that you then reference via "${propname}" in your pom, but that you want to access them from a custom maven plugin? I don't think that maven properties get stored into the "system properties" object. I haven't written any custom maven plugins myself, but expect your custom plugin code will need to look up maven properties using a maven api (or have plexus inject it) rather than using System.getProperty. Regards, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]