spring boot打jar包遇到错误

错误内容:
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.springboot.authentication:authentication:jar:0.0.1-SNAPSHOT
[WARNING] 'dependencies.dependency.scope' for org.springframework.boot:spring-boot-starter-jdbc:jar must be one of [provided, compile, runtime, test, system] but is 'jdbc'. @ line 122, column 11
[WARNING] 'dependencies.dependency.scope' for org.springframework.boot:spring-boot-starter-data-jpa:jar must be one of [provided, compile, runtime, test, system] but is 'jpa'. @ line 129, column 11
[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 authentication 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact jstl:jstl:jar:1.1.2 has been relocated to javax.servlet:jstl:jar:1.1.2
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ authentication ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 683 resources to META-INF/resources
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ authentication ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 98 source files to E:\Users\yyt\ntzm_workspace\newAuthentication\target\classes
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING : 
[INFO] -------------------------------------------------------------
[WARNING] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/service/UserInfoService.java:[13,52] com.sun.org.apache.xpath.internal.operations.Bool是内部专用 API, 可能会在未来发行版中删除
[WARNING] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/service/UserInfoService.java:[13,52] com.sun.org.apache.xpath.internal.operations.Bool是内部专用 API, 可能会在未来发行版中删除
[INFO] 2 warnings 
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/AuthenticationApplication.java:[13,35] 程序包org.apache.tomcat.jdbc.pool不存在
[ERROR] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/AuthenticationApplication.java:[23,43] 程序包org.springframework.jdbc.datasource不存在
[ERROR] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/AuthenticationApplication.java:[24,39] 程序包org.springframework.transaction不存在
[ERROR] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/AuthenticationApplication.java:[25,50] 程序包org.springframework.transaction.annotation不存在
[ERROR] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/AuthenticationApplication.java:[36,2] 找不到符号
  符号: 类 EnableTransactionManagement
[ERROR] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/AuthenticationApplication.java:[116,49] 找不到符号
  符号:   类 DataSource
  位置: 类 com.springboot.authentication.AuthenticationApplication
[ERROR] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/AuthenticationApplication.java:[116,12] 找不到符号
  符号:   类 PlatformTransactionManager
  位置: 类 com.springboot.authentication.AuthenticationApplication
[ERROR] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/AuthenticationApplication.java:[121,28] 找不到符号
  符号:   类 PlatformTransactionManager
  位置: 类 com.springboot.authentication.AuthenticationApplication
[INFO] 8 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.260 s
[INFO] Finished at: 2017-10-30T16:54:50+08:00
[INFO] Final Memory: 34M/340M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project authentication: Compilation failure: Compilation failure:
[ERROR] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/AuthenticationApplication.java:[13,35] 程序包org.apache.tomcat.jdbc.pool不存在
[ERROR] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/AuthenticationApplication.java:[23,43] 程序包org.springframework.jdbc.datasource不存在
[ERROR] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/AuthenticationApplication.java:[24,39] 程序包org.springframework.transaction不存在
[ERROR] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/AuthenticationApplication.java:[25,50] 程序包org.springframework.transaction.annotation不存在
[ERROR] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/AuthenticationApplication.java:[36,2] 找不到符号
[ERROR] 符号: 类 EnableTransactionManagement
[ERROR] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/AuthenticationApplication.java:[116,49] 找不到符号
[ERROR] 符号:   类 DataSource
[ERROR] 位置: 类 com.springboot.authentication.AuthenticationApplication
[ERROR] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/AuthenticationApplication.java:[116,12] 找不到符号
[ERROR] 符号:   类 PlatformTransactionManager
[ERROR] 位置: 类 com.springboot.authentication.AuthenticationApplication
[ERROR] /E:/Users/yyt/ntzm_workspace/newAuthentication/src/main/java/com/springboot/authentication/AuthenticationApplication.java:[121,28] 找不到符号
[ERROR] 符号:   类 PlatformTransactionManager
[ERROR] 位置: 类 com.springboot.authentication.AuthenticationApplication
[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文件debug的jre版本和项目的jre版本不一致导致的。
pom文件debug的时候配置jre版本示意图


项目build path的jre版配置示意图





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值