NutzCN Logo
问答 maven项目引入额外jar,jar生命周期问题
发布于 2530天前 作者 蛋蛋的忧伤 2518 次浏览 复制 上一个帖子 下一个帖子
标签:

我在maven项目中手动将一个jar添加到项目中,在install项目的时候报了:

D:\java\jdk\bin\java "-Dmaven.multiModuleProjectDirectory=F:\IDEA for Java WorkSpace\Infogather_V2" -DarchetypeCatalog=internal -Dmaven.home=F:\开发工具包\.m2\apache-maven-3.5.0 -Dclassworlds.conf=F:\开发工具包\.m2\apache-maven-3.5.0\bin\m2.conf "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.2\lib\idea_rt.jar=60942:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.2\bin" -Dfile.encoding=UTF-8 -classpath F:\开发工具包\.m2\apache-maven-3.5.0\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2017.1.2 -s F:\开发工具包\.m2\setting.xml compile
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.yixin.infogather:Infogather_V2:war:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: junit:junit:jar -> version 3.8.1 vs 4.12 @ line 63, column 17
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: junit:junit:jar -> version 3.8.1 vs 4.12 @ line 69, column 17
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building Infogather_V2 Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Infogather_V2 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Infogather_V2 ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 18 source files to F:\IDEA for Java WorkSpace\Infogather_V2\target\classes
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING : 
[INFO] -------------------------------------------------------------
[WARNING] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/controll/WeixinModule.java: 某些输入文件使用或覆盖了已过时的 API。
[WARNING] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/controll/WeixinModule.java: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
[INFO] 2 warnings 
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[3,30] 程序包it.sauronsoftware.jave不存在
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[4,30] 程序包it.sauronsoftware.jave不存在
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[5,30] 程序包it.sauronsoftware.jave不存在
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[19,9] 找不到符号
  符号:   类 AudioAttributes
  位置: 类 com.infogather.util.ChangeAudioFormat
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[19,37] 找不到符号
  符号:   类 AudioAttributes
  位置: 类 com.infogather.util.ChangeAudioFormat
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[20,9] 找不到符号
  符号:   类 Encoder
  位置: 类 com.infogather.util.ChangeAudioFormat
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[20,31] 找不到符号
  符号:   类 Encoder
  位置: 类 com.infogather.util.ChangeAudioFormat
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[23,9] 找不到符号
  符号:   类 EncodingAttributes
  位置: 类 com.infogather.util.ChangeAudioFormat
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[23,40] 找不到符号
  符号:   类 EncodingAttributes
  位置: 类 com.infogather.util.ChangeAudioFormat
[INFO] 9 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.419 s
[INFO] Finished at: 2017-05-22T11:40:01+08:00
[INFO] Final Memory: 16M/175M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Infogather_V2: Compilation failure: Compilation failure: 
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[3,30] 程序包it.sauronsoftware.jave不存在
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[4,30] 程序包it.sauronsoftware.jave不存在
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[5,30] 程序包it.sauronsoftware.jave不存在
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[19,9] 找不到符号
[ERROR]   符号:   类 AudioAttributes
[ERROR]   位置: 类 com.infogather.util.ChangeAudioFormat
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[19,37] 找不到符号
[ERROR]   符号:   类 AudioAttributes
[ERROR]   位置: 类 com.infogather.util.ChangeAudioFormat
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[20,9] 找不到符号
[ERROR]   符号:   类 Encoder
[ERROR]   位置: 类 com.infogather.util.ChangeAudioFormat
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[20,31] 找不到符号
[ERROR]   符号:   类 Encoder
[ERROR]   位置: 类 com.infogather.util.ChangeAudioFormat
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[23,9] 找不到符号
[ERROR]   符号:   类 EncodingAttributes
[ERROR]   位置: 类 com.infogather.util.ChangeAudioFormat
[ERROR] /F:/IDEA for Java WorkSpace/Infogather_V2/src/main/java/com/infogather/util/ChangeAudioFormat.java:[23,40] 找不到符号
[ERROR]   符号:   类 EncodingAttributes
[ERROR]   位置: 类 com.infogather.util.ChangeAudioFormat
[ERROR] -> [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/MojoFailureException

Process finished with exit code 1

这个应该是jar包的声明周期问题,对应maven的一个scope属性,但是由于是额外的jar,我不太清楚应该怎么搞...

添加回复
请先登陆
回到顶部