I\'m using MyEclipse to develop a really simple Java Struts project. Everything was working fine until I wanted to use the StringUtils
class in org.apac
I did "mvn clean install -U" without settings.xml, so it erred. Then I added settings.xml, did "mvn clean install -U", it said "error:org.apache.commons-lang does not exist". I know the code was built successfully on another machine. So it was not my code. After about 2 or 3 hours, I finally realized it was .m2\repository was corrupted by my first run. So just delete "repository" folder complete and run "mvn clean install -U" and succeeded.
Adding following dependency to pom.xml in dependencies tag helped me:
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
In src/main/java there would be a .auth folder. Open the folder, Go to AuthController.java file and delete the import io.swagger line. Restart.
Better go with below to avoid clashes :
import org.springframework.util.StringUtils;
Try running the following commands and examine the output:
$ mvn dependency:tree
$ mvn help:effective-pom
Look for commons-lang
, maybe something will draw your attention like excludes or dependency overrides. Also, is:
$ mvn dependency:copy-dependencies
copying commons-lang
JAR to your target
?