{:toc}
yinst restore build/build.state
yinst i yjava_clover_license
Please check out password. For more information about clover license please refer to dist package yjava_clover_license.
- Git
- protobuf 2.3
- Maven 3
-
Build API Package
cd src/api/ make commit
-
Build Routing Package
cd src/routing/ make commit
-
Build ActiveMQ Package
cd src/activemq/ make pkg-release
-
Build API Ykeykey Package
cd src/api_ykeykey/ make commit
-
Build Broker Lib Package
cd src/broker_lib/ make commit
-
Build Metadata Lib Package
cd src/metadata/ make commit
-
Build Vespa Refeeder Package
cd src/vespa_refeeder/ make commit
Eclipse is recommended as the development IDE, which can accelerate coding progress and format the code for you. Follow these steps to setup eclipse project:
-
Set up maven repo setting(For Non-Ylinux)
a. Download maven repo setting.xml
b. Place the setting.xml file under $HOME/.m2/
c. Open eclipse and navigate to the preferences window (Eclipse -> Preferences)
d. Navigate to Maven -> Installations -> User Settings
e. In user settings set the path to the settings.xml file ($HOME/.m2/settings.xml)
-
Run
mvn eclipse:eclipse
to generates Eclipse project files (.project and .class). -
Start Eclipse and import the project by menu "File -> Import...".
-
Import the code formatter file:
a. Click menu "Eclipse -> Preference…"
b. Expand the tree control on the left of preference window: "Java -> Code Style -> Formatter"
c. Click the "Import…" button on the right of preference window and choose onepush-common/devel/java/formatter.xml
Everyone fork to their own repo from the organization repo. Forked repo is
considered as private and not suppose to be forked downwards, owner have the
right to use git push --force
if needed.
Everyone develop in a clone from his forked repo with remote name origin
(default), also have a remote upstream points to organization repo.
git clone [email protected]:user/onepush.git
cd onepush
git remote add upstream [email protected]:cloud/onepush.git
Once have a clone of the forked repo, daily workflow is like followings:
-
Create a topic branch from a remote master branch, work on it, push to remote topic branch in the forked repo. You can also work on local master branch directly but working in topic branch will benefit you when pull changes from others and when you want to work on another task while waiting for code review result. This is recommended way in git world.
git fetch upstream -p # fetch latest objects in upstream git checkout -b topic-foo upstream/master ... development ... git add file ... git commit file ... git push origin topic-foo # push to remote topic branch in your fork
-
Send pull request from the topic branch against the master branch in organization repo for peer review.
-
Sender or reviewer to merge the pull request to the master branch in organization repo.
-
Wait for precommit job mark it as pass.
-
Optionally refresh local branch and forked repo.
git checkout master # switch to tracked master branch git pull upstream master # refresh working tree git push origin :topic-foo # optional: delete the remote branch git branch -d topic-foo # optional: delete local branch as well git push origin master # update your fork
-
Repeat 1 ~ 5 for another topic branch.
Remember these rules:
- Commit early and often
- Commit atomic (e.g. if a fix affects two files, commit them together)
- Write good commit message