ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Matthies <ml_ant-u...@nmhq.net>
Subject Multiline regex matches
Date Tue, 17 Aug 2010 17:25:02 GMT
Hi,

I need to fail a build if a certain file doesn't match a certain
multiline regex pattern. I tried somethink like

    <fail>
        <condition>
            <resourcecount when="equal" count="0">
                <restrict>
                    <fileset file="${file}"/>
                    <containsregexp expression="${regex}"/>
                </restrict>
            </resourcecount>
        </condition>
    </fail>

but unfortunately containsregexp doesn't perform multiline matches.
Specifying "(?m:${regex})" doesn't work.

If the <matches> condition would support resources, I could use that,
but it only supports the string attribute.

Any other ideas?

-- Niklas Matthies

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message