actually maven includes a really old commons-lang beta in core dependencies (1.0-b1.1,
the actual version is 2.0).
It seems that having this old jar in maven/lib prevents any plugin from using newer
commons-lang versions. If you try calling any cl-2.0 method from jelly (after of
course including the correct dependency in POM), maven fails because the version o the
class loaded is always the one in maven/lib.
This is a sample invocation: only works replacing commons-lang-1.9-b1.1 in maven/lib
(ps. setting classloader in jelly tags doesn't have any effect)
<define:tag name="escapeNameToken">
<j:new var="stringUtils" className="org.apache.commons.lang.StringUtils" /><j:invoke
var="escapedtoken" on="${stringUtils}" method="replaceChars">
<j:arg type="java.lang.String" value="${value}" />
<j:arg type="java.lang.String" value=" .,!?/'\()+*" />
<j:arg type="java.lang.String" value="____________" />
</j:invoke>${escapedtoken}</define:tag>
Since commons-lang 2.0 is totally compatible with the 1.0 release (only deprecations,
no methods have been removed/changed) it could worth to update maven dependency before
the r2 release. This at least will let people use it in plugins released after rc2.
I already posted a jira request about it, and I'm testing maven with the updated 2.0
dependency from a while without problems, now... could someone apply this change?
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-1153
thanks
fabrizio