Browse Source

Moved a few more properties into config files.

Thomas Flucke 6 years ago
parent
commit
a3e1f384ef

+ 17 - 11
build.xml

@@ -1,17 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<project name="ieat2" basedir="." default="war" xmlns:ivy="antlib:org.apache.ivy.ant">
+<project name="ieat2" basedir="." default="war"
+         xmlns:ivy="antlib:org.apache.ivy.ant">
   <property name="lib.dir" value="lib/"/>
   <property name="web.dir" value="web/"/>
   <property name="test.dir" value="tests/"/>
   <property name="conf.dir" value="conf/dev/"/>
   <property name="script.dir" value="scripts/"/>
-  
-  <property name="app.name" value="ieat"/>  
-  <property name="app.conf.dir" value="${conf.dir}/app/"/>
 
   <property name="ant.lib" value="${user.home}/.ant/lib"/>
   <property name="ant.conf.dir" value="${conf.dir}/ant/"/>
+  
+  <property prefix="app" file="${ant.conf.dir}/app.properties"/>
+  <property name="app.conf.dir" value="${conf.dir}/app/"/>
 
   <property prefix="tomcat" file="${ant.conf.dir}/tomcat.properties"/>
 
@@ -23,8 +24,7 @@
 	<format property="build.time" pattern="MM/dd/yyyy hh:mm aa z" />
   </tstamp>
 
-  <property name="test.halt.failure" value="off"/>
-  <property name="test.halt.error" value="off"/>
+  <property prefix="test" file="${ant.conf.dir}/test.properties"/>
   <property name="test.lib" value="${lib.dir}/test/"/>
   <property name="test.target.dir" value="${build.dir}/tests"/>
 
@@ -46,14 +46,16 @@
   <available property="ivy.installed" file="${ivy.jar}"/>
 
   <property name="kotlin.lib" value="/opt/kotlinc/lib" />
-  <typedef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
+  <typedef resource="org/jetbrains/kotlin/ant/antlib.xml"
+           classpath="${kotlin.lib}/kotlin-ant.jar"/>
   
   <target name="help" description="Display build help">
 	<echo>iEat v${build.version}</echo>
 	<echo>To see list of targets, use ant -p</echo>
   </target>
 
-  <target name="skip.ivy" description="Do not check dependencies. (Saves laptop battery)">
+  <target name="skip.ivy"
+          description="Do not check dependencies. (Saves laptop battery)">
     <property name="ivy.skip" value="true"/>  
   </target>
 
@@ -61,11 +63,14 @@
     <mkdir dir="${ant.lib}"/>
     <get dest="${ivy.jar}"
          src="http://search.maven.org/remotecontent?filepath=org/apache/ivy/ivy/2.3.0/ivy-2.3.0.jar"/>
-    <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpath="${ivy.jar}"/>
+    <taskdef resource="org/apache/ivy/ant/antlib.xml"
+             uri="antlib:org.apache.ivy.ant"
+             classpath="${ivy.jar}"/>
     <property name="ivy.installed" value="true"/>
   </target>
 
-  <target name="ivy.tree" depends="ivy.install" description="Show the dependency tree.">
+  <target name="ivy.tree" depends="ivy.install"
+          description="Show the dependency tree.">
     <ivy:dependencytree />
   </target>
 
@@ -86,7 +91,8 @@
   </target>
   
   <target name="test.load" depends="ivy.resolve.ant">
-    <taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" />
+    <taskdef name="junit"
+             classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" />
   </target>
 
   <target name="init.db"

+ 4 - 0
conf/dev/ant/app.properties

@@ -0,0 +1,4 @@
+# Basic information about the app
+
+# App Name
+name = ieat

+ 1 - 1
conf/dev/ant/build.properties

@@ -9,4 +9,4 @@ dir = build/
 # Java version
 java.version = 1.8
 # Path to libraries matching the java version
-bootstrap.path = /usr/lib/jvm/java-8-openjdk/jre/lib/rt.jar
+bootstrap.path = /usr/lib/jvm/java-8-openjdk/jre/lib/rt.jar

+ 8 - 0
conf/dev/ant/test.properties

@@ -0,0 +1,8 @@
+# Test configuration information
+# Includes information such as how to handle failures
+
+# Halt tests when there's a failure
+halt.failure = off
+
+# Halt tests when there's an error
+halt.error = off

+ 0 - 3
src/java/name/tflucke/ieat2/client/test.kt

@@ -1,3 +0,0 @@
-package name.tflucke.ieat2.client;
-
-fun main(args: Array<String>) = println("Hello World")