View Source

h1. Requirements

h2. Java Requirements

h3. For Petals ESB 4.x

Petals ESB must be build with Sun/Oracle JDK 6 (not OpenJDK), even if it is run with upper version of Java.

To be able to run Petals ESB with JDK 7+ (Sun/Oracle or OpenJDK) and build it with JDK 6+, you may defined an alias to the Maven command. For example on an Ubuntu system, add the following lines to your {{~/.bashrc}}:
{code}
alias mvn="JAVA_HOME=~/jdk1.6.0_45 mvn"
{code}

h3. For Petals ESB 5.x

Petals ESB must be build with JDK 7, even if it is run with upper version of Java.

To be able to run Petals ESB with JDK 8+ and build it with JDK 7+, you may defined an alias to the Maven command. For example on an Ubuntu system, add the following lines to your {{~/.bashrc}}:
{code}
alias mvn="JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 mvn"
{code}

h2. Maven requirements

Petals ESB is build using Apache Maven 3.1.x. You can't use Maven 3.2.x because of a tooling not supporting it (maven-spoon-plugin).

Maven settings:
# You have an access to the OW2's MRM ([Nexus|http://repository.ow2.org/]),
# You have an access to the PetalsLink's MRM ([Artifactory|http://maven.petalslink.com/])
# Your Maven's setting file is right, containing an *activated default profile*:
{code:lang=xml}
<profile>
<id>default-profile</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
...
</profile>
{code}
containing MRM declarations:
{code:lang=xml}
<repositories>
<repository>
<id>petalslink-other.release</id>
<name>PetalsLink - Other - Releases - Repository</name>
<url>http://maven.petalslink.com/others</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>petalslink-public.release</id>
<name>PetalsLink - Public - Releases - Repository</name>
<url>http://maven.petalslink.com/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>petalslink-public.snapshot</id>
<name>PetalsLink - Public - Snapshot - Repository</name>
<url>http://maven.petalslink.com/public-snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>ow2.release</id>
<name>OW2 - Public - Release - Repository</name>
<url>http://repository.ow2.org/nexus/content/repositories/releases</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>ow2.snapshot</id>
<name>OW2 - Public - Snapshot - Repository</name>
<url>http://repository.ow2.org/nexus/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>petalslink-other.release</id>
<name>PetalsLink - Other - Releases - Repository</name>
<url>http://maven.petalslink.com/others</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>petalslink-public.release</id>
<name>PetalsLink - Public - Releases - Repository</name>
<url>http://maven.petalslink.com/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>petalslink-public.snapshot</id>
<name>PetalsLink - Public - Snapshot - Repository</name>
<url>http://maven.petalslink.com/public-snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>ow2.release</id>
<name>OW2 - Public - Release - Repository</name>
<url>http://repository.ow2.org/nexus/content/repositories/releases</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>ow2.snapshot</id>
<name>OW2 - Public - Snapshot - Repository</name>
<url>http://repository.ow2.org/nexus/content/repositories/snapshots</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
{code}

The Shiboleth Maven repository is declared in few dependency of Petals ESB with its previous location. It has moved since the release of these dependencies. But its previous location returns an HTML page instead of a 404 response, so downloaded artifacts are invalid. We must force the use of the new location as following:
{code}
<mirror>
<id>bad-shibboleth</id>
<mirrorOf>open-saml</mirrorOf>
<url>https://build.shibboleth.net/nexus/content/groups/public</url>
</mirror>
{code}

*MRMs usages:*
|| MRM | Contains ||
| PetalsLink - Other - Releases - Repository | Third party products released not available on other Internet Maven repository |
| PetalsLink - Public - Releases - Repository | Artifacts of the Petals area and not developed by the Petals ESB team, as Easy* |
| PetalsLink - Public - Snapshot - Repository | Artifacts, in their snapshot version, of the Petals area and not developed by the Petals ESB team, as Easy* |
| OW2 - Public - Release - Repository | Petals ESB artifacts released |
| OW2 - Public - Snapshot - Repository | Petals ESB artifacts in snapshot version |

h1. Building Petals ESB

Checkout the project you want to build (see [Petals ESB source code tree]), and execute in the directory of the checked out project:
{code}
mvn clean install
{code}

{tip}
To build Petals ESB in the same conditions than a release process, the profile '{{ow2-release}}' must be used:
{code}
mvn clean install -Pow2-release
{code}
{tip}