Activiti Developers Guide
| Table of Contents |
|---|
Building a distribution from the source
...
As an example, here's the content of my [user.home]/.activiti/build.properties:
| Code Block |
|---|
activiti.home=/Users/tombaeyens/Documents/workspace/activiti/distro/target/activiti-5.0.alpha1-SNAPSHOT
downloads.dir=/Users/tombaeyens/Downloads
tomcat.enable.debug=true
|
...
[user.home]/.activiti/tomcat-users.xml To enable the automatic redeployment targets in qa/build.xml, put a tomcat-users.xml in your [user.home]/.activiti directory with the following content:
| Code Block |
|---|
<?xml version="1.0" encoding="utf-8"?>
<tomcat-users>
<role rolename="manager"/>
<user username="activiti" password="activiti" roles="manager"/>
</tomcat-users>
|
...
Before committing, run the following check to see if all is OK.
| Code Block |
|---|
mvn -Pcheck clean install
|
In the commit message, start with the jira issue, a space and then the commit text like in this example
| Code Block |
|---|
ACT-826 Fixed all problems in the world
|
Running the test suite using Spring configuration
Use
| Code Block |
|---|
mvn -Pcheckspring clean install
|
to run the test suite on spring configuration only or
| Code Block |
|---|
mvn -Pcheck,checkspring clean install
|
...
If you need to debug spring configuration test cases, just execute a
| Code Block |
|---|
mvn -Pcheckspring clean test
|
...
http://www.vitorrodrigues.com/blog/2009/07/10/debugging-ant-tasks-in-eclipse/
Activiti Modeler (Signavio)
See How to build Activiti Modeler from Signavio
GIT pointers
We decided not to use GIT for now. These pointers are here for future reference when we would evaluate GIT again.
...
To use GIT as a committer you will probably want to use ssh to authenticate automatically. Codehaus requires DSA tokens (not RSA) so you may need to create those first:
| No Format |
|---|
$ ssh-keygen -t dsa
... <accept the defaults>
|
Ensure that your ~/.ssh directory is only readable by you (chmod 700 ~/.ssh should do it). You will also probably need a ~/.ssh/config that contains these lines:
| Code Block |
|---|
Host git.codehaus.org
User git
Hostname git.codehaus.org
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_dsa
|
Typical initial setup:
| No Format |
|---|
$ git config --global user.name "My Name"
$ git config --global user.email my.email@my.address.com
$ git config --global core.autocrlf input
# All the --global above can be set locally if you prefer
$ git clone ssh://git@git.codehaus.org/activiti-git.git activiti
$ cd activiti
$ git branch -a
... (list of branches)
|
...
As a rule with GIT you do not make changes directly to remote branches, but rather you create your own local branch and merge changes from there to the remote branch (via a local mirror). Typical workflow
| No Format |
|---|
# create a new local branch to work from
$ git checkout -b feature/my-new-idea
# edit source code...
$ git status
... (list of changes)
# add all your changes to local index (N.B. -A might not always be appropriate)
$ git add -A .
# commit locally
$ git commit -m "My nice changes"
|
Keep doing that until you are happy. If you want to tidy up your commits and send them as a batch instead of individual changes look at git rebase -i .... Now you are ready to share your work. If you want to stay on a branch and collaborate with someone, push up your branch
| No Format |
|---|
# if it is new:
$ git push origin feature/my-new-idea
# if you already shared it
$ git push
|
To checkout someone else's remote branch for collaboration:
| No Format |
|---|
# Make sure you have all the remote changes
$ git fetch
# Or just make sure the branch is there
$ git branch -a
...
# Checkout the branch
$ git checkout origin/feature/my-new-idea
|
When you are ready to merge with the remote master (dev trunk):
| No Format |
|---|
# get changes from remote repository
$ git fetch
# merge changes onto master (= dev trunk for everyone else)
$ git checkout master
$ git merge origin/master
# merge master onto your features (assuming you are ready to try and push it
# up to the remote repository)
$ git merge feature/my-new-idea
# push changes up to remote repository and move back to local branch to
# continue work
$ git push
$ git checkout feature/my-new-feature
# optionally rebase to keep history clean
$ git rebase master
|
...
