ecplise将项目以jar的方式发布到私有仓库
第一步右击pom文件内任意点,选择Run As ->Run Configurations
第二步设置打包命令

此时若是打包,你没有设置过 installed jres的话会报错No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
意思是jdk打包,不是jre
设置下就行了
步骤 window->preferences->java->instakked jres

若是存在直接选择jdk就好了,若是没有添加一个就行了
添加步骤:
add->standard Vm

选择你jdk的安装位置
执行run -》maven build就会按你pom文件的配置进行打包上传了
欢迎关注本站公众号,获取更多信息