Menu

Compile Zeidon JOE

DeegC

Compile Zeidon JOE

Required:
* Java JDK 1.6 or greater.
* Maven 3.
* Subversion 1.6

Download Zeidon JOE using Subversion with following command (this creates a read-only local repository):
svn checkout svn://svn.code.sf.net/p/zeidonjoe/code/ zeidonjoe

Change directory to the root of the JOE project and run the following command:
mvn install -DskipTests=true


Compile Zeidon Applications for Tomcat

1) Create the subdirectories under your LPLR project for containing Java files.

mkdir LPLR/java/application/src/main/java/com/company/project

2) Set Target Generation Directory

Edit your LPLR configuration and point the Java target directory to the one created above.

3) Create pom.xml for generating your .jar file

In the LPLR/java/application directory create a pom.xml that looks like the following:

~~~~~~
<project 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 &lt;a href=" http:="" maven.apache.org="" xsd="" maven-4.0.0.xsd"="">http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>PROJECT-NAME</artifactId>
<name>PROJECT-NAME</name>
<groupId>com.company.PROJECT-NAME</groupId>
<version>PROJECT-VERSION</version>
<description>Generated from LPLR</description>
<packaging>jar</packaging>

<dependencies>
    <dependency>
        <groupId>com.quinsoft.zeidon</groupId>
        <artifactId>zeidon-operations</artifactId>
        <version>1.0.2</version>
    </dependency>
    <dependency>
        <groupId>com.quinsoft.zeidon</groupId>
        <artifactId>object-browser</artifactId>
        <version>1.0.2</version>
    </dependency>
</dependencies>

</project>

##### 4) Add Database dependencies
The pom.xml from above does not include database dependencies.  Include a dependencies for each of the databases you intend to use.  Some different examples below:
<dependencies>
    ...
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.18</version>
    </dependency>
    <dependency>
        <groupId>org.xerial</groupId>
        <artifactId>sqlite-jdbc</artifactId>
        <version>3.7.2</version>
    </dependency>
</dependencies>
##### 5) Build .jar file
Build the .jar file by executing the following in the application directory:
**mvn install**
This will create the .jar file and install it into your local Maven repository.

##### 6) Create pom.xml for generating your .war file
Create the directory LPLR/java/war and add a pom.xml with the following settings:

<project 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 &lt;a href=" http:="" maven.apache.org="" xsd="" maven-4.0.0.xsd"="">http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>PROJECT-NAME-SERVER</artifactId>
<name>PROJECT-NAME-SERVER</name>
<groupId>com.company.PROJECT-NAME</groupId>
<version>PROJECT-VERSION</version>
<description>Generated .war</description>
<packaging>war</packaging>

<dependencies>
    <dependency>
        <groupId>com.company.PROJECT-NAME</groupId>
        <artifactId>PROJECT-NAME</artifactId>
        <version>PROJECT-VERSION</version>
    </dependency>
</dependencies>

</project>
~~~~~

The only dependency is the jar file built in the previous steps.

5) Build .war file

Build the .war file by executing the following in the LPLR/java/war directory:
mvn install

This will create a .war file in the 'target' subdirectory. The .war file has all the dependencies and can be copied to the Tomcat deploy directory.


Related

Wiki: Zeidon For Java