Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Activiti Developers Guide

Building the sources

Dependencies

JDK 5+ : Make sure that you do not use code constructs that require JDK 6 or higher.
Maven 2.0.9
Ant 1.7.1

Running tests before commit

Before a checkin is done, a developers should make sure to update to the latest sources and then run
mvn -Pcheck clean install
in the root activiti directory

Demo setup

To run smoke tests on webapps, the quickest way to get started is using the target test.demo.setup in qa/build.xml
That will also startup h2 and tomcat. So to rebuild, you can use the target test.demo.setup.refresh That target will first shutdown tomcat and h2 and then do a full new demo test setup.
Building the javadocs

Use target build.javadocs in qa/build.xml

Building a distribution

To build a distribution, run target distro of build file distro/build.xml
User scripts

After an distribution is unzipped (or directly in the distro/target/activiti-version directory), a number of scripts are offered to our users as well. Those scripts can be found in

Unknown macro: {escape}

$

Unknown macro: {activiti.home}

/setup/build.xml $

Unknown macro: {user.home}

/.activiti/build.properties

 As an example, here's the content of my $

Unknown macro: {user.home}

/.activiti/build.properties:
activiti.home=/Users/tombaeyens/Documents/workspace/activiti/distro/target/activiti-5.0.alpha1-SNAPSHOT
downloads.dir=/Users/tombaeyens/Downloads
tomcat.enable.debug=true

activiti.home, is used in the setup/build.xml. It will work straight from the sources. So you can add the setup from the sources to your ant view in your IDE.

downloads.dir, is used in the setup/build.xml. It allows you to configure a custom location for your directory to download/find tomcat. If you don't specify this, the default is relative to the setup directory (../downloads). So if you use the setup/build from the sources, you might end up downloading tomcat into your sources. If that still would happen, don't check it in!
tomcat.enable.debug is used in setup/build.xml when tomcat is installed. if the property is specified (whatever value), the following line will be added at the beginning of the catalina.sh:
JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787"
skip.deploy.activiti.modeler=true set this property if the activiti modeler fetching from net and deployment must be skipped.
Unless before a release or explicitely working on Signavio, it's advised to set this property since sometimes a version matching the current trunk version isn't uploaded yet, causing the demo setup to fail.
mvn.executable=mvn.bat on windows you have to set this property to make the calls from the ant build scripts (distro/build.xml and qa/build.xml) to maven work.

$

/.activiti/tomcat-users.xmlTo enable the automatic redeployment targets in qa/build.xml, put a tomcat-users.xml in your $

Unknown macro: {user.home}

/.activiti directory with the following content:<?xml version="1.0" encoding="utf-8"?>

<tomcat-users>

<role rolename="manager"/>

<user username="activiti" password="activiti" roles="manager"/>

</tomcat-users>

QA

Build file qa/build.xml contains a number of targets for driving the QA. It also contains convenience targets for developers to do integration testing.

Eclipse IDE Setup

You'll need to install the maven and svn plugins.

In the "Galileo - http://download.eclipse.org/releases/galileo" update site, which should be available automatically, install "Collaboration --> Subversibe SVN Team provider". After rebooting and adding an SVN repository, you'll be asked automatically to install one of the polarion connectors for SVN. Just take the latest version of the polarion connectors. In case that doesn't happen automatically install a polarion connector manually from "Subversive SVN Connectors Site http://community.polarion.com/projects/subversive/download/eclipse/2.0/update-site/"

Install the maven plugins from http://m2eclipse.sonatype.org/sites/m2e

First check out the activiti root from svn as one project. Then import existing projects and navigate to the modules directory. All the module projects should then be found and can be imported in one go.

in the eclipse directory of the root activiti source directory are some files that should be imported as eclipse preferences. The filenames indicate the dialog that can be used to import them.

Deployment to Alfresco repo

Add following to /{$user.home}/.m2/settings.xml

<settings xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">

<servers>
<server>
<id>alfresco.snapshot.repo</id>
<username>jbarrez</username>
<password>XXX</password>
</server>

<server>
<id>alfresco.release.repo</id>
<username>jbarrez</username>
<password>XXX</password>
</server>
</servers>

</settings>

Note that this will save your password in plain text.
It is possible (since maven 2.1.0) to encrypt your password (untested): http://maven.apache.org/guides/mini/guide-encryption.html

Just do a mvn -Pcheck clean install followed by a mvn deploy on the root. This will publish all artifact to the snapshot/release repo, depending whether '-SNAPSHOT' is added to the current project version.

snapshot repo: http://maven.alfresco.com/nexus/content/repositories/activiti-snapshots/
release repo: http://maven.alfresco.com/nexus/content/repositories/activiti-releases/

Debugging ant task

http://www.vitorrodrigues.com/blog/2009/07/10/debugging-ant-tasks-in-eclipse/

Signavio

See activiti - signavio rebranding

  • No labels