pom.xml 配置时出错

Powered by:NEFU AB-IN

pom.xml 配置时出错

以下恢复完错误后,一定要 update maven

  • 错误1

    • 错误

      This failure was cached in the local repository and resolution is not reattempted until the update interval of nexus-aliyun has elapsed or updates are forced.

    • 方法1

      一般是因为上次下载的库失败导致的(可能网不好)

      去自己maven库的文件夹下,打开cmd,运行这样一条语句

      for /r %i in (*.lastUpdated) do del %i
      

      目的是,循环递归删除没下好的包

    • 方法2

      如果更新完maven还没好,可能说明库中有些版本不对,建议把库的所有包都删了,重新保存pom.xml,重新下包

  • 错误2

    • 错误

      Could not initialize class org.apache.maven.plugin.war.util.WebappStructureSerializer

    • 方法

      POM中包含有maven-war-plugin插件,插件版本太低

      在插件群的标签中,加入插件即可

      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>3.3.1</version>
      </plugin>