[jboss-jira] [JBoss JIRA] (DROOLS-764) Delete the dependency to commons-lang 2 in all poms in Drools and jBPM (use commons-lang 3 instead)

Geoffrey De Smet (JIRA) issues at jboss.org
Wed Apr 15 09:31:19 EDT 2015


Geoffrey De Smet created DROOLS-764:
---------------------------------------

             Summary: 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}



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the jboss-jira mailing list