Thanks Stephen, 

Caught that one already per my properties plugin won't work comment. 

Looks like I am stuck doing it the hard way.

Philip

-----Original Message-----
From: Stephen Connolly [mailto:[email protected]] 
Sent: Monday, March 29, 2010 2:47 AM
To: Maven Users List
Subject: Re: build.properties Question

On 29 March 2010 02:40, sebb <[email protected]> wrote:

> On 26/03/2010, Philip Wilder <[email protected]> wrote:
> > Thanks Wayne,
> >
> >  The nature of my problem is that I am attempting to integrate two  
> > different builds processes with the first build generating a 
> > properties  file to modify the second maven build.
> >
> >  The current solution is to use scripts to pass in the values on the

> > commandline to the maven build. I'm not terribly fond of this 
> > approach  because it means some of the work is being done outside of

> > maven and  requires an environment capable of running sh files (yes 
> > we could create  a corresponding .bat file). Unfortunately, as I 
> > understand it, this  continues to be our best option because we are 
> > altering build properties  which are read before plugin execution 
> > (meaning the properties plugin I  mentioned earlier won't work for
us).
> >
> >  I suppose technically we could try to create a settings.xml file 
> > but I  would be concerned that this has the potential to interfere 
> > with the  settings.xml for a particular users environment.
>
> Have you seen this?
>
>
> http://www.gxdeveloperweb.com/Blogs/Bram-de-Kruijff/Maven-secrets-Dyna
> mic-Maven-properties-with-Beanshell.htm
>
>
I shall repeat my 18 month old comment with respect to this plugin:

> Beware, that plugin suffers from a fatal flaw:
>
> Plugins execute after the build plan has been constructed.
>
> Thus it can only provide properties for things which do not affect the
build
> plan.
>
> So, while you'll get some mileage out of that plugin.... ultimately 
> you'll end up frustrated when you hit one of the places where property
subsitution
> takes place during determination of the build plan.
>
> Also, the property substitution will only take place *when* the plugin

> is run, so if you invoke another plugin directly outside of a 
> lifecycle goal, you'll get no substitution...

-Stephen


> >
> >  Philip
> >
> >
> >  -----Original Message-----
> >  From: Wayne Fay [mailto:[email protected]]
> >  Sent: Thursday, March 25, 2010 5:54 PM
> >  To: Maven Users List
> >  Subject: Re: build.properties Question
> >
> >  > that functionality was lost in Maven 1. Can anyone tell me why 
> > this  > functionality was removed or, better yet, if there is a flag

> > to turn  > it back on?
> >
> >  There is no flag, and I can't imagine one will be added. Maven 
> > simply  does not use properties files. If you must use properties 
> > files, then  you must use a Maven plugin or Ant, Ivy, etc.
> >
> >  Jason van Zyl has previously responded to this question:
> >  
> > http://old.nabble.com/Making-properties-accessible-in-pom.xml-ts8996
> > 414
> .
> >  html
> >
> >  Make sure you read Stephen Connolly's response in that same thread

> > before getting too deep into your usage of any plugins to read those

> > properties files, too.
> >
> >  If you're planning on using Maven long-term, you really need to 
> > migrate  away from properties files, they're just not supported.
> >
> >  Wayne
> >
> >  
> > --------------------------------------------------------------------
> > -  To unsubscribe, e-mail: [email protected]
> >  For additional commands, e-mail: [email protected]
> >
> >
> >  
> > --------------------------------------------------------------------
> > -  To unsubscribe, e-mail: [email protected]
> >  For additional commands, e-mail: [email protected]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to