[icinga-checkins] icinga.org: icinga-reports/master: added ant build file, removed default connection in context.xml and classes

git at icinga.org git at icinga.org
Tue Jan 5 23:23:43 CET 2010


Module: icinga-reports
Branch: master
Commit: 44dc5d395e632e5635f7080a3db3517ac3c42b4b
URL:    https://git.icinga.org/?p=icinga-reports.git;a=commit;h=44dc5d395e632e5635f7080a3db3517ac3c42b4b

Author: Bernd Erk <bernd.erk at netways.de>
Date:   Tue Jan  5 23:16:03 2010 +0100

added ant build file, removed default connection in context.xml and classes

---

 WebContent/META-INF/context.xml                    |   11 ++-
 build/build.xml                                    |   78 ++++++++++++++++++++
 build/classes/org/icinga/reporting/Formats.class   |  Bin 527 -> 0 bytes
 build/classes/org/icinga/reporting/Generator.class |  Bin 5465 -> 0 bytes
 .../classes/org/icinga/reporting/data/Loader.class |  Bin 2056 -> 0 bytes
 .../reporting/database/ConnectionManager.class     |  Bin 1679 -> 0 bytes
 .../org/icinga/reporting/template/Reader.class     |  Bin 1100 -> 0 bytes
 build/icinga-reports.war                           |  Bin 0 -> 39393616 bytes
 8 files changed, 85 insertions(+), 4 deletions(-)

diff --git a/WebContent/META-INF/context.xml b/WebContent/META-INF/context.xml
index c65ec89..f1a90c4 100644
--- a/WebContent/META-INF/context.xml
+++ b/WebContent/META-INF/context.xml
@@ -1,7 +1,10 @@
 <?xml version='1.0' encoding='utf-8'?>
 <Context>
-    <Resource name="jdbc/icinga" auth="Container" type="javax.sql.DataSource"
-    maxActive="100" maxIdle="30" maxWait="10000"
-    username="icinga" password="icinga" driverClassName="com.mysql.jdbc.Driver"
-    url="jdbc:mysql://0.0.0.0:3306/icinga"/>
+	<!--
+		<Resource name="jdbc/icinga" auth="Container"
+		type="javax.sql.DataSource" maxActive="100" maxIdle="30"
+		maxWait="10000" username="icinga" password="icinga"
+		driverClassName="com.mysql.jdbc.Driver"
+		url="jdbc:mysql://0.0.0.0:3306/icinga"/>
+	-->
 </Context>
diff --git a/build/build.xml b/build/build.xml
new file mode 100644
index 0000000..312ecf2
--- /dev/null
+++ b/build/build.xml
@@ -0,0 +1,78 @@
+<project name="Icinga-Reports" basedir=".." default="package">
+
+	<!-- project-specific variables -->
+	<property name="package.name" value="icinga-reports.war" />
+	<property name="resources.dir" value="resources" />
+
+	<!-- src folders -->
+	<property name="src.dir" value="src" />
+	<property name="src.webcontent" value="WebContent" />
+	<property name="meta-inf.dir" value="${src.webcontent}/META-INF" />
+	<property name="web-inf.dir" value="${src.webcontent}/WEB-INF" />
+	<property name="lib.dir" value="${web-inf.dir}/lib" />
+
+	<!-- temp folders -->
+	<property name="temp.dir" value="temp" />
+	<property name="temp.dir.web-inf" value="${temp.dir}/WEB-INF" />
+	<property name="temp.dir.lib" value="${temp.dir.web-inf}/lib" />
+	<property name="temp.dir.classes" value="${temp.dir.web-inf}/classes" />
+	<property name="temp.dir.meta-inf" value="${temp.dir}/META-INF" />
+
+	<!-- packing -->
+	<property name="dest.dir" value="build" />
+	<property name="package.file" value="${dest.dir}/${package.name}" />
+
+	<path id="build.class.path">
+		<fileset dir="WebContent/WEB-INF/lib">
+			<include name="**/*.jar" />
+		</fileset>
+		<fileset dir="WebContent/WEB-INF/lib">
+			<include name="**/*.jar" />
+		</fileset>
+	</path>
+
+	<!-- CLEAN -->
+	<target name="clean">
+		<delete file="${dest.dir}/${package.name}" />
+		<delete dir="${temp.dir}" />
+		<delete dir="${temp.dir.classes}" />
+		<delete dir="${temp.dir.meta-inf}" />
+		<delete dir="${temp.dir.web-inf}" />
+	</target>
+
+	<!-- PREPARE -->
+	<target name="prepare" depends="clean">
+		<mkdir dir="${dest.dir}" />
+		<mkdir dir="${temp.dir}" />
+		<mkdir dir="${temp.dir.lib}" />
+		<mkdir dir="${temp.dir.meta-inf}" />
+		<mkdir dir="${temp.dir.web-inf}" />
+		<mkdir dir="${temp.dir.classes}" />
+	</target>
+
+	<!-- COMPILE -->
+	<target name="compile" depends="prepare">
+		<echo>=== COMPILE ===</echo>
+		<echo>Compiling ${src.dir} files ...</echo>
+		<javac debug="on" srcdir="${src.dir}" destdir="${temp.dir.classes}" includes="**/*">
+			<classpath refid="build.class.path" />
+			<classpath path="/Users/berk/Documents/Apache-Tomcat/lib/servlet-api.jar" />
+		</javac>
+	</target>
+
+	<!-- PACKAGE -->
+	<target name="package" depends="compile">
+		<echo>=== PACKAGE ===</echo>
+
+		<!-- copy the config files -->
+		<copy file="${meta-inf.dir}/MANIFEST.MF" tofile="${temp.dir.meta-inf}/MANIFEST.MF" overwrite="true" />
+		<copy file="${meta-inf.dir}/context.xml" tofile="${temp.dir.meta-inf}/context.xml" overwrite="true" />
+		<copy file="${web-inf.dir}/web.xml" tofile="${temp.dir.web-inf}/web.xml" overwrite="true" />
+
+		<!-- the ant war task. with all resources in place, create the war file -->
+		<war destfile="${package.file}" webxml="${temp.dir.web-inf}/web.xml" basedir="${temp.dir}">
+			<lib dir="${lib.dir}" />
+		</war>
+	</target>
+
+</project>
\ No newline at end of file
diff --git a/build/classes/org/icinga/reporting/Formats.class b/build/classes/org/icinga/reporting/Formats.class
deleted file mode 100644
index 4702634..0000000
Binary files a/build/classes/org/icinga/reporting/Formats.class and /dev/null differ
diff --git a/build/classes/org/icinga/reporting/Generator.class b/build/classes/org/icinga/reporting/Generator.class
deleted file mode 100644
index 615698e..0000000
Binary files a/build/classes/org/icinga/reporting/Generator.class and /dev/null differ
diff --git a/build/classes/org/icinga/reporting/data/Loader.class b/build/classes/org/icinga/reporting/data/Loader.class
deleted file mode 100644
index b6d6996..0000000
Binary files a/build/classes/org/icinga/reporting/data/Loader.class and /dev/null differ
diff --git a/build/classes/org/icinga/reporting/database/ConnectionManager.class b/build/classes/org/icinga/reporting/database/ConnectionManager.class
deleted file mode 100644
index 82d6808..0000000
Binary files a/build/classes/org/icinga/reporting/database/ConnectionManager.class and /dev/null differ
diff --git a/build/classes/org/icinga/reporting/template/Reader.class b/build/classes/org/icinga/reporting/template/Reader.class
deleted file mode 100644
index db7dce4..0000000
Binary files a/build/classes/org/icinga/reporting/template/Reader.class and /dev/null differ
diff --git a/build/icinga-reports.war b/build/icinga-reports.war
new file mode 100644
index 0000000..0b78a4c
Binary files /dev/null and b/build/icinga-reports.war differ





More information about the icinga-checkins mailing list