You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jamie Bisotti <jb...@gmail.com> on 2005/05/23 18:53:21 UTC
Resource filtering wish
Why can't <filter>true</filter>, on a <resource> element provide some
basic filtering, without requiring writing/modifying maven.xml? For
example, why can't it apply system properties, or just properties in
general?
In my case, I want to put the CruiseControl build label (provided as
the "label" sys prop), into the MANIFEST.MF of the generated WAR file.
In my MANIFEST.MF template, I've added: "Build-Label: @label@" and in
my project.xml, I've added <filter>true</filter> to the appropriate
<resource> entry. It was very non-obvious (please point me to the
docs if I missed it) that I also need to provide a java:jar-resources
preGoal in my maven.xml and explicitly state the token and the
replacement value. Seems like Maven could scan filtered resources for
tokens and look to see if there was a corresponding property available
and use it by default.
Or maybe it's just me.
--
Jamie Bisotti
Software Engineer
Lexmark International, Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Resource filtering wish
Posted by Brett Porter <br...@gmail.com>.
Reopened. Will use the same solution as m2.
- Brett
On 5/24/05, Jamie Bisotti <jb...@gmail.com> wrote:
> I just found this: http://jira.codehaus.org/browse/MAVEN-514
>
> Does this mean Maven 1.x users are out of luck?
>
>
> On 5/23/05, Graham King <gr...@darkcoding.net> wrote:
> > It's not just you - I went through a similar process. I heartily
> > second your enhancement wish.
> >
> > Jamie Bisotti wrote:
> > > Why can't <filter>true</filter>, on a <resource> element provide some
> > > basic filtering, without requiring writing/modifying maven.xml? For
> > > example, why can't it apply system properties, or just properties in
> > > general?
> > >
> > > In my case, I want to put the CruiseControl build label (provided as
> > > the "label" sys prop), into the MANIFEST.MF of the generated WAR file.
> > > In my MANIFEST.MF template, I've added: "Build-Label: @label@" and in
> > > my project.xml, I've added <filter>true</filter> to the appropriate
> > > <resource> entry. It was very non-obvious (please point me to the
> > > docs if I missed it) that I also need to provide a java:jar-resources
> > > preGoal in my maven.xml and explicitly state the token and the
> > > replacement value. Seems like Maven could scan filtered resources for
> > > tokens and look to see if there was a corresponding property available
> > > and use it by default.
> > >
> > > Or maybe it's just me.
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> Jamie Bisotti
> Software Engineer
> Lexmark International, Inc.
>
> ---------------------------------------------------------------------
> 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
Re: Resource filtering wish
Posted by Jamie Bisotti <jb...@gmail.com>.
I just found this: http://jira.codehaus.org/browse/MAVEN-514
Does this mean Maven 1.x users are out of luck?
On 5/23/05, Graham King <gr...@darkcoding.net> wrote:
> It's not just you - I went through a similar process. I heartily
> second your enhancement wish.
>
> Jamie Bisotti wrote:
> > Why can't <filter>true</filter>, on a <resource> element provide some
> > basic filtering, without requiring writing/modifying maven.xml? For
> > example, why can't it apply system properties, or just properties in
> > general?
> >
> > In my case, I want to put the CruiseControl build label (provided as
> > the "label" sys prop), into the MANIFEST.MF of the generated WAR file.
> > In my MANIFEST.MF template, I've added: "Build-Label: @label@" and in
> > my project.xml, I've added <filter>true</filter> to the appropriate
> > <resource> entry. It was very non-obvious (please point me to the
> > docs if I missed it) that I also need to provide a java:jar-resources
> > preGoal in my maven.xml and explicitly state the token and the
> > replacement value. Seems like Maven could scan filtered resources for
> > tokens and look to see if there was a corresponding property available
> > and use it by default.
> >
> > Or maybe it's just me.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Jamie Bisotti
Software Engineer
Lexmark International, Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Resource filtering wish
Posted by Graham King <gr...@darkcoding.net>.
It's not just you - I went through a similar process. I heartily
second your enhancement wish.
Jamie Bisotti wrote:
> Why can't <filter>true</filter>, on a <resource> element provide some
> basic filtering, without requiring writing/modifying maven.xml? For
> example, why can't it apply system properties, or just properties in
> general?
>
> In my case, I want to put the CruiseControl build label (provided as
> the "label" sys prop), into the MANIFEST.MF of the generated WAR file.
> In my MANIFEST.MF template, I've added: "Build-Label: @label@" and in
> my project.xml, I've added <filter>true</filter> to the appropriate
> <resource> entry. It was very non-obvious (please point me to the
> docs if I missed it) that I also need to provide a java:jar-resources
> preGoal in my maven.xml and explicitly state the token and the
> replacement value. Seems like Maven could scan filtered resources for
> tokens and look to see if there was a corresponding property available
> and use it by default.
>
> Or maybe it's just me.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org