1

I'm having trouble copying some files which match a pattern in my ant script.

I have the following:

<property name="IncludedLocales" value="de_DE|es_ES|fr_FR|it_IT|ja_JP" />

<copy todir="${dest}">
            <fileset dir="${src}" includes="**/*.properties" />
            <mapper type="regexp" from="(messages(_${IncludedLocales})?\.properties)" to="\1" />
</copy>

${src} contains the files messages.properties, as well as messages_de_DE.properties, messages_es_ES.properties, etc.

But for some reason, only messages.properties, and messages_de_DE.properties get copied (and if I changed IncludedLocales to 'es_ES|de_DE|fr_FR|it_IT|ja_JP', messages_es_ES.properties gets copied instead of messages_de_DE.properties).

Am I missing something really simple?

4

1 回答 1

0

是的,我确实错过了一些非常简单的事情,(messages(_${IncludedLocales})?\.properties)应该是(messages(_(${IncludedLocales}))?\.properties)

于 2013-05-28T21:57:39.260 回答