04 August 2014

Fix Adito - OpenVPN ALS ant install compile error

If you get the following error compiling OpenVPN ALS:
 
compile:
    [javac] Compiling 26 source files to /opt/openvpn-als/maverick-multiplex/build/classes
    [javac]
    [javac]           WARNING
    [javac]
    [javac] The -source switch defaults to 1.5 in JDK 1.5 and 1.6.
    [javac] If you specify -target 1.2 you now must also specify -source 1.1.
    [javac] Ant will implicitly add -source 1.1 for you.  Please change your build file.
    [javac] javac: invalid source release: 1.1
    [javac] Usage: javac <options> <source files>
    [javac] use -help for a list of possible options

BUILD FAILED
/opt/openvpn-als/build.xml:84: The following error occurred while executing this line:
/opt/openvpn-als/adito/build.xml:899: The following error occurred while executing this line:
/opt/openvpn-als/maverick-multiplex/build.xml:62: Compile failed; see the compiler error output for details.



Edit the following file:

vi /opt/openvpn-als/maverick-multiplex/build.xml


Go to line 62 and modify the following line:

         <javac debug="${build.debug}" target="1.1" compiler="${build.compiler}" destdir="${build.output}" srcdir="${build.tmp.src}" includeantruntime="false" includes="**/*.java" classpathref="maverick-multiplex.class.path">


In:
         <javac debug="${build.debug}" target="1.6" compiler="${build.compiler}" destdir="${build.output}" srcdir="${build.tmp.src}" includeantruntime="false" includes="**/*.java" classpathref="maverick-multiplex.class.path">

Close and save, then recompile using ant install again