You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Nagaraj <na...@beehyv.com> on 2008/10/15 10:21:50 UTC
Set version attribute value in the feature.xml dynamically using buildfile
Hello,
Please find buildfile, feature.xml
Feature.xml contains
<feature id="beehyv.feature" label="%feature.name" version= "5.0.3.0"
provider-name="%provider.name" plugin="beehyv.editor">
</feature>
My requirement is set version attribute in the feature.xml to the
VERSION_NUMBER defined in the buildfile
Can anyone suggest me how to set version attribute in the feature.xml
dynamically using buildfile?
Thanks in advance
Nagaraj
_____
Take your business <http://www.aatmani.com/Aatmani/adclick?adprintid=625>
to new heights with NetSuite on demand solutions.
Re: Set version attribute value in the feature.xml dynamically using
buildfile
Posted by Ittay Dror <it...@tikalk.com>.
Nagaraj wrote:
> Thanks for your reply.
> I tried this option before.
>
>
> feature.xml file contents
>
> <feature id="beehyv.feature" label="%feature.name" version= "${version}">
> provider-name="%provider.name" plugin="beehyv.editor">
> </feature>
>
>
> In the buildfile I placed following line
>
> resources.filter.using 'version'=>VERSION_NUMBER
>
> Still I am not getting the correct result.
>
>
works for me:
ittayd/tmp/foo > ff
./buildfile
./src/main/resources/feature.xml
ittayd/tmp/foo > cat ./src/main/resources/feature.xml
<feature id="beehyv.feature" label="%feature.name" version= "${version}">
provider-name="%provider.name" plugin="beehyv.editor">
</feature>
ittayd/tmp/foo > buildr
(in /tmp/foo, development)
Building foo
[Completed] Your build has completed: /tmp/foo
buildr default
Completed in 0.403s
ittayd/tmp/foo > cat target/resources/feature.xml
<feature id="beehyv.feature" label="%feature.name" version= "1.0">
provider-name="%provider.name" plugin="beehyv.editor">
</feature>
maybe you placed feature.xml in a place other than src/main/resources?
if so, you have two options (other than moving it to src/main/resources):
1. if where you put features.xml is the standard place for resources,
you can use layouts
(http://incubator.apache.org/buildr/extending.html#using_alternative_layouts)
to configure buildr to look for resource files there.
2. use resources.filter.from (or resources.from) and
resources.filter.into to configure source and target directories to find
resource files. use resources.filter.include (or resources.include) to
specify glob patterns of files to include
Ittay
> Thanks
>
> Nagaraj
>
>
>
> _____
>
> Raj Abhyanker, LLP is <http://www.aatmani.com/Aatmani/adclick?adprintid=626>
> a leading intellectual property law firm representing multinational and
> venture backed clients.
>
>
>
>
--
Ittay Dror <it...@tikalk.com>
Tikal <http://www.tikalk.com>
Tikal Project <http://tikal.sourceforge.net>
RE: Set version attribute value in the feature.xml dynamically using buildfile
Posted by Nagaraj <na...@beehyv.com>.
Thanks for your reply.
I tried this option before.
feature.xml file contents
<feature id="beehyv.feature" label="%feature.name" version= "${version}">
provider-name="%provider.name" plugin="beehyv.editor">
</feature>
In the buildfile I placed following line
resources.filter.using 'version'=>VERSION_NUMBER
Still I am not getting the correct result.
Thanks
Nagaraj
_____
Raj Abhyanker, LLP is <http://www.aatmani.com/Aatmani/adclick?adprintid=626>
a leading intellectual property law firm representing multinational and
venture backed clients.
Re: Set version attribute value in the feature.xml dynamically using
buildfile
Posted by Ittay Dror <it...@gmail.com>.
Nagaraj wrote:
>
> Hello,
>
>
>
> Please find buildfile, feature.xml
>
>
>
> Feature.xml contains
>
>
>
> <feature id="beehyv.feature" label="%feature.name" version= "5.0.3.0"
> provider-name="%provider.name" plugin="beehyv.editor">
>
>
>
> </feature>
>
>
>
> My requirement is set version attribute in the feature.xml to the
> VERSION_NUMBER defined in the buildfile
>
>
>
> Can anyone suggest me how to set version attribute in the feature.xml
> dynamically using buildfile?
>
I think the best approach is to use the resources task to filter the
file. See http://incubator.apache.org/buildr/building.html#resources
Ittay
>
>
>
>
>
>
> Thanks in advance
>
>
>
> Nagaraj
>
>
>
> ------------------------------------------------------------------------
>
> Take your business to new heights with NetSuite on demand solutions.
> <http://www.aatmani.com/Aatmani/adclick?adprintid=625>
>
--
--
Ittay Dror <it...@gmail.com>