1.mvn clean --settings ./settings.xml
[ERROR] Could not create local repository at /github/workspace/repository -> [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/LocalRepositoryNotAccessibleException
需要注释掉settings.xml文件中的localRepository配置
<!-- <localRepository>/github/workspace/repository/</localRepository>-->
2.mvn clean
[ERROR] Failed to execute goal on project xxx-build: Could not resolve dependencies for project com.xxx.xxx:xxx-build:pom:1.0.0-SNAPSHOT: The following artifacts could not be resolved: com.xxx.xxx:xxx-server-wdd-engine:jar:1.0.0-SNAPSHOT (absent),com.xxx.xxx:xxx-wdd-engine-connector-influxdb-side:jar:1.0.0-SNAPSHOT (absent): com.xxx.xxx:xxx-server-wdd-engine:jar:1.0.0-SNAPSHOT was not found in https://xxx.xxx.xxx.xxx:8080/artifactory/xxx during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of wdd-devops has elapsed or updates are forced -> [Help 1]需要把pom.xml里面的goals注释掉,暂不清楚什么原因
<build> <plugins> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-antrun-plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <id>clean</id> <phase>clean</phase> <goals> <!-- <goal>run</goal> 注释这行,不然mvn clean会报错。但是注释掉再执行mvn clean就不会删打包好的包了--> </goals> <configuration> <target> <delete dir="${project.basedir}/xxxxxxx"/> </target> </configuration> </execution> <execution> <phase>package</phase> <goals> <goal>run</goal> </goals> <configuration> <target> <!----> </target> </configuration> </execution> </executions> </plugin> </plugins> </build>
3.mvn clean package -pl xxxx -am --settings ./settings.xml
Caused by: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x248b2b61) cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module @0x248b2b61
这个是因为本地的java环境变量没配好,需要jdk1.8版本。
通过java -version查看当前版本
标签:settings,xxx,maven,命令,报错,clean,ERROR,com,mvn From: https://www.cnblogs.com/wdgde/p/18305986