一、该问题的重现步骤是什么?
1. 公司原本用的是bladex2.2版本,maven下载不了对应的包了,看帖子里说的最低支持2.5版本了,于是,找了台原来开发用的电脑,把里面的maven仓库目录中对应的bladex对应的2。2版本的所有包,导出到本地,尝试再运行项目,发现这种直接导入的库,maven不认,它还是要自己去下载,于是又尝试自己建个项目,普通的java项目,把代码导入,把所需要的jar包导入,竟然跑起来了,挺意外的,
2. 但在打包的时候,出问题了,打出来的Jar包执行报空指针异常
java -jar hx-pension.jar
Exception in thread "main" java.lang.NullPointerException
at org.springblade.core.launch.BladeApplication.createSpringApplicationBuilder(BladeApplication.java:84)
at org.springblade.core.launch.BladeApplication.run(BladeApplication.java:48)
at com.hx.Application.main(Application.java:19)
3.具体打包的操作如下
执行结果
二、你期待的结果是什么?实际看到的又是什么?
想问一下应该怎么打包才可以正常执行???
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
bladeBoot项目,,bladex2.2 win10
不用这么麻烦的,虽然私服没有老版本的依赖,但是你们可以下载BladeX-Tool对应的版本源码,然后下载导入,执行mvn clean install就可以依赖到了,具体版本下载连接:https://center.bladex.cn/blade/BladeX/releases
按您说的,我把您给的地址里的2。2版本下载了一份,并导入开发工具里,并执行了clean和install
结果还是不行,
E:\2020workdata\java\hx-pension\hx-pension-gov>mvn clean compile [INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Non-resolvable import POM: Failure to find org.springblade.platform:blade-bom:pom:2.2.0.RELEASE in http://nexus.gitee.ltd/repository/maven-releases/ was cached in the local repository, resolution will not be reattempted until the update interval of release has elapsed or updates are forced @ line 46, column 25 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-core-boot:jar is missing. @ line 58, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-datascope:jar is missing. @ line 68, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-swagger:jar is missing. @ line 72, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-tenant:jar is missing. @ line 76, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-develop:jar is missing. @ line 80, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-minio:jar is missing. @ line 84, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-qiniu:jar is missing. @ line 88, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-alioss:jar is missing. @ line 92, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-core-auto:jar is missing. @ line 96, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-core-test:jar is missing. @ line 106, column 21 [ERROR] 'dependencies.dependency.version' for com.baomidou:mybatis-plus-generator:jar is missing. @ line 129, column 21 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project com.hx:hx-pension-gov:2.2.0.RELEASE (E:\2020workdata\java\hx-pension\hx-pension-gov\pom.xml) has 12 errors [ERROR] Non-resolvable import POM: Failure to find org.springblade.platform:blade-bom:pom:2.2.0.RELEASE in http://nexus.gitee.ltd/repository/maven-releases/ was cached in the local repository, resolution will not be reattempted until the update interval of release has elapsed or updates are forced @ line 46, column 25 -> [Help 2] [ERROR] 'dependencies.dependency.version' for org.springblade:blade-core-boot:jar is missing. @ line 58, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-datascope:jar is missing. @ line 68, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-swagger:jar is missing. @ line 72, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-tenant:jar is missing. @ line 76, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-develop:jar is missing. @ line 80, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-minio:jar is missing. @ line 84, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-qiniu:jar is missing. @ line 88, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-alioss:jar is missing. @ line 92, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-core-auto:jar is missing. @ line 96, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-core-test:jar is missing. @ line 106, column 21 [ERROR] 'dependencies.dependency.version' for com.baomidou:mybatis-plus-generator:jar is missing. @ line 129, column 21 [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/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
谢谢,已经解决了,下载包的版本错误导致的错误,下载时,没注意,下载成了2.2.1版本了,应该下载2.2.0,更改为正确的版本,按您说的操作了一遍,可以了,谢谢您!
扫一扫访问 Blade技术社区 移动端