I'm trying to build my project but when I do mvn clean install
I get package javax.xml.ws does not exist
. In the same project if I do sudo mvn clean install
I get no errors and my project run smoothly!
I have installed the following maven version
$ mvn --version
Apache Maven 3.6.0
Maven home: /usr/share/maven
Java version: 11.0.9.1, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
I have both java 8 and java 11 installed but currently I use java 8
$ java -version
openjdk version "1.8.0_275"
OpenJDK Runtime Environment (build 1.8.0_275-8u275-b01-0ubuntu1~18.04-b01)
OpenJDK 64-Bit Server VM (build 25.275-b01, mixed mode)
Maven is installed under user repo so why does it need sudo
?
It's the only project that something like that occurs as I have been using mvn clean install
in other projects without problem.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…