Getting Nuxeo Platform Source Code
Nuxeo Platform sources shall be retrieved and worked with using Git. Nuxeo core developers should have a look at Nuxeo's Git usage.
Some (mostly deprecated) code and scripts may be retrieved and worked with using Mercurial (see the documentation at SubVersion).
The following assumes you know how to work with Maven and sources in your IDE (Eclipse is used below). In particular this means that you have already configured the IDE to work with Maven (M2_REPO set in Eclipse).
Starting from version 5.9.2, Nuxeo requires Maven 3.1.1+ (3.2 recommended). Earlier releases require Maven 2.2.1.
Getting the Development Branch
git clone [email protected]:nuxeo/nuxeo.git
cd nuxeo
python clone.py master -a
- Python 2.7 is required. The scripts are not compliant with Python 3.x versions.
- Users of MSysGit should run clone.py with option --no_drive_mapping or -n as MSysGit is not able to access dynamically mounted drives. This option is available as of version 5.7.1.
Contributing to Nuxeo does not require cloning Nuxeo source code: see Contributing to Nuxeo
After having cloned the Nuxeo repository, you need to run a full build in Maven to download all the dependencies.
export MAVEN_OPTS="-Xmx4096m -Xms1024m"
mvn -DskipTests install -Paddons,distrib
You can now import the Nuxeo source code in Eclipse. See Eclipse Setup
Getting a Maintenance Branch or a Specific Release
All releases are tagged release-x.y.z
and maintained on a dedicated branch x.y.z
.
Use the same recipe as above, but specify the wanted branch (10.10, etc.) or tag (release-10.10, release-10.10, release-9.10-HF12, etc.):
git checkout release-10.10
python clone.py
To see all available branches or tags, run git branch -a or git tag.
Updating Your Sources
Either call git pull -u in each repository or run:
python clone.py
Useful Shell Functions
There are some scripts to ease working on Nuxeo Git repositories available in the scripts
directory of Nuxeo.
Load them from your .profile or .bashrc, for instance from Nuxeo root:
echo ". $PWD/scripts/gitfunctions.sh" >> ~/.bashrc
Windows users will find equivalent Batch scripts in the same directory named gitf.bat
.
Those scripts' main purpose is to recursively run a command on multiple repositories.
Example usage:
gitf status
gitf describe --all
# Also recurse on "standard" addons (those listed in addons/pom.xml)
gitfa [some Git command]
Nuxeo Versioning Policy
Summary Sample
Branch | Tag | Version | Status |
---|---|---|---|
master | x.y.z-SNAPSHOT | development branch where is prepared next x.y.z version | |
10.10 | 10.10-HFNN-SNAPSHOT | maintenance branch where bugs are fixed/backported for Nuxeo 10.10 | |
release-10.10 | 10.10 | release tag for 10.10 version | |
fix-NXP-9999-* feature-NXP-9999-* | usually same as on master | development branch dedicated to NXP-9999 feature or bug fix |
Releases are built from tags set on their maintenance branch.
Bug fixes are usually done on a maintenance branch, forwarded to development branch and optionally back-ported to other maintenance branches. Maintenance branches are only released for development purpose; the fixes are delivered through Hotfix Nuxeo Packages.
Detailed Sample
Development is done on branch master with current version 10.10-SNAPSHOT.
Let's say we will release Nuxeo 10.10.
- A branch is created from master, named 10.10.
- On branch 10.10, version is updated from 10.10-SNAPSHOT to 10.10 (releasing version).
- On branch 10.10, code is tagged as release-10.10.
- If it is an important release (called "final release"), then a maintenance branch will be kept, else it would be deleted after tagging.
- On branch 10.10, version is updated to 10.10-HF01-SNAPSHOT (future fixes for 10.10 version).
- On branch master, version is updated to 11.1-SNAPSHOT (next release version). Release done.
- Next development is still done on branch master, with version 11.1-SNAPSHOT.
- Bugs identified on 10.10 version will be fixed on maintenance branch 10.10-HFNN and forward ported to the master branch.
- If we estimate some bug fixes are required on 10.10-HFNN released version, we may back-port them from master branch to 10.10-HFNN branch.
- Maintenance branch 10.10 is regularly released to deliver 10.10-HFxx corrective hot-fixes.