You are viewing a plain text version of this content. The canonical link for it is here.
Posted to lokahi-commits@incubator.apache.org by to...@apache.org on 2006/06/12 21:04:52 UTC
svn commit: r413746 - in /incubator/lokahi/lokahi/trunk: build.properties
build.xml conf/ApplicationResources.properties conf/agent.log4j.xml
conf/log4j.xml docs/README.TXT
Author: toback
Date: Mon Jun 12 14:04:52 2006
New Revision: 413746
URL: http://svn.apache.org/viewvc?rev=413746&view=rev
Log:
Changed the build process to auto-generate most of the configuration needed for the web-application.
Modified:
incubator/lokahi/lokahi/trunk/build.properties
incubator/lokahi/lokahi/trunk/build.xml
incubator/lokahi/lokahi/trunk/conf/ApplicationResources.properties
incubator/lokahi/lokahi/trunk/conf/agent.log4j.xml
incubator/lokahi/lokahi/trunk/conf/log4j.xml
incubator/lokahi/lokahi/trunk/docs/README.TXT
Modified: incubator/lokahi/lokahi/trunk/build.properties
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/build.properties?rev=413746&r1=413745&r2=413746&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/build.properties (original)
+++ incubator/lokahi/lokahi/trunk/build.properties Mon Jun 12 14:04:52 2006
@@ -1,6 +1,20 @@
+tomcat.home=/opt/tomcat5.5.9/
app.name=lokahi
-app.home=.
+app.virtuahost.name=
+app.authenticationmodule=org.apache.lokahi.core.common.authentication.NoAuthentication
+console.log.location=
+agent.log.location=
+database.uri=jdbc:oracle:thin:@some.server.net:PORT:SCHEMA
+database.user=
+database.password=
+database.driver=oracle.jdbc.driver.OracleDriver
+inital.instance.name=
+inital.user.name=
+install.location=${tomcat.home}/webapps/
+
+
+app.home=.
app.lib=${app.home}/lib
app.conf=${app.home}/conf
app.src=${app.home}/src
@@ -9,7 +23,9 @@
app.src.java=${app.src}/java
app.src.www=${app.src}/www
app.src.test=${app.src}/test
+
app.compile=/tmp/target/compile
+
app.build=${app.home}/build/${app.name}
app.build.db=${app.home}/build/${app.name}/database
app.build.agent=${app.build}/agent/
@@ -17,5 +33,5 @@
app.build.web-inf=${app.build.context}/WEB-INF
app.build.web-inf.lib=${app.build.web-inf}/lib
app.build.web-inf.classes=${app.build.web-inf}/classes
-tomcat.home=/opt/tmc/tomcat5.5.9/
+
tomcat.common.lib=${tomcat.home}/common/lib
Modified: incubator/lokahi/lokahi/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/build.xml?rev=413746&r1=413745&r2=413746&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/build.xml (original)
+++ incubator/lokahi/lokahi/trunk/build.xml Mon Jun 12 14:04:52 2006
@@ -2,7 +2,7 @@
<target name="install" depends="init,jar,copy-www,copy-db,build-agent,copy-docs,post-process"/>
- <target name="post-process" depends="copy-dependent-libs,copy-etc" />
+ <target name="post-process" depends="copy-dependent-libs,copy-etc"/>
<target name="copy-www">
<copy todir="${app.build.context}">
@@ -37,17 +37,18 @@
<exclude name="db.properties"/>
<exclude name="state.xml"/>
<exclude name="function.xml"/>
+ <exclude name="agent.*"/>
</fileset>
<filterchain>
<replacetokens begintoken="@" endtoken="@">
<token key="TOMCAT_HOME" value="${tomcat.home}"/>
<token key="APP_NAME" value="${app.name}"/>
+ <token key="CONSOLE_LOG_LOCATION" value="${console.log.location}"/>
</replacetokens>
</filterchain>
</copy>
<copy todir="${app.build.web-inf.classes}">
<fileset dir="${app.conf}">
- <include name="dbpool.props"/>
<include name="lokahi.properties"/>
<include name="db.properties"/>
<include name="state.xml"/>
@@ -55,10 +56,31 @@
</fileset>
</copy>
<copy todir="${app.build.web-inf.classes}/lokahi">
- <fileset dir="${app.conf}" >
+ <fileset dir="${app.conf}">
<include name="ApplicationResources.properties"/>
</fileset>
+ <filterchain>
+ <replacetokens begintoken="@" endtoken="@">
+ <token key="APPROOT" value="/${app.name}"/>
+ <token key="RSSLOC" value="//${app.virtuahost.name)/${app.name}/rss/alert"/>
+ </replacetokens>
+ </filterchain>
</copy>
+ <propertyfile
+ file="${app.build.web-inf.classes}/lokahi.properties"
+ comment="Generated automatically. See conf/lokahi.properties for comments.">
+ <entry key="application.root" value="/${app.name}"/>
+ <entry key="application.full.url" value="http://${app.virtuahost.name)/${app.name}/"/>
+ <entry key="AGENT_REPLY_TO_ADDRESS" value="http://${app.virtuahost.name)/${app.name}/services/TmcJob"/>
+ <entry key="rest.servlet.url" value="http://${app.virtuahost.name)/${app.name}/rest/"/>
+ <entry key="AuthenticateModule" value="${app.authenticationmodule}"/>
+ <entry key="tmc.database.uri" value="${database.uri}"/>
+ <entry key="tmc.database.user" value="${database.user}"/>
+ <entry key="tmc.database.password" value="${database.password}"/>
+ <entry key="tmc.database.driver" value="${database.driver}"/>
+ <entry key="tmc.instance.name" value="${inital.instance.name}"/>
+ <entry key="prop.location" value="${install.location}/${app.name}"/>
+ </propertyfile>
</target>
<target name="jar" depends="compile">
@@ -82,20 +104,25 @@
<include name="derbyclient.jar"/>
<include name="jdom.jar"/>
</fileset>
- <fileset dir="${app.conf}" >
+ </copy>
+ <copy todir="${app.build.agent}">
+ <fileset dir="${app.conf}">
<include name="agent.properties"/>
- </fileset>
- <fileset dir="${app.conf}">
<include name="agent.wsdd"/>
<include name="agent.log4j.xml"/>
- <include name="log4j.dtd" />
+ <include name="log4j.dtd"/>
</fileset>
+ <filterchain>
+ <replacetokens begintoken="@" endtoken="@">
+ <token key="AGENT_LOG_LOCATION" value="${agent.log.location}"/>
+ </replacetokens>
+ </filterchain>
</copy>
</target>
- <target name="compile" depends="init" >
+ <target name="compile" depends="init">
<mkdir dir="${app.compile}"/>
- <javac srcdir="${app.src.java}" nowarn="true" deprecation="true" debug="true" destdir="${app.compile}" >
+ <javac srcdir="${app.src.java}" nowarn="true" deprecation="true" debug="true" destdir="${app.compile}">
<compilerarg value="-Xlint:unchecked"/>
<classpath>
<fileset refid="libs"/>
@@ -108,17 +135,17 @@
</javac>
</target>
- <target name="compile-test" depends="compile" >
- <mkdir dir="${app.compile}"/>
- <javac srcdir="${app.src.test}" nowarn="true" deprecation="true" debug="true" destdir="${app.compile}" >
- <classpath>
- <fileset refid="libs"/>
- <fileset dir="${tomcat.common.lib}">
- <include name="servlet-api.jar"/>
- </fileset>
- </classpath>
- </javac>
- </target>
+ <target name="compile-test" depends="compile">
+ <mkdir dir="${app.compile}"/>
+ <javac srcdir="${app.src.test}" nowarn="true" deprecation="true" debug="true" destdir="${app.compile}">
+ <classpath>
+ <fileset refid="libs"/>
+ <fileset dir="${tomcat.common.lib}">
+ <include name="servlet-api.jar"/>
+ </fileset>
+ </classpath>
+ </javac>
+ </target>
<target name="init">
Modified: incubator/lokahi/lokahi/trunk/conf/ApplicationResources.properties
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/conf/ApplicationResources.properties?rev=413746&r1=413745&r2=413746&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/conf/ApplicationResources.properties (original)
+++ incubator/lokahi/lokahi/trunk/conf/ApplicationResources.properties Mon Jun 12 14:04:52 2006
@@ -1,8 +1,8 @@
-application.root=/tmc
-rss.link.location=//tmcg2.sourceforge.net/tmc/rss/alert
+application.root=@APPROOT@
+rss.link.location=@RSSLOC@
-application.title=TMC v0.8.0
-application.version= v0.8.0
+application.title=Lokahi vM01
+application.version= vM01
#default validator errors.
errors.required={0} is required.
Modified: incubator/lokahi/lokahi/trunk/conf/agent.log4j.xml
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/conf/agent.log4j.xml?rev=413746&r1=413745&r2=413746&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/conf/agent.log4j.xml (original)
+++ incubator/lokahi/lokahi/trunk/conf/agent.log4j.xml Mon Jun 12 14:04:52 2006
@@ -10,7 +10,7 @@
<!-- </appender>-->
<appender name="file" class="org.apache.log4j.RollingFileAppender">
- <param name="File" value="/www/httpd/logs/websites/tmc_agent_log4j.log"/>
+ <param name="File" value="@AGENT_LOG_LOCATION@"/>
<param name="MaxFileSize" value="500000KB"/>
<param name="MaxBackupIndex" value="5"/>
<param name="Append" value="true"/>
Modified: incubator/lokahi/lokahi/trunk/conf/log4j.xml
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/conf/log4j.xml?rev=413746&r1=413745&r2=413746&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/conf/log4j.xml (original)
+++ incubator/lokahi/lokahi/trunk/conf/log4j.xml Mon Jun 12 14:04:52 2006
@@ -10,7 +10,7 @@
<!-- </appender>-->
<appender name="file" class="org.apache.log4j.RollingFileAppender">
- <param name="File" value="/www/httpd/logs/websites/tmc_log4j.log"/>
+ <param name="File" value="@CONSOLE_LOG_LOCATION@"/>
<param name="MaxFileSize" value="500000KB"/>
<param name="MaxBackupIndex" value="5"/>
<param name="Append" value="true"/>
Modified: incubator/lokahi/lokahi/trunk/docs/README.TXT
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/docs/README.TXT?rev=413746&r1=413745&r2=413746&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/docs/README.TXT (original)
+++ incubator/lokahi/lokahi/trunk/docs/README.TXT Mon Jun 12 14:04:52 2006
@@ -2,12 +2,27 @@
Build instructions:
1. untar the tarball, or take the latest src from svn @ http://svn.apache.org/repos/asf/incubator/lokahi/lokahi/trunk/
-2. edit the tomcat.home property in the build.properties file to point to your installation of tomcat.
+2. edit the following propertys in the build.properties file:
+
+tomcat.home=/opt/tomcat5.5.9/
+app.name=lokahi
+app.virtuahost.name=
+app.authenticationmodule=org.apache.lokahi.core.common.authentication.NoAuthentication
+console.log.location=
+agent.log.location=
+database.uri=jdbc:oracle:thin:@some.server.net:PORT:SCHEMA
+database.user=
+database.password=
+database.driver=oracle.jdbc.driver.OracleDriver
+inital.instance.name=
+inital.user.name=
+install.location=${tomcat.home}/webapps/
+
3. download and add the proper classes12.jar, from the oracle website, to the lib directory.
4. download and add jdom version 1.0 from http://www.jdom.org/ to the lib directory.
5. download and add the activation.jar from http://java.sun.com/products/javabeans/glasgow/jaf.html to the lib directory.
6. download and add the mail.jar from http://java.sun.com/products/javamail/ to the lib directory.
-4. verify that JAVA_HOME is properly set to point to jdk1.5 in your shell.
+7. verify that JAVA_HOME is properly set to point to jdk1.5 in your shell.
5. run ant to build the package.
Database setup:
@@ -25,28 +40,5 @@
Console install:
-1. in build/gui/WEB-INF/log4j.xml set this line to a valid path: <param name="File" value="/www/httpd/logs/websites/tmc_log4j.log"/>
-2. in build/gui/WEB-INF/classes/tmc/ApplicationResources.properties: application.root should be set to the context path, and rss.link.location should be set to <website>/<context>/rss/alert
-3. in build/gui/WEB-INF/classes/lokahi.properties set these:
-
-#context name
-application.root=/tmc
-#full site app is being hosted at
-application.full.url=http://tmcg2.sourceforge.net/tmc/
-#full site for controller access
-AGENT_REPLY_TO_ADDRESS=https://tmcg2.sourceforge.net/tmc/services/TmcJob
-#full url for the rest servlet
-rest.servlet.url=http://tmcg2.sourceforge.net/tmc/rest/
-#authentication Module to use
-AuthenticateModule=tmc.authentication.NoAuthentication
-#database info
-tmc.database.uri=jdbc:oracle:thin:@some.server.net:PORT:SCHEMA
-tmc.database.user=tmc
-tmc.database.password=tmc
-tmc.database.driver=oracle.jdbc.driver.OracleDriver
-#instance for this controller
-tmc.instance.name=WHS Intranet
-#location of properties files
-prop.location=/websites/tmcg2.sourceforge.net/java/tmc
-
-4. define the context in tomcats server.xml file and start tomcat.
+1.
+2. define the context in tomcats server.xml file and start tomcat.