Table of Contents
To be able to get the sources and build PEtALS, you must install the following tools :
JDK 1.5.X : PEtALS is developed using java 5 features. You need to install a JDK 1.5.x to be abble to compile PEtALS.
Maven : We use the Apache maven project to build PEtALS. Maven can be downloaded here : http://maven.apache.org/download.html.
svn : A subversion client is required to work with the project sources.
We suppose that all the required binaries (mvn, java, javac, svn) are defined in you path.
The PEtALS sources are hosted by the ObjectWeb forge. As developer you can checkout the sources from the repository with a svn client.
Checking out the sources as anonymous user :
svn checkout svn://svn.forge.objectweb.org/svnroot/petals/trunk petals
To check out the sources as developer, you must be registered in the ObjectWeb forge and be activated as PEtALS developers (contact the project administrator to get authorization) :
svn checkout svn+ssh://<developer-login>@svn.forge.objectweb.org/svnroot/petals/trunk petals
These two commands will check out the sources into the petals directory.
Since the compilation uses lots of memory, you must define specific system variables for maven.
On a Linux system :
MAVEN_OPTS=-Xmx512m
export MAVEN_OPTS
![]() | Note |
|---|---|
You can define this variable in your
|
In order to retrieve all the artifacts, you must add specific configuration to Maven. To do so, add a settings.xml file in your local Maven repository (~/.m2/ under Linux).
<settings>
<profiles>
<profile>
<id>default-profile</id>
<activation>
<activeByDefault>TRUE</activeByDefault>
</activation>
<repositories>
<repository>
<id>objectweb-release</id>
<name>Objectweb Repo</name>
<url>http://maven.objectweb.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>objectweb-snapshot</id>
<name>Objectweb SNAPSHOT Repo</name>
<url>http://maven.objectweb.org/maven2-snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>objectweb-plugin</id>
<name>Objectweb plugin Repo</name>
<url>http://maven.objectweb.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>You can dowload the settings.xml file here.
Now that all is ready, you can compile the sources:
Go into the sources directory
cd petals
Build the required dependencies first
mvn -Denv=first
Build petals
mvn
Note that you can skip all the unit tests like this (generation will be faster...)
mvn -Dmaven.test.skip
Now that all the PEtALS artefacts are compiled, you can build various PEtALS distributions.
To create the standalone version of PEtALS:
Go into the standalone directory
cd petals/petals-platform/petals-standalone
mvn assembly:assembly
The standalone version of PEtALS is the available in the target repository
cd target/target/petals-standalone-$VERSION-SNAPSHOT-dev.dir/petals-standalone-$VERSION-SNAPSHOT
where $VERSION is the current version of the standalone project.
Note that archive files are generated too.
The component development kit can be packaged with the maven assembly plugin:
cd petals/petals-cdk
mvn assembly:assembly
The assembly command will generate an archive file with all the required java libraries.
Waiting a Maven2 build to build PEtALS Eclipse plugins, the build/assembly/packaging of PEtALS Eclipse plugins is manual :
Start Eclipse and Import all Petals Eclipse plugins projects :

Open the project "org.objectweb.petals.tools.plugin.update" :

Open the file "site.xml" :

Click on the button "Build All" :

Export the build result in a zip file using the contextual menu "Export..." on the project "org.objectweb.petals.tools.plugin.update" :

Select your export type "Archive File" :

In the left area, select the project "org.objectweb.petals.tools.plugin.update". In the right area, unselect the file ".project". Enter you archive file name. And click on "Finish" to build the archive file containing the Eclipse site update to install the PEtALS Eclipse plugins.


PEtALS 2.0 & pack (2007/09/28)

![[Note]](../resources/images/note.png)
