解决一个maven超坑的问题

F:\JAVA\jdk\bin\java.exe -Dmaven.multiModuleProjectDirectory=F:\SmartOA “-Dmaven.home=C:\Program Files\Apache\maven” “-Dclassworlds.conf=C:\Program Files\Apache\maven\bin\m2.conf” “-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2018.3.1\lib\idea_rt.jar=5407:C:\Program Files\JetBrains\IntelliJ IDEA 2018.3.1\bin” -Dfile.encoding=UTF-8 -classpath “C:\Program Files\Apache\maven\boot\plexus-classworlds-2.5.2.jar” org.codehaus.classworlds.Launcher -Didea.version=2018.3.1 -s “C:\Program Files\Apache\maven\conf\settings.xml” “-Dmaven.repo.local=C:\Program Files\Apache\maven\maven-repository” clean
[INFO] Scanning for projects…
[INFO]
[INFO] ------------------------< com.SmartOA:SmartOA >-------------------------
[INFO] Building SmartOA 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] — maven-clean-plugin:2.5:clean (default-clean) @ SmartOA —
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6.pom
[WARNING] Failed to create parent directories for tracking file C:\Program Files\Apache\maven\maven-repository\org\apache\maven\maven-plugin-api\2.0.6\maven-plugin-api-2.0.6.pom.lastUpdated
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/3.0/plexus-utils-3.0.pom
[WARNING] Failed to create parent directories for tracking file C:\Program Files\Apache\maven\maven-repository\org\codehaus\plexus\plexus-utils\3.0\plexus-utils-3.0.pom.lastUpdated
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.221 s
[INFO] Finished at: 2020-02-21T21:02:06+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project SmartOA: Execution default-clean of goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean failed: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-clean-plugin:jar:2.5 -> org.apache.maven:maven-plugin-api:jar:2.0.6: Failed to read artifact descriptor for org.apache.maven:maven-plugin-api:jar:2.0.6: Could not transfer artifact org.apache.maven:maven-plugin-api:pom:2.0.6 from/to alimaven (http://maven.aliyun.com/nexus/content/groups/public/): C:\Program Files\Apache\maven\maven-repository\org\apache\maven\maven-plugin-api\2.0.6\maven-plugin-api-2.0.6.pom.part.lock (系统找不到指定的路径。) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

新建maven无法成功运行的原因是,maven仓库放在了C盘,idea没有权限在下面创建文件,把maven仓库放在别的盘可解决

需要修改setting.xml和idea软件内部的两个地方生效。

你可能感兴趣的:(乱七)