eclipse编译项目jar,git管理代码

2015-3-10 settings.xml文件:

<localRepository>C:\Users\xxx\.m2\repository</localRepository>  

--C:\Users\xxx\.m2\settings.xml--

--D:\apache-maven-3.2.3\conf\settings.xml--

设置环境变量:

MAVEN_HOME=D:\apache-maven-3.2.3

Path=%MAVEN_HOME%\bin;

Eclipse设置: Preferences ->Maven ->Installations Preferences ->Maven ->User Settings                        

Global Settings: D:\apache-maven-3.2.3\conf\settings.xml                        

User Settings: C:\Users\xxx\.m2\settings.xml                        

Local Repository: C:\Users\xxx\.m2\repository

 

第一步:配置好maven地址

第二步:git分支多个jar工程的话,单独的放置在一个workspace中,如果有同一分支而本地分支不同的话,在运行的时候将其他的不开发不合并不运行的分支先关闭掉。避免工程间串代码

第三步:servers配置的tomcat发布目录,不要手动去deploy目录下面删除文件,而是通过eclipse来clean,后publish来重新发布

第四步:Maven -> Update project,重新来进行maven编译工程为jar

以上解决maven项目打包jar来发布项目不成功的问题。

 

posted @ 2016-04-05 14:17  全新时代-小小程序员大梦想  阅读(563)  评论(1编辑  收藏  举报