当前位置: 首页 > 知识库问答 >
问题:

MAVEN安装错误无法在本地创建jar文件

艾国安
2023-03-14

我试图克隆一个后端项目并在本地运行:mvn install来创建jar文件,然后部署到aws,但即使java和maven安装正确,也会出现错误

[INFO] -------------------------< com.example:KnCare >---------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/bilal.ladoui/KnCare/KnCare-Rest/src/main/java/com/knits/kncare/mapper/GroupMapper.java:[35,11] The type of parameter "dto" has no property named "memberIds".
[ERROR] /C:/Users/bilal.ladoui/KnCare/KnCare-Rest/src/main/java/com/knits/kncare/mapper/GroupMapper.java:[35,11] Qualifier error. No method found annotated with @Named#value: [ toModelGroupMembership ]. See https://mapstruct.org/faq/#qualifier for more info.
[ERROR] /C:/Users/bilal.ladoui/KnCare/KnCare-Rest/src/main/java/com/knits/kncare/mapper/GroupMapper.java:[35,11] Can't map property "Set<GroupMembershipDto> groupMemberships" to "Set<GroupMembership> groupMemberships". Consider to declare/implement a mapping method: "Set<GroupMembership> map(Set<GroupMembershipDto> value)".
[ERROR] /C:/Users/bilal.ladoui/KnCare/KnCare-Rest/src/main/java/com/knits/kncare/mapper/GroupMapper.java:[42,10] Unknown property "memberIds" in result type Group. Did you mean "members"?
[INFO] 4 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.496 s
[INFO] Finished at: 2022-01-01T10:28:26+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project KnCare: Compilation failure: Compilation failure:
[ERROR] /C:/Users/bilal.ladoui/KnCare/KnCare-Rest/src/main/java/com/knits/kncare/mapper/GroupMapper.java:[35,11] The type of parameter "dto" has no property named "memberIds".
[ERROR] /C:/Users/bilal.ladoui/KnCare/KnCare-Rest/src/main/java/com/knits/kncare/mapper/GroupMapper.java:[35,11] Qualifier error. No method found annotated with @Named#value: [ toModelGroupMembership ]. See https://mapstruct.org/faq/#qualifier for more info.
[ERROR] /C:/Users/bilal.ladoui/KnCare/KnCare-Rest/src/main/java/com/knits/kncare/mapper/GroupMapper.java:[35,11] Can't map property "Set<GroupMembershipDto> groupMemberships" to "Set<GroupMembership> groupMemberships". Consider to declare/implement a mapping method: "Set<GroupMembership> map(Set<GroupMembershipDto> value)".
[ERROR] /C:/Users/bilal.ladoui/KnCare/KnCare-Rest/src/main/java/com/knits/kncare/mapper/GroupMapper.java:[42,10] Unknown property "memberIds" in result type Group. Did you mean "members"?
[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

共有3个答案

陆海阳
2023-03-14

您在GroupMapper中得到一个编译错误。JAVA你能给我们看这节课吗?您可能遇到了一些运行时依赖性问题,甚至是强制转换问题。

尝试使用完整跟踪运行目标,并向我们展示它所说的内容:

mvn install -X

这样我们可以更准确地看到发生了什么。你能给我们看看你的pom.xml?

我们没有什么信息可以帮助您,请尝试为您的问题添加更多详细信息。

金理
2023-03-14

项目的GroupMapper类中存在编译错误。尝试修复它们或联系GIT存储库的所有者以修复损坏的分支。

东典
2023-03-14

您得到的是编译错误。首先修复编译错误,然后尝试构建项目。

 类似资料:
  • 我试图克隆一个后端项目,并运行:mvn安装本地创建jar文件,并部署到aws之后,但它的错误甚至java和maven安装正确

  • 我检查了/m2/repository。但找不到任何相关的东西。

  • 我试图在乌班图12.06上安装opencv(3.1.0)。此错误是什么意思?是否第二次观察到开放 CV 模块?我该如何修复它? 环境变量设置 cmake/opencvModule.cmake处出现CMake错误:268(消息):< br >再次观察到目录/home/user/bin/opencv/modules中有OpenCV模块。< br >调用堆栈(最近的调用优先):< br > module

  • 我正在我的Mac上安装APE(Ajax推送引擎)。但它在安装过程中给了我一个错误, 我的计算机上安装了gcc:给出了“gcc版本4.2.1(基于Apple Inc.build 5658)(LLVM build 2336.1.00)” 如何删除此错误?

  • 我使用NetBeans 8.0和JDK 1.8以及MySQL驱动程序5.1.31。 虽然清理和构建输出窗口显示错误- xml文件中第893行显示-

  • 问题内容: 我正在尝试将MySQL安装到最新版本,这是因为某些安装错误。我运行命令,并且收到以下信息: 构建本机扩展。这可能需要一段时间…错误:安装mysql时出错:错误:无法生成gem本机扩展。 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb extconf.rb:4:警告:PATH模式