git+maven+eclipse collaborative development

 

The existing environment of the machine: 1. maven, maven for eclipse plug-in m2eclipse

                            2. Github environment, and configure the home environment variable. Configure the public key required for SSH login. For details, please refer to the Github official website. Verification method: Execute ssh -T [email protected] from the command line, there will be a success prompt



 

 

 

Install the plugin EGit for git eclipse:

               1. The version is very important when installing EGit. Finally, I found my own version on http://wiki.eclipse.org/EGit/FAQ#Where_can_I_find_older_releases_of_EGit.3F, and finally downgraded it all the time. The installation was successful when updates-1.0 was selected.

                2. Then configure the EGit plugin.




 
              3. Configure SSH login: In the SSH2 General configuration window, select the ssh2 home path. Note that the last level should be .ssh instead of the ssh folder. In the SSH2 Key Management window, select Load Existing Key to load the id_rsa file in the .ssh directory just now. , then choose apply, OK (close the window).

 

          Verify the configuration just now, when exporting the project on Github, the error "Exception caught during execution of ls-remote command" is always reported. Later, I found the answer on stackoverflow, in Window --> Preferences --> Team --> Git - -> remote connection timeout default is 30 seconds,

I just changed it to a bigger size, and changed it to 120! ! !

 

 

===========================================================

export git maven project 

refer to

http://www.cnblogs.com/lpshou/archive/2013/07/18/3199243.html, recommended method 2

 

Here is an example:

(1)

import => Projects from Git => 选择 uri 

[email protected]:luckytyy/jeeshop_springmvc.git, next step

Finally, choose to export as General project. window closes

Special Note: Please pay attention to choose https or ssh method,

For the https method, please enter the account password registered on the github website.

If it is the git method, it is best to configure ssh free login. For specific differences, please refer to the GitHub official website for explanation! !

 

(2) Right-click the project and convert it to a maven project.


 
Then, right-click the project properties == "Project Facets and select convert to faceted from. Finally, select Dynamic Web Module 2.5 and java 1.6 versions. Check tomcat in the runtimes. Of course, if you If it is jdk1.7, you can select web module 3.0 and then click on Further configuration available... to pop up the Modify Faceted Project window

Configure the path of web.xml, click apply, click Ok

Special attention here : Please use tomcat6 as much as possible. I have not studied why tomcat7 occasionally has problems. 

 

(3) Then reopen the properties window and add maven dependencies to the deployment Assembly interface.

 

然后配置完成,可以右键运行项目啦!!

 

提交git更改的时候,先commit到本地仓库,然后整个右键项目 remote ==》 push,然后【这里就是需要把时间等待设置长一点,前面讲到过了】,然后选择 master 或者其他 版本,最后 点击右边的 add specific,继续下一步,可以看到如图所示的 信息,继续确定或者下一步即可提交到 远程 git仓库。



 

 

 最后,有三个jar包在 maven的中央仓库上是没有的,需要自己下载,并安装到本地maven环境。

 

附上 安装本地jar包 到maven环境的执行语句:

mvn install:install-file -DgroupId=com.test.tanyy -DartifactId=sinaWeibo -Dversion=1.0 -Dpackaging=jar -Dfile=E:\sinaWeibo.jar

 

mvn install:install-file -DgroupId=com.test.tanyy -DartifactId=qqLoginSdk4J -Dversion=1.0 -Dpackaging=jar -Dfile=E:\qqLoginSdk4J.jar


mvn install:install-file -DgroupId=com.test.tanyy -DartifactId=QRCode -Dversion=1.0 -Dpackaging=jar -Dfile=E:\QRCode.jar

 

附件中已上传jar包

 

 

 

 

  The existing environment of the machine: 1.maven, maven for eclipse plug-in m2eclipse [I tried it for a long time before, and finally I paid attention to the picture below to get it done] 2.Github environment, and configure the home environment variable. Configure the public key required for SSH login. For details, please refer to the Github official website. Verification method: Execute ssh -T [email protected] from the command line, and you will be prompted to

      install the plug-in EGit of git eclipse: 1. The version is very important when installing EGit. Finally, I found my own version on http://wiki.eclipse.org/EGit/FAQ#Where_can_I_find_older_releases_of_EGit.3F, and finally downgraded it all the time. The installation was successful when updates-1.0 was selected. 2. Then configure the EGit plugin.


 
              3. Configure SSH login: In the SSH2 General configuration window, select the ssh2 home path. Note that the last level should be .ssh instead of the ssh folder. In the SSH2 Key Management window, select Load Existing Key to load the id_rsa file in the .ssh directory just now. , then choose apply, OK (close the window). Verify the configuration just now, when exporting the project on Github, the error "Exception caught during execution of ls-remote command" is always reported. Later, I found the answer on stackoverflow, in Window --> Preferences --> Team --> Git - -> remote connection timeout is 30 seconds by default, I can change it a little bigger, and change it to 120! ! ! ===================================================== ========= Export git maven project reference http://www.cnblogs.com/lpshou/archive/2013/07/18/3199243.html, recommended method 2 The following is an example: (1) import => Projects from Git => Select uri [email protected]:luckytyy/jeeshop_springmvc.git, and finally choose to export as General project. The window closes Special Note: Please pay attention to choose https or ssh method, and for https method, please enter the account password registered on the github website. If it is the git method, it is best to configure ssh free login. For specific differences, please refer to the GitHub official website for explanation! !   (2) Right-click the project and convert it to a maven project.


 
Then, right-click the project properties == "Project Facets and select convert to faceted from. Finally, select Dynamic Web Module 2.5 and java 1.6 versions. Check tomcat in the runtimes. Of course, if you If it is jdk1.7, you can select web module 3.0 and then click on Further configuration available..., the Modify Faceted Project window will pop up to configure the path of web.xml, click apply, click Ok, and pay special attention here : please use tomcat6 as much as possible. What tomcat7 occasionally has problems (3) and then reopen the properties window, and add maven dependencies to the deployment Assembly interface. Then the configuration is complete, you can right-click to run the project! ! When submitting git changes, first commit to the local warehouse, then the entire right-click project remote ==" push, then [here is to set the time to wait longer, as mentioned earlier], then select master or other versions, and finally click Add specific on the right, continue to the next step, you can see the information as shown in the figure, continue to confirm or the next step can be submitted to the remote git repository.

     Finally, there are three jar packages that are not available in the maven central repository, and need to be downloaded and installed in the local maven environment. Attach the execution statement to install the local jar package to the maven environment: mvn install:install-file -DgroupId=com.test.tanyy -DartifactId=sinaWeibo -Dversion=1.0 -Dpackaging=jar -Dfile=E:\sinaWeibo.jar   in the attachment The jar package has been uploaded        

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326523356&siteId=291194637