当前位置:   article > 正文

IDEA Maven项目源码移植问题_subsequent incremental build will compile files fo

subsequent incremental build will compile files for changed sources and remo

问题描述

笔者在将IDEA Maven项目源代码从Windows IDEA平台移植到Linux IDEA平台,更改相应配置后重新构建项目时,出现了以下问题:

org.codehaus.plexus.component.repository.exception.ComponentLookupException: com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Error injecting constructor, java.lang.NoSuchMethodError: org.apache.maven.model.validation.DefaultModelValidator: method <init>()V not found
  at org.jetbrains.idea.maven.server.embedder.CustomModelValidator.<init>(Unknown Source)
  while locating org.jetbrains.idea.maven.server.embedder.CustomModelValidator
  at ClassRealm[maven.ext, parent: ClassRealm[plexus.core, parent: null]] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
  while locating org.apache.maven.model.validation.ModelValidator annotated with @com.google.inject.name.Named(value=ide)

1 error
      role: org.apache.maven.model.validation.ModelValidator
  roleHint: ide
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

解决方法

IDEA项目结构
删除项目结构中.idea(原有平台配置文件)文件夹,在项目根目录下运行mvn clean命令,然后更改相应配置重新构建即可。只保留src目录与pom.xml文件即可。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/255300
推荐阅读
相关标签
  

闽ICP备14008679号