1. 程式人生 > >maven 錯誤收集snapshotRepository

maven 錯誤收集snapshotRepository

The packaging for this project did not assign a file to the build artifact

當maven執行install:install出現如上錯誤時,則嘗試改用install執行

當maven執行deploy:deployl出現如上錯誤時,則嘗試改用deployl執行

Failed to deploy artifacts: Could not transfer artifact xxxx:pom:0.0.1-20141122.035618-1 from/to snapshots (http://localhost:8081/nexus/content/repositories/snapshots): Failed to transfer file: http://localhost:8081/nexus/content/repositories/snapshots/xxx/0.0.1-SNAPSHOT/xxx-0.0.1-20141122.035618-1.pom. Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]

當出現如上錯誤時,可能是maven的pom檔案中未配置<server>節點,或者當前專案中distributionManagement節點下的repository或snapshotRepository的id不再maven的server配置中