You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wayne Fay <wa...@gmail.com> on 2007/04/01 00:01:44 UTC

Re: any way to read properties file from a POM ?

This is not an uncommon question, and JvZ has responded to it previously.

http://www.nabble.com/Making-properties-accessible-in-pom.xml-tf3236898s177.html#a9023112

Wayne

On 3/31/07, Trevor Torrez <ja...@gmail.com> wrote:
> You can try http://jira.codehaus.org/browse/MOJO-535 -- I havent tried
> it so your milage may vary.
>
> It seems that these operations (reading properties from a file into
> the maven build and writing the current maven properties to a file)
> are highly desirable.  Is there any reason why maven out-of-the-box
> lacks these features?
>
> On 3/29/07, Wayne Fay <wa...@gmail.com> wrote:
> > Another option is to write a plugin which would read your properties
> > file and attach the values to the Project, or perhaps to the
> > SystemProperties somehow. But I don't really know how all that would
> > work, or that it is even possible. I'm not much of a M2 plugin
> > developer at this point. ;-)
> >
> > Wayne
> >
> > On 3/29/07, nicolas de loof <ni...@gmail.com> wrote:
> > > This would require to modify the dbunit and the sql plugins...
> > >
> > > I'll have to find another strategy. Thanks anyway.
> > >
> > >
> > > 2007/3/29, Wayne Fay <wa...@gmail.com>:
> > > >
> > > > Others have asked this previously, and the answer remains the same:
> > > > this is not possible.
> > > >
> > > > Perhaps you could instead modify the dbunit plugin to read from a
> > > > properties file.
> > > >
> > > > Wayne
> > > >
> > > > On 3/29/07, nicolas de loof <ni...@gmail.com> wrote:
> > > > > Hello,
> > > > >
> > > > > I'm using dbunit mojo to create a clean database before my
> > > > integration-tests
> > > > > run.
> > > > > My DB configuration is set in the test classes via a properties file (
> > > > > jdbc.properties)
> > > > > I'd like to avoid duplicating this info in my POM.
> > > > >
> > > > > How to set the POM to read the properties and set them as system
> > > > properties
> > > > > (to be visible from the dbunit plugin) ?
> > > > >
> > > > > Any suggestion is welcome.
> > > > >
> > > > > Nico.
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org