最近在学习maven+nexus的配置,有些地方不太明白,请高人指点。
1. setting.xml中mirror与repository 有什么区别啊?是不是配置其中一个就行了?
2. 我将一个web项目分成了如下四个模块:
   util
     |--pom.xml
   persist
     |--pom.xml
   service
     |--pom.xml
   web
     |--pom.xml请问,我在myeclipse中,通过web.xml中的pom.xml运行mvn install 出现以下错误:
  Try downloading the file manually from the project website.  Then, install it using the command: 
      mvn install:install-file -DgroupId=com.bbs -DartifactId=bbs-service -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=com.bbs -DartifactId=bbs-service -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]  Path to dependency: 
   1) com.bbs:bbs-web:war:1.0-SNAPSHOT
   2) com.bbs:bbs-service:jar:1.0-SNAPSHOT----------
1 required artifact is missing.
  要怎么解决这个问题呢?难道要每次都手动向nexus中添加一次吗?在线等,谢谢!

解决方案 »

  1.   

    你最好建一个parent pom,用modules把每个模块都包含起来,这样对parent进行mvn install的时候,maven会自动判断依赖关系,按照顺序进行构建。你这样分开,只好自己手工先对com.bbs:bbs-service进行mvn install,才能继续构建其他的模块。
      

  2.   

    自己的理解有问题,根本没必要把一个简单的项目划分为四个独立的模块,若是想分为四个模块,那就不停地向nexus中deploy吧。
      

  3.   

    上面的项目模块最后被我整合为2个,一个业务模块,一个工具模块。工具模块发布至nexus