Search code examples
javamavenspring-mvcdependenciespom.xml

StringEscapeUtils can not be resolved


I have added the dependency in pom.xml

<dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.1</version>
        </dependency>

but when i update maven dependencies and import the EscapeStringUtils using

import org.apache.commons.lang3.StringEscapeUtils;

i get it red underlined and error which states :

The import org.apache.commons.lang3.StringEscapeUtils cannot be resolved

Jar file is there (downloaded) now how can i fix it, i have no idea. Kindly help me.

Thanks


Solution

  • Thanks for all replies, i solved it by downloading manually the .jar file from the following link and overwrite the existing jar downloaded by maven. (i don't know why it started working after manual download, but after all, its working)

    http://commons.apache.org/proper/commons-lang/download_lang.cgi