无法执行目标org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile

时间:2019-12-12 17:21:31

标签: java maven maven-plugin

当我构建项目时,会出现以下错误。我尝试删除.m2存储库文件夹,但错误保持不变。如果有人对如何解决此问题有任何想法,请提供帮助。

我也尝试过更改pom,但是它也不起作用,我还问老师是否知道问题出在哪里,但是我没有运气

cd D:\LAPR; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_181" M2_HOME=C:\\opt\\apache-maven-3.6.3 cmd /c "\"\"C:\\opt\\apache-maven-3.6.3\\bin\\mvn.cmd\" -Dmaven.ext.class.path=\"D:\\New Folder\\NetBeans-11.2\\netbeans\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 install\""
Scanning for projects...

Some problems were encountered while building the effective model for lapr3:ride-sharing:jar:1.1-SNAPSHOT
'dependencies.dependency.systemPath' for lapr3:ride-sharing-assessment-interfaces:jar should not point at files within the project directory, ${project.basedir}/third-parties/ride-sharing-assessment-interfaces-1.1.jar will be unresolvable by dependent projects @ line 29, column 25

It is highly recommended to fix these problems because they threaten the stability of your build.

For this reason, future Maven versions might no longer support building such malformed projects.


-------------------------< lapr3:ride-sharing >-------------------------
Building ride-sharing 1.1-SNAPSHOT
--------------------------------[ jar ]---------------------------------

--- jacoco-maven-plugin:0.8.5:prepare-agent (default-prepare-agent) @ ride-sharing ---
argLine set to -javaagent:C:\\Users\\USER\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.5\\org.jacoco.agent-0.8.5-runtime.jar=destfile=D:\\LAPR\\target\\jacoco.exec

--- maven-resources-plugin:2.6:resources (default-resources) @ ride-sharing ---
Using 'UTF-8' encoding to copy filtered resources.
Copying 2 resources

--- maven-compiler-plugin:3.8.1:compile (default-compile) @ ride-sharing ---
Changes detected - recompiling the module!
Compiling 29 source files to D:\LAPR\target\classes
-------------------------------------------------------------
COMPILATION WARNING : 
-------------------------------------------------------------
lapr/project/utils/Graph.java:[59,47] unchecked cast
  required: V[]
  found:    java.lang.Object
lapr/project/utils/Graph.java:[90,17] found raw type: lapr.project.utils.Edge
  missing type arguments for generic class lapr.project.utils.Edge<V,E>
lapr/project/utils/Graph.java:[91,27] unchecked method invocation: method add in interface java.util.List is applied to given types
  required: E
  found: lapr.project.utils.Edge
lapr/project/utils/Graph.java:[91,28] unchecked conversion
  required: E
  found:    lapr.project.utils.Edge
lapr/project/utils/Graph.java:[334,48] unchecked cast
  required: lapr.project.utils.Graph<V,E>
  found:    java.lang.Object
lapr/project/utils/Graph.java:[16,8] Class lapr.project.utils.Graph overrides equals, but neither it nor any superclass overrides hashCode method
lapr/project/utils/Vertex.java:[77,49] unchecked cast
  required: lapr.project.utils.Vertex<V,E>
  found:    java.lang.Object
lapr/project/utils/Vertex.java:[19,8] Class lapr.project.utils.Vertex overrides equals, but neither it nor any superclass overrides hashCode method
lapr/project/utils/Edge.java:[18,35] found raw type: java.lang.Comparable
  missing type arguments for generic class java.lang.Comparable<T>
lapr/project/utils/Edge.java:[70,47] unchecked cast
  required: V[]
  found:    java.lang.Object
lapr/project/utils/Edge.java:[89,43] unchecked cast
  required: lapr.project.utils.Edge<V,E>
  found:    java.lang.Object
lapr/project/utils/Edge.java:[120,39] unchecked cast
  required: lapr.project.utils.Edge<V,E>
  found:    java.lang.Object
lapr/project/utils/Edge.java:[18,8] Class lapr.project.utils.Edge overrides equals, but neither it nor any superclass overrides hashCode method
13 warnings 
-------------------------------------------------------------
-------------------------------------------------------------
COMPILATION ERROR : 
-------------------------------------------------------------
/D:/LAPR/src/main/java/lapr/project/utils/Graph.java: warnings found and -Werror specified
1 error
-------------------------------------------------------------
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time:  4.019 s
Finished at: 2019-12-12T16:02:22Z
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project ride-sharing: Compilation failure
/D:/LAPR/src/main/java/lapr/project/utils/Graph.java: warnings found and -Werror specified

-> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

0 个答案:

没有答案