原因是run configuration -> maven -> preject name -> Parameters -> command line中是install:install. 改成install就可以了. 参考: http://stackoverflow.com/questions/6308162/maven-the-packaging-for-this-project-did-not-assign-a-file-to-the-build-artifac