zoukankan      html  css  js  c++  java
  • mvn clean package 程序包com.google.gson不存在

    错误

    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project renren-fast: Compilation failure: Compilation failure:
    [ERROR] /C:/work/code/mucp_front/mucp-back/src/main/java/io/renren/common/utils/RedisUtils.java:[11,23] 程序包com.google.gson不存在
    [ERROR] /C:/work/code/mucp_front/mucp-back/src/main/java/io/renren/common/utils/RedisUtils.java:[41,26] 找不到符号
    [ERROR]   符号:   类 Gson
    [ERROR]   位置: 类 io.renren.common.utils.RedisUtils
    [ERROR] /C:/work/code/mucp_front/mucp-back/src/main/java/io/renren/modules/oss/controller/SysOssController.java:[11,23] 程序包com.google.gson不存在
    [ERROR] /C:/work/code/mucp_front/mucp-back/src/main/java/io/renren/modules/sys/oauth2/OAuth2Filter.java:[11,23] 程序包com.google.gson不存在
    [ERROR] /C:/work/code/mucp_front/mucp-back/src/main/java/io/renren/modules/sys/service/impl/SysConfigServiceImpl.java:[14,23] 程序包com.google.gson不存在
    [ERROR] /C:/work/code/mucp_front/mucp-back/src/main/java/io/renren/modules/sys/oauth2/NoneFilter.java:[11,23] 程序包com.google.gson不存在
    [ERROR] /C:/work/code/mucp_front/mucp-back/src/main/java/io/renren/common/aspect/SysLogAspect.java:[11,23] 程序包com.google.gson不存在
    [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
    

     解决方法

    在pom.xml添加一下内容

    <dependency>
              <groupId>com.google.code.gson</groupId>
              <artifactId>gson</artifactId>
              <version>1.7.2</version>
      </dependency>

    保存------执行maven-update project

  • 相关阅读:
    WinCE 编译固定IP到内核
    wince telnet登陆密码的取消
    lab 美国大学实验室
    PLC 开放性源代码的软件
    linux 嵌入式Linux下3G无线上网卡的驱动
    创业者/职业经理人/员工受用的36句感悟
    iShoot Developer Makes $600,000 In One Month
    如何彻底解决Vista狂读硬盘的问题
    宁做创业狼,不做打工狗
    跟我学EJBCA系列一:安装
  • 原文地址:https://www.cnblogs.com/dayspring/p/13975652.html
Copyright © 2011-2022 走看看