Files
ofbiz-framework/framework/appserver/templates/jboss422/build.xml
T
Jacques Le Roux b9c3ddef08 2d part and end of an effort to remove trailing spaces
[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)

Of course this effort to remove trailing spaces has no functional implications.

Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {

So these changes are also in this commit, should not be a problem anyway.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 10:54:51 +00:00

145 lines
6.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!-- ======================================================================
OFBiz -> JBoss 4.2.2 Installer
====================================================================== -->
<project name="OfBiz JBoss" default="generate">
<description>
Create the ear file to run OfBiz in Jboss
</description>
<property name="DERBY_VERSION" value="10.4.1.3"/>
<property name="ofbizHome" location="${ofbizHome}/"/>
<!-- =================================
target: generate
================================= -->
<target name="generate" depends="installDerby" description="--> Create the ear file to run OfBiz in Jboss"/>
<!-- - - - - - - - - - - - - - - - - -
target: clean
- - - - - - - - - - - - - - - - - -->
<target name="clean">
<delete failonerror="false">
<fileset dir="./META-INF/">
<include name="**/**"/>
</fileset>
</delete>
<delete failonerror="false">
<fileset dir=".">
<include name="lib/** *.war"/>
</fileset>
</delete>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: installDerby
- - - - - - - - - - - - - - - - - -->
<target name="installDerby" depends="clean">
<!-- install derby -->
<copy file="${r"${ofbizHome}"}/framework/entity/lib/jdbc/derby-${r"${DERBY_VERSION}"}.jar" todir="../../lib/"/>
<!-- install derby plugin -->
<copy file="../../../../docs/examples/varia/derby-plugin.jar" todir="../../lib/"/>
<!-- install derby datasource -->
<copy todir=".">
<fileset dir="${r"${ofbizHome}"}/framework/appserver/templates/jboss422/patches/">
<include name="derby*.xml"/>
</fileset>
</copy>
<!-- move entityengine.xml, log4j.xml and jndi.properties -->
<move file="${r"${ofbizHome}"}/framework/entity/config/entityengine.xml" tofile="${r"${ofbizHome}"}/framework/entity/config/entityengine.xml.jbak"/>
<move file="${r"${ofbizHome}"}/framework/entity/config/entityengine-jboss422.xml" tofile="${r"${ofbizHome}"}/framework/entity/config/entityengine.xml"/>
<move file="${r"${ofbizHome}"}/framework/base/config/log4j.xml" tofile="${r"${ofbizHome}"}/framework/base/config/_log4j.xml.bak"/>
<move file="${r"${ofbizHome}"}/framework/base/config/jndi.properties" tofile="${r"${ofbizHome}"}/framework/base/config/_jndi.properties.bak"/>
<!-- copy all lib files -->
<mkdir dir="lib"/>
<copy todir="./lib" flatten="true">
<fileset dir="${r"${ofbizHome}"}">
<#list classpathJars as jar>
<#assign fullJarName = jar?j_string />
<#assign jarname = (fullJarName?substring(ofbizHome?length +1))?j_string/>
<include name="${jarname}"/>
</#list>
<exclude name="**/*j2eespec*.jar"/>
<exclude name="**/*geronimo*.jar"/>
<exclude name="**/*catalina*.jar"/>
<exclude name="**/*tomcat*.jar"/>
<exclude name="**/*mx4j*.jar"/>
<exclude name="**/*derby-*.jar"/>
<exclude name="**/*commons-logging*.jar"/>
<exclude name="**/*commons-collections*.jar "/>
<exclude name="**/*commons-codec*.jar"/>
<exclude name="**/*commons-el*.jar"/>
<exclude name="**/*avalon-framework*.jar"/>
<exclude name="**/*bsh*.jar"/>
<exclude name="**/*bsf*.jar"/>
<exclude name="**/*antlr*.jar"/>
<exclude name="**/*mail.jar"/>
<exclude name="**/*xerces*.jar"/>
<exclude name="**/*xalan*.jar"/>
</fileset>
</copy>
<#list classpathDirs as dir>
<#if (dir != ofbizHome)>
<#assign dirname = dir?substring((ofbizHome?j_string)?length +1) />
<#assign dirname = dirname?replace("/", ".", "r")/>
<jar destfile="./lib/${dirname}.jar">
<fileset dir="${dir}">
<include name="**/**"/>
</fileset>
</jar>
</#if>
</#list>
<!-- link the web applications -->
<#list webApps as webapp>
<copy todir=".${webapp.getContextRoot()}.war">
<fileset dir="${webapp.getLocation()}"/>
</copy>
</#list>
<!-- create the application meta data -->
<mkdir dir="META-INF"/>
<copy file="${targetDirectory}/application.xml" todir="./META-INF"></copy>
<copy file="${r"${ofbizHome}"}/framework/base/lib/scripting/bsh-2.0b4.jar" tofile="../../lib/bsh.jar"/>
<!-- revert entityengine.xml log4j.xml and jndi.properties -->
<move file="${r"${ofbizHome}"}/framework/entity/config/entityengine.xml" tofile="${r"${ofbizHome}"}/framework/entity/config/entityengine-jboss422.xml"/>
<move file="${r"${ofbizHome}"}/framework/entity/config/entityengine.xml.jbak" tofile="${r"${ofbizHome}"}/framework/entity/config/entityengine.xml"/>
<move file="${r"${ofbizHome}"}/framework/base/config/_log4j.xml.bak" tofile="${r"${ofbizHome}"}/framework/base/config/log4j.xml"/>
<move file="${r"${ofbizHome}"}/framework/base/config/_jndi.properties.bak" tofile="${r"${ofbizHome}"}/framework/base/config/jndi.properties"/>
<!-- setup the OFBIZ_HOME by updating run.conf -->
<move file="../../../../bin/run.conf" tofile="../../../../bin/run.conf.obak"/>
<copy file="${r"${ofbizHome}"}/setup/jboss422/run.conf" tofile="../../../../bin/run.conf"/>
</target>
</project>