# Checkout source code

Source code for JBI components is available at https://bitbucket.org/openesb/openesb-components.

Feel free to fork the repository and create a clone in your local repository.

# Maven commands

Prerequisite 1 : Before being able to build a specific component, developpers have to build entirely the project openesb-components !

Prerequisite 2 : Before doing a simple build (package / install) for all components or a specific one, do not forget to do a clean first. The clean should be launch to create some directory and files (bld, version.properties).

## Preparing your Maven environment

To be able to run Maven command without problem, you have to set up environment variables :

• JV_SRCROOT : your openesb-components working directory.
• JV_GFBASE : the directory where you installed Glassfish v2.

export JV_SRCROOT=/home/openesb-dev/openesb-components
export JV_GFBASE=/home/openesb-dev/glassfish

Please use the correct command-line to set them depending on your OS.

## Cleaning the project repository (mandatory the first time)

For the first time you build, it creates a Maven repository under $JV_SRCROOT and downloads jar files here. mvn -Dmaven.repo.local=$JV_SRCROOT/m2/repository clean

# Recommendations

1. Do never a mvn clean install in one shot, this one do not work due to some constraints about the Maven lifecycle
2. You do not have to build the project entirely if you want to work in a specific component. After doing a full build, you just to go in the components folder and use the previous Maven commands.

# Important Notes

• axiondb and bpelmonitortool/monitor-src needs JDK 6 for compiling.

# Trouble

While building, you can encounter some problem :

1) com.oracle.jdbc.java15:ojdbc5:jar:11.2.0.2.0
Then, install it using the command:
mvn install:install-file -DgroupId=com.oracle.jdbc.java15 -DartifactId=ojdbc5 -Dversion=11.2.0.2.0 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.oracle.jdbc.java15 -DartifactId=ojdbc5 -Dversion=11.2.0.2.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) open-jbi-components:bpelcore:jar:2.3.0-SNAPSHOT
2) com.oracle.jdbc.java15:ojdbc5:jar:11.2.0.2.0

The Oracle JDBC Driver is required to build and run unit tests. After agreeing to Oracle's terms and downloading the jar, install it in your maven build repository as follows:

mvn -Dmaven.repo.local=\$JV_SRCROOT/m2/repository install:install-file \
-DgroupId=oracle.jdbc -DartifactId=ojdbc14 -Dversion=10.1.0.5 \
-Dpackaging=jar -DgeneratePom=true -Dfile=path/to/ojdbc14.jar

On Windows, the command is:

mvn -Dmaven.repo.local=%JV_SRCROOT%\m2\repository install:install-file
-DgroupId=oracle.jdbc -DartifactId=ojdbc14 -Dversion=10.1.0.5
-Dpackaging=jar -DgeneratePom=true -Dfile=path\to\ojdbc14.jar

Note: the above command must appear on a single line.

The other solution is to change your settings.xml to include OpenESB Community Nexus Repositories :

Create a new profile in your settings.xml, add two repositories : http://build2.open-esb.net:8081/nexus/content/repositories/openesb-release and http://build2.open-esb.net:8081/nexus/content/repositories/openesb-snapshot/, and activate the profile :

<profiles>
<profile>
<id>profil-openesb</id>
<repositories>
<repository>
<id>OpenESB - Release</id>
<url>http://build2.open-esb.net:8081/nexus/content/repositories/openesb-release</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>

<repository>
<id>OpenESB - Snapshot</id>
<url>http://build2.open-esb.net:8081/nexus/content/repositories/openesb-snapshot/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
</profile>
</profiles>

<!-- activeProfiles | List of profiles that are active for all builds. -->
<activeProfiles>
<activeProfile>profil-openesb</activeProfile>
</activeProfiles>