No currently there isn't an ANT script yet. This is still a development release, so we'll have to focus on getting our things done first. The final release will hold an ANT script, but till then, ... sorry.
You might run it by using your favorite IDE (netbeans in my case). You'll have to add the libraries inside the lib folder and you have to set JDK 6 as the JDK for compiling the code (because of the scripting API).
I hope this won't get you de-motivated. You are off-course always welcome to create an ANT script. It would help us a lot.
Regards,
Daan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here (at the end) is a script to compile and create a distribution. It works for me with what I got from svn, so I expect it should work for you too. Not doing anything more than the basics. I made one or two guesses about the structure, so if I guessed wrong, feel free to correct me. :-)
Main targets are: clean, compile, dist
Dist will create sql2java.jar and sql2java_utils.jar files, as well as copy the lib/ and etc/ dirs into the dist directory, then it will zip the whole dist directory into a zip file on the base directory.
Hi,
Only now have I had an opportunity to really look into the svn version.
How do you compile it? Do you have an ant script available?
Thanks,
Charl
Hi Charl,
No currently there isn't an ANT script yet. This is still a development release, so we'll have to focus on getting our things done first. The final release will hold an ANT script, but till then, ... sorry.
You might run it by using your favorite IDE (netbeans in my case). You'll have to add the libraries inside the lib folder and you have to set JDK 6 as the JDK for compiling the code (because of the scripting API).
I hope this won't get you de-motivated. You are off-course always welcome to create an ANT script. It would help us a lot.
Regards,
Daan
Here (at the end) is a script to compile and create a distribution. It works for me with what I got from svn, so I expect it should work for you too. Not doing anything more than the basics. I made one or two guesses about the structure, so if I guessed wrong, feel free to correct me. :-)
Main targets are: clean, compile, dist
Dist will create sql2java.jar and sql2java_utils.jar files, as well as copy the lib/ and etc/ dirs into the dist directory, then it will zip the whole dist directory into a zip file on the base directory.
-------
<?xml version="1.0" encoding="UTF-8"?>
<project name="sql2java" basedir="." default="compile">
<target name="init">
<property name="src_dir" value="src" />
<property name="srcutils_dir" value="src-utils" />
<property name="classes_dir" value="classes" />
<property name="main_classes_dir" value="${classes_dir}/sql2java" />
<property name="utils_classes_dir" value="${classes_dir}/utils" />
<property name="dist_dir" value="dist/" />
<property name="sql2java_jarname" value="sql2java.jar" />
<property name="utils_jarname" value="sql2java_utils.jar" />
<property name="version" value="1_0" />
<property name="dist_zipfile" value="sql2java_${version}.zip" />
<path id="main_classpath">
<fileset dir="${basedir}/lib">
<include name="**/*.jar" />
</fileset>
</path>
</target>
<target name="prepare" depends="init">
<mkdir dir="${classes_dir}" />
<mkdir dir="${main_classes_dir}" />
<mkdir dir="${utils_classes_dir}" />
<mkdir dir="${dist_dir}" />
</target>
<target name="compile" depends="prepare">
<javac srcdir="${src_dir}" destdir="${main_classes_dir}">
<classpath refid="main_classpath" />
</javac>
<javac srcdir="${srcutils_dir}" destdir="${utils_classes_dir}">
<classpath refid="main_classpath" />
</javac>
</target>
<target name="clean" depends="init">
<delete dir="${classes_dir}" />
<delete dir="${dist_dir}" />
</target>
<target name="dist" depends="compile">
<jar destfile="${dist_dir}/${sql2java_jarname}" basedir="${main_classes_dir}" />
<jar destfile="${dist_dir}/${utils_jarname}" basedir="${utils_classes_dir}" />
<mkdir dir="${dist_dir}/lib" />
<copy todir="${dist_dir}/lib">
<fileset dir="${basedir}/lib" />
</copy>
<mkdir dir="${dist_dir}/etc" />
<copy todir="${dist_dir}/etc">
<fileset dir="${basedir}/etc" includes="**/*" />
</copy>
<zip destfile="${basedir}/${dist_zipfile}" basedir="${dist_dir}" />
</target>
</project>
Great work. I'll check it tomorrow and add it to the SVN repository.
Daan