Build for SocrateOpen Server

System Requirements

Before you actually initiate the build sequence, please check the value of the JAVA_HOME system variable:

    • for Windows: open a command line screen and type: echo %JAVA_HOME%

    • for Linux/Solaris (with bash): open a terminal: echo $JAVA_HOME

The result of these commands should display the correct location of the JDK!

Further on, use the following values:

    • COMPIERE_HOME: the location of the SocrateOpen server.

    • SOPEN_SRC: the root of the SocrateOpen sources.

Downloading sources from the BITSoftware SVN

The SocrateOpen sources can be downloaded, free-of-charge, from the BITSoftware SVN:

    • the current version, in developing stage: trunk

    • stable, public versions: tags

If you intend to download sources by using the Eclipse development environment, please refer to the Developing with Eclipse section.

The sections below contain details regarding the methods of downloading sources by using a subversion client (TortoiseSVN or a subversion package for Linux/Solaris).

Windows

For Windows you can use TortoiseSVN

1. Create a source folder (for example, C:\SrcSopen\trunk). This folder will be further on referred to as SOPEN_SRC.

2. Right-click this folder and choose Export from the TortoiseSVN contextual menu.

3. For the repository URL write: https://svn.bitsoftware.ro:8443/dev/SocrateOpen/trun

4. Select OK and accept the certificate.

Linux/Solaris

Use the subversion package corresponding to the specific distribution.

1. Create a source folder (for example, $HOME/SrcSOpen).

2. Open a terminal screen and go to the folder you previously created.

3. Enter the command: svn export https://svn.bitsoftware.ro:8443/dev/SocrateOpen/trunk.

4. Accept the certificate by typing letter t or p followed by ENTER.

5. Once the download completes, the sources will be available in the trunk folder, created inside the folder you had created for sources (for example, $HOME/SrcSOpen/trunk). This location will be further on referred to as SOPEN_SRC.

The Build

The build is initiated via the command line.

These are the steps to follow for a build:

1. Open a terminal / command screen and go to SOPEN_SRC/utils_dev.

      • Windows - rename the file myDevEnvTemplate.bat as myDevEnv.bat. Open the file with an editor (Wordpad) and modify / customize the variables as needed by your particular case:

        • JAVA_HOME (line 12): write the JDK location (you can find it by using the command echo %JAVA_HOME%).

        • COMPIERE_SOURCE (line 17): write the SOPEN_SRC location.

        • Optionally, COMPIERE_ROOT (line 31).

        • Optionally, COMPIERE_INSTALL (line 35).

      • Linux/Solaris - a myDevEnv.sh file is already there, used by the BITSoftware developers. In case you wish to use a customized file, you can rename the myDevEnvTemplate.sh file as myDevEnv.sh and further customize it.

2. In the SOPEN_SRC/utils_dev folder enter the command: RUN_Build.bat (Windows) or ./RUN_Build.sh (Linux/Solaris). This command starts the actual build.

3. The first build ends with an error (error message "BUILD FAILED"), as seen in the image below:

If the error message is displayed in the "Setup SocrateOpen" section, there is no problem. This is caused by the fact that the SocrateOpen server setup has not been run yet.

If the error message "BUILD FAILED" is displayed in a different context, check and correct the situation.

4. At this stage:

      • the SocrateOpen_17.zip archive has been created and contains the SocrateOpen Server build (for distribution)

        • Windows: in the folder specified for the COMPIERE_INSTALL variable in myDevEnv.bat (by default, C:\SocrateOpenInstall).

        • Linux/Solaris: if myDevEnv.sh was used without any changes, in the folder "17_inst/install" belonging to the parent folder of SOPEN_SRC. Otherwise, depending on your customized setings.

      • the archive has been extracted in the folder

        • Windows: COMPIERE_ROOT\SocrateOpen (COMPIERE_ROOT from myDevEnv.bat).

        • Linux/Solaris: "17_inst/SocrateOpen" from the parent folder of SOPEN_SRC, if myDevEnv.sh was used without any changes. Otherwise, depending on your customized setings.

5. Run the RUN_Setup.bat file (Windows) or RUN_Setup.sh (Linux/Solaris) from the folder where the SocrateOpen_17.zip archive was extracted (refer to the step above). For details regarding the setup, please refer to the Setup Server SocrateOpen section.

6. Once the SocrateOpen setup runs successfully, the build completes successfully too, and the message "BUILD SUCCESSFUL" is displayed (replacing the error message "BUILD FAILED" displayed after the first build).