You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kevin Galligan <kg...@gmail.com> on 2006/04/06 15:12:17 UTC

Property filter with xml files

Is there any way to specify an xml file as the source of property values
instead of a properties files...

<build>
    <filters>
      <!-- Something like this ... -->
      <filter>src/main/filters/filter.xml</filter>
      <!-- End of special section.  Don't worry about the rest... -->
    </filters>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
  </build>

We're specifying the replace file in a command line switch, and the
different files get out of date as new properties are added.  Having an xml
file would allow for an xml schema, and that would make it easier to see
which files are out of date.

Thanks

Re: Property filter with xml files

Posted by Piéroni Raphaël <ra...@gmail.com>.
Hi,

Maybe Modello is the more standard o load xml files as it is used to load
poms, setings, ...

Regards

Raphaël

2006/4/6, Kevin Galligan <kg...@gmail.com>:
>
> Ok.  More of a general question.  I found the spot in the code that loads
> the properties and I see an easy insert.
>
> Now, I'm used to dealing with xml through jdom, and (somewhat) the
> standard
> dom.  Questions:
>
> 1) Is there a "standard" way to load xml files in a maven project, say
> through some utility.
> 2) If not, is there a dependency already defined that I should be using
> code
> from.
> 3) If not, and I need to add a dependency to the resources plugin, is
> there
> a specific one I should use.
>
> Thanks in advance...
>
> On 4/6/06, Eric Redmond <er...@gmail.com> wrote:
> >
> > http://maven.apache.org/contributing/help.html
> >
> > On 4/6/06, Kevin Galligan <kg...@gmail.com> wrote:
> > >
> > > Not sure how the submit process works...
> > >
> > > On 4/6/06, Eric Redmond <er...@gmail.com> wrote:
> > > >
> > > > Current documentation states that filters are *.properties files. I
> > have
> > > > not
> > > > heard of any change to this. It should be a relatively minor patch,
> > why
> > > > don't you submit the idea?
> > > >
> > > > Eric
> > > >
> > > > On 4/6/06, Kevin Galligan <kg...@gmail.com> wrote:
> > > > >
> > > > > Is there any way to specify an xml file as the source of property
> > > values
> > > > > instead of a properties files...
> > > > >
> > > > > <build>
> > > > >     <filters>
> > > > >       <!-- Something like this ... -->
> > > > >       <filter>src/main/filters/filter.xml</filter>
> > > > >       <!-- End of special section.  Don't worry about the rest...
> > -->
> > > > >     </filters>
> > > > >     <resources>
> > > > >       <resource>
> > > > >         <directory>src/main/resources</directory>
> > > > >         <filtering>true</filtering>
> > > > >       </resource>
> > > > >     </resources>
> > > > >   </build>
> > > > >
> > > > > We're specifying the replace file in a command line switch, and
> the
> > > > > different files get out of date as new properties are
> added.  Having
> > > an
> > > > > xml
> > > > > file would allow for an xml schema, and that would make it easier
> to
> > > see
> > > > > which files are out of date.
> > > > >
> > > > > Thanks
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

Re: Property filter with xml files

Posted by Kevin Galligan <kg...@gmail.com>.
Ok.  More of a general question.  I found the spot in the code that loads
the properties and I see an easy insert.

Now, I'm used to dealing with xml through jdom, and (somewhat) the standard
dom.  Questions:

1) Is there a "standard" way to load xml files in a maven project, say
through some utility.
2) If not, is there a dependency already defined that I should be using code
from.
3) If not, and I need to add a dependency to the resources plugin, is there
a specific one I should use.

Thanks in advance...

On 4/6/06, Eric Redmond <er...@gmail.com> wrote:
>
> http://maven.apache.org/contributing/help.html
>
> On 4/6/06, Kevin Galligan <kg...@gmail.com> wrote:
> >
> > Not sure how the submit process works...
> >
> > On 4/6/06, Eric Redmond <er...@gmail.com> wrote:
> > >
> > > Current documentation states that filters are *.properties files. I
> have
> > > not
> > > heard of any change to this. It should be a relatively minor patch,
> why
> > > don't you submit the idea?
> > >
> > > Eric
> > >
> > > On 4/6/06, Kevin Galligan <kg...@gmail.com> wrote:
> > > >
> > > > Is there any way to specify an xml file as the source of property
> > values
> > > > instead of a properties files...
> > > >
> > > > <build>
> > > >     <filters>
> > > >       <!-- Something like this ... -->
> > > >       <filter>src/main/filters/filter.xml</filter>
> > > >       <!-- End of special section.  Don't worry about the rest...
> -->
> > > >     </filters>
> > > >     <resources>
> > > >       <resource>
> > > >         <directory>src/main/resources</directory>
> > > >         <filtering>true</filtering>
> > > >       </resource>
> > > >     </resources>
> > > >   </build>
> > > >
> > > > We're specifying the replace file in a command line switch, and the
> > > > different files get out of date as new properties are added.  Having
> > an
> > > > xml
> > > > file would allow for an xml schema, and that would make it easier to
> > see
> > > > which files are out of date.
> > > >
> > > > Thanks
> > > >
> > > >
> > >
> > >
> >
> >
>
>

Re: Property filter with xml files

Posted by Eric Redmond <er...@gmail.com>.
http://maven.apache.org/contributing/help.html

On 4/6/06, Kevin Galligan <kg...@gmail.com> wrote:
>
> Not sure how the submit process works...
>
> On 4/6/06, Eric Redmond <er...@gmail.com> wrote:
> >
> > Current documentation states that filters are *.properties files. I have
> > not
> > heard of any change to this. It should be a relatively minor patch, why
> > don't you submit the idea?
> >
> > Eric
> >
> > On 4/6/06, Kevin Galligan <kg...@gmail.com> wrote:
> > >
> > > Is there any way to specify an xml file as the source of property
> values
> > > instead of a properties files...
> > >
> > > <build>
> > >     <filters>
> > >       <!-- Something like this ... -->
> > >       <filter>src/main/filters/filter.xml</filter>
> > >       <!-- End of special section.  Don't worry about the rest... -->
> > >     </filters>
> > >     <resources>
> > >       <resource>
> > >         <directory>src/main/resources</directory>
> > >         <filtering>true</filtering>
> > >       </resource>
> > >     </resources>
> > >   </build>
> > >
> > > We're specifying the replace file in a command line switch, and the
> > > different files get out of date as new properties are added.  Having
> an
> > > xml
> > > file would allow for an xml schema, and that would make it easier to
> see
> > > which files are out of date.
> > >
> > > Thanks
> > >
> > >
> >
> >
>
>

Re: Property filter with xml files

Posted by Kevin Galligan <kg...@gmail.com>.
Not sure how the submit process works...

On 4/6/06, Eric Redmond <er...@gmail.com> wrote:
>
> Current documentation states that filters are *.properties files. I have
> not
> heard of any change to this. It should be a relatively minor patch, why
> don't you submit the idea?
>
> Eric
>
> On 4/6/06, Kevin Galligan <kg...@gmail.com> wrote:
> >
> > Is there any way to specify an xml file as the source of property values
> > instead of a properties files...
> >
> > <build>
> >     <filters>
> >       <!-- Something like this ... -->
> >       <filter>src/main/filters/filter.xml</filter>
> >       <!-- End of special section.  Don't worry about the rest... -->
> >     </filters>
> >     <resources>
> >       <resource>
> >         <directory>src/main/resources</directory>
> >         <filtering>true</filtering>
> >       </resource>
> >     </resources>
> >   </build>
> >
> > We're specifying the replace file in a command line switch, and the
> > different files get out of date as new properties are added.  Having an
> > xml
> > file would allow for an xml schema, and that would make it easier to see
> > which files are out of date.
> >
> > Thanks
> >
> >
>
>

Re: Property filter with xml files

Posted by Eric Redmond <er...@gmail.com>.
Current documentation states that filters are *.properties files. I have not
heard of any change to this. It should be a relatively minor patch, why
don't you submit the idea?

Eric

On 4/6/06, Kevin Galligan <kg...@gmail.com> wrote:
>
> Is there any way to specify an xml file as the source of property values
> instead of a properties files...
>
> <build>
>     <filters>
>       <!-- Something like this ... -->
>       <filter>src/main/filters/filter.xml</filter>
>       <!-- End of special section.  Don't worry about the rest... -->
>     </filters>
>     <resources>
>       <resource>
>         <directory>src/main/resources</directory>
>         <filtering>true</filtering>
>       </resource>
>     </resources>
>   </build>
>
> We're specifying the replace file in a command line switch, and the
> different files get out of date as new properties are added.  Having an
> xml
> file would allow for an xml schema, and that would make it easier to see
> which files are out of date.
>
> Thanks
>
>