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再說。
