]
Michael Biarnes Kiefer commented on DROOLS-764:
-----------------------------------------------
[~ge0ffrey]
saw commons-lang only in three fie¡les:
Looking for an import for commons-lang I didn't find any, only commons-lang3.
The first two poms there is no porblem to change - but the third file (kie-wb-common) has
a transitive dependency to commons-lang:2.4 (velocity:1.7 which is in our IP-bom 7.0.0.CR6
uses this version of velocity)
Delete the dependency to commons-lang 2 in all poms in Drools and
jBPM (use commons-lang 3 instead)
---------------------------------------------------------------------------------------------------
Key: DROOLS-764
URL:
https://issues.jboss.org/browse/DROOLS-764
Project: Drools
Issue Type: Task
Reporter: Geoffrey De Smet
Assignee: Michael Biarnes Kiefer
Priority: Minor
Make an inventory of all modules that still use commons-lang and ask their owners to
replace the commons-lang 2 usage with commons-lang 3.
See recipe below how they can quickly do that.
Once all our modules are upgraded, see if we can remove the commons-lang 2 dependency as
much as possible (including the ip-bom hopefully).
{code}
Currently we have commons-lang 2.6 and 3.1 in our classpath
(which is not a problem because they use a different package namespace).
Nevertheless, having it twice doesn't look good
and 2.6 might miss security fixes.
Luckily upgrading is easy (it took me 15 minutes for optaplanner):
1) Replace:
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
with
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
(Both are already in the ip-bom, so no need to worry about <version>)
2) Replace "import org.apache.commons.lang."
with "import org.apache.commons.lang3."
I had about 170 occurrences.
3) Compile. If you have a compile error, look for that class on:
https://commons.apache.org/proper/commons-lang/article3_0.html
I only had 1 error. Replacing "StringEscapeUtils.escapeHtml(s)"
with "StringEscapeUtils.ESCAPE_HTML4.translate(s)" fixed that.
{code}