summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@rm-rf.ca>2009-11-02 10:30:27 -0400
committerDevan Goodwin <dgoodwin@rm-rf.ca>2009-11-02 10:30:27 -0400
commit7a1a754f336523414af7cb3e1b4f69cb36474fb4 (patch)
tree83cdd3103c8e452f23e9e3f10f846ef5513f583a
parent760e9f2944de17e434a47cd86efa4bc6fb5946a1 (diff)
downloadcobbler-7a1a754f336523414af7cb3e1b4f69cb36474fb4.tar.gz
cobbler-7a1a754f336523414af7cb3e1b4f69cb36474fb4.tar.xz
cobbler-7a1a754f336523414af7cb3e1b4f69cb36474fb4.zip
Auto-generate cobbler4j classes inside ant instead of make.
-rw-r--r--cobbler4j/build.py5
-rw-r--r--cobbler4j/build.xml14
2 files changed, 16 insertions, 3 deletions
diff --git a/cobbler4j/build.py b/cobbler4j/build.py
index 645214d3..c19f7a2a 100644
--- a/cobbler4j/build.py
+++ b/cobbler4j/build.py
@@ -7,6 +7,11 @@ Michael DeHaan <mdehaan@redhat.com>
May Guido have mercy on your application.
"""
+# Force to build from the Python modules in this source checkout,
+# not what's installed on the system.
+import sys
+sys.path.insert(0, "../")
+
import Cheetah.Template as Template
import cobbler.item_distro as cobbler_distro
import cobbler.item_profile as cobbler_profile
diff --git a/cobbler4j/build.xml b/cobbler4j/build.xml
index 421328d8..6c39d4cd 100644
--- a/cobbler4j/build.xml
+++ b/cobbler4j/build.xml
@@ -6,15 +6,23 @@
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
+ <!-- Standard location for Fedora/RHEL junit4 package. -->
<fileset dir="/usr/share/java/">
<include name="junit4.jar"/>
</fileset>
</path>
</target>
- <target name="build" depends="init">
+ <!-- Auto-generate Cobbler classes when we can. -->
+ <target name="generateClasses" depends="init">
+ <exec executable="python">
+ <arg value="build.py"/>
+ </exec>
+ </target>
+
+ <target name="build" depends="generateClasses">
<mkdir dir="build"/>
- <javac srcdir="." destdir="build" nowarn="true" classpathref="class.path">
+ <javac srcdir="src/" destdir="build" nowarn="true" classpathref="class.path">
</javac>
<jar destfile="cobbler4j.jar" basedir="build">
<manifest>
@@ -29,7 +37,7 @@
<arg value="http://192.168.1.1"/>
</java>
-->
- <junit printsummary="yes" haltonfailure="yes">
+ <junit printsummary="yes" haltonfailure="no">
<formatter type="xml"/>
<classpath refid="class.path"/>
<batchtest fork="yes" todir="build/">