You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by cc...@everestkc.net on 2005/09/20 21:58:45 UTC
Jelly - test regex match in string property
Is there a way in a plugin to test a a property with a regular expression and get a true/false indication? I don't particularly need the "matching" text returned.
Reason: I'd like a way to determine if any dependency is a SNAPSHOT versus a versioned release. This way we could prevent accidently generating a "release" for code that still depends on a snapshot.
Thinking of something like:
<j:forEach var="dependency" items="${pom.dependencies}">
<j:if test="${dependency.version.matches('.*SNAPSHOT.*') == 'true'}">
<ant:fail>Dependency is a SNAPSHOT</ant:fail>
</j:if>
Thanks in advance for you time. Maven is a big help with our builds.
Cary
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org