Hi,
I'm having som struggle with the filtering of some
files.

The problem is that down in a sub-project, I want to
replace say
[EMAIL PROTECTED]@ with the property that is
inherited from the top level like:

base.dir=test
srcdir=${test}/dir

there are two problems:

ant doesn't understand composed filters, as it does
with properties. So when i just include this in my
current scope build.filter and load that as
<filter filtersfile="build.filter"/>, I get
replace.prop=${test}/dir.

What I did to get around that is to export the
properties and to import them again:

<echoproperties    destfile="build.filter"/>
<filter filtersfile="build.filter"/>

This works with the current scope, but not with
inherited props in maven. They get exported in a
parentScope=..............srcdir=test/dir...........................
Which is not readable as a filter.

Another try was to iterate via:

<j:scope>
        <j:set var="entries"
value="${context.variables}" scope="parent"/>
        <!--j:set var="entr"
value="${context.variables.get(${str})}"/-->
        <echo>hej ${entries}</echo>
        <j:forEach var="entry"
items="${entries.entryMap()}">
     
           <echo>hej ${entry}</echo>
           <propertyfile
            file="test.tmp"
            comment="My properties">
              <entry  key="${entry.name}"
value="${entry.value}"/>
        </propertyfile>

       
    </j:forEach>
    </j:scope>

If I set the scope to parent, I get a StackOverFlow
error, but if I don't, I don't get the parent
variables.

What can I do to achieve the filtering?


Thanks for any hints!


/peter

=====
Peter Neubauer
mailto:[EMAIL PROTECTED]

Yahoo! Mail - Gratis: 6 MB lagringsutrymme, spamfilter och virusscan. Se mer p� 
http://se.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to