Maven 那些破事

deploy 只上传了pom

晚上输命令,打算打包上传到本地库里,然后去服务器上部署新版本

mvn clean package deploy

结果看着mvn的build过程只是上传了pom,去库服务器看了也只有pom文件,这让人相当懊恼。翻来覆去,突然看到项目pom文件里

    <groupId>X-Pro</groupId>
    <artifactId>Y-Service</artifactId>
    <packaging>pom</packaging>
    <version>1.0-SNAPSHOT</version>

packaging一项怎么变成了pom了,原来好像是jar还是war这类的,尼玛今天intellij一直抽风一天到晚把Java版本调成1.5的,居然把pom也换掉了。。。,当然也可能是自己乱改配置什么时候变掉了。然后改回jar,在mvn命令提示:

$ mvn clean package deploy -U
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project XXXXXXX:YYYYYYY:1.0-SNAPSHOT (/Users/hegaofeng/IdeaProjects/XXXXXXX/pom.xml) has 1 error
[ERROR]     'packaging' with value 'jar' is invalid. Aggregator projects require 'pom' as packaging. @ line 8, column 13
[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

想起来今天把几个其他maven工程当做这个工程的module加到pom里,这个在工程mvn package时会去相应的编译更新子模块,想不到还有这限制,只生成pom不生成jar还搞个毛线啊,算了不用这个功能了。当然可定有高大上的用法,不过暂时先生成jar再说。

转载于:https://www.cnblogs.com/lailailai/p/4586938.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值