WSO2 Developer Studio - Maven Multi Module Project - Git
I have created one CAPP project and a ESB Config Projects. As you can see, following pom file and the two project files are there
pom.xml testCAPP testESBconfig
Then do a git init
Then add your git repository git remote add <remote_name> <repo_url>
git remote add origin https://github.com/chanukaranaba/testreposix
You could check the added remote by git remote -v
chanuka@Chanukas-MacBook-Pro.local:~/Desktop/new_folder/testreposix$git remote -v
origin https://github.com/chanukaranaba/testreposix.git (fetch)
origin https://github.com/chanukaranaba/testreposix.git (push)
If you need move to a new branch, do a git checkout <branch_name>
Else to create a new branch git checkout -b <branch_name>
git checkout -b dev
Check whether there are any updates from other colleagues by the following command
git pull origin dev (dev is my branch name)
Then do git add * which will add all the changes.
Then do a git commit -m "my_commit_msg" which will commit the changes
The do a git push origin dev
Which will push the changes to the branch, after that your changes will be there like below in my dev branch
Then if a new person wants to work on this project,
Do a git clone <repo_name> Change to the related branch git checkout dev
Go to Developer studio -> File -> import -> Existing WSO2 project
Then select the folder, you have cloned the git repo (This is the folder which contains the following files)
pom.xml testCAPP testESBconfig
Note: The folder which you cloned the above files, does not need to have the same name as your git repo or what your colleagues put as the name of their multi maven project.
This folder will act as your multi maven project folder to maintain the project structure.
Then when you are committing the changes, you go inside that folder and commit, as I explain in the earlier steps.
Comments
Post a Comment