在Tdk_Home目录下的build.properties我只是加了
tdk.home = .在webapps\newapp\WEB-INF\build中的build.xml我没有改过。
tdk.home = .在webapps\newapp\WEB-INF\build中的build.xml我没有改过。
解决方案 »
- <s:property value="%{news.content}" />显示没有段落
- tomcat部署项目去除工程名
- 有没有人懂wiki?做一个wiki的项目要用到什么jar???
- struts2 表单 如何更新数据库数据
- (同样问题100分求解) 转贴:fileupload上传大文件,想加上进度条显示上传进程,给些源代码或修改思路
- jsp标签能不能和struts标签结合呢?
- 页面中的跳转和传值问题
- 如何在Struts标记属性中嵌套Struts标记
- java中有没有截尾函数呀???例如取整或四舍五入
- 继续就weblogic classpath设置迷惑......(200,在线等侯)
- java写XML的问题!急!!急!!
- 高手进来看看,我现在是用weblogic作服务器的,为什么只能够读取一个数据库字段,顶者有分?????为什么为什么为什么为什么强烈为什么?????
<property file="build.properties"/>
<property file="project.properties"/> <!-- This value is currently set as a property because
the top level tdk build.xml file runs the "init" target
as part of testing and texen doesn't obey the ${basedir}
property so we must pass in the full path to the
build.properties for use with the contextProperties attribute.
-->
<property name="build.properties" value="build.properties"/> <path id="classpath">
<fileset dir="${tdk.home}/webapps/${tdk.project}/WEB-INF/lib">
<include name="**/*.jar"/>
</fileset>
</path> <!-- ================================================================ -->
<!-- D E P L O Y M E N T T A R G E T S -->
<!-- ================================================================ --> <target
name="assemble-webapp-in-container"
depends="init"> <copy todir="${build.webappRoot}">
<fileset dir=".">
<include name="images/**"/>
<include name="resources/**"/>
<include name="templates/**"/>
</fileset>
</copy> <copy todir="${build.webappRoot}/WEB-INF">
<fileset dir=".">
<include name="setup/**"/>
</fileset>
</copy> <!-- Move the application configuration files into position. -->
<copy todir="${build.webappRoot}/WEB-INF/conf">
<fileset dir="src/conf"/>
</copy> <!-- Adjust the deployment descriptor from cvslayout mode
back to in-container mode. --> <ant dir="${tdk.home}" target="deployment-descriptor">
<property name="app.root" value="webappContext"/>
<property name="app.properties" value="/WEB-INF/conf/TurbineResources.properties"/>
</ant> </target> <target
name="deploy-war"
depends="assemble-webapp-in-container"> <jar jarfile="${tdk.project}.war">
<fileset dir="${tdk.home}/webapps">
<include name="${tdk.project}/**"/>
</fileset>
</jar>
</target> <target
name="deploy-container"
depends="assemble-webapp-in-container"> <mkdir dir="target/${tdk.project}"/>
<copy todir="target/${tdk.project}">
<fileset dir="${tdk.home}">
<exclude name="tdk/**"/>
<exclude name="build.xml"/>
<exclude name="build.properties"/>
<exclude name="GETTING_STARTED.txt"/>
</fileset>
</copy> <tar longfile="gnu" tarfile="${tdk.project}.tar">
<tarfileset dir="target" mode="755">
<include name="**/*.sh"/>
</tarfileset>
<tarfileset dir="target">
<include name="**"/>
<exclude name="**/*.sh"/>
</tarfileset>
</tar> <gzip zipfile="${tdk.project}.tar.gz" src="${tdk.project}.tar"/>
<zip zipfile="${tdk.project}.zip" basedir="target"/>
<delete file="${tdk.project}.tar"/>
</target>
<!-- S E T U P T A R G E T -->
<!-- ================================================================ -->
<!-- Check that properties are defined correctly. -->
<!-- ================================================================ --> <target
name="setup"
unless="tdk.home"> <echo>
***
* ERROR : The 'tdk.home' property is not defined or
* is pointing to an invalid directory.
*
* In your personal build.properties define tdk.home to
* point to an absolute path where your tdk is installed.
* Example: tdk.home=${user.home}/tdk
***
</echo>
<fail message="ERROR: tdk.home not defined properly: ${tdk.home}"/>
</target> <!-- ================================================================ -->
<!-- I N I T T A S K T A R G E T -->
<!-- ================================================================ -->
<!-- Taskdefs are defined inside this target as Ant seems to have -->
<!-- problems defining them at the top level. -->
<!-- ================================================================ --> <target name="init-tasks" depends="setup"> <taskdef name="texen"
classname="org.apache.velocity.texen.ant.TexenTask">
<classpath refid="classpath"/>
</taskdef><!--
<taskdef name="format-source"
classname="jstyle.FormatTask">
<classpath refid="classpath"/>
</taskdef>
-->
</target> <!-- ================================================================ -->
<!-- I N I T T A R G E T -->
<!-- ================================================================ -->
<!-- You will probably only run this target once. It will generate -->
<!-- your sources for you and compile them. -->
<!-- ================================================================ --> <target
name="init"
depends="setup-webinf"
description="--> generates the full application"> <antcall target="create-database"/>
<antcall target="schema-sql"/>
<antcall target="idtable-init-sql"/>
<antcall target="security-sql"/>
<antcall target="insert-sql-files"/>
<antcall target="update-tr-props"/>
<antcall target="project-om"/>
<antcall target="compile"/>
</target> <!-- ================================================================ -->
<!-- C R E A T E T A R G E T D A T A B A S E -->
<!-- ================================================================ -->
<!-- Create the target database by executing a generated script -->
<!-- that is capable of performing the task. -->
<!-- ================================================================ --> <target
name="create-database"
depends="init-tasks"
unless="database.manual.creation"
description="--> generates the target database"> <ant
antfile="${torque.buildFile}"
target="create-db">
</ant>
</target>
<!-- -->
<!-- G E N E R A T E T A B L E S Q L -->
<!-- -->
<!-- ================================================================ --> <target
name="schema-sql"
depends="init-tasks"
description="--> generates the sql-script for your project"> <ant
antfile="${torque.buildFile}"
target="sql">
</ant>
</target> <!-- ================================================================ -->
<!-- -->
<!-- G E N E R A T E I D B R O K E R I N I T S Q L -->
<!-- -->
<!-- ================================================================ --> <target
name="idtable-init-sql"> <ant
antfile="${torque.buildFile}"
target="id-table-init-sql">
</ant>
</target> <target
name="security-sql"
unless="noSecuritySQL"
description="Creates SQL to initialize the security system."> <taskdef
name="torque-datasql"
classname="org.apache.torque.task.TorqueDataSQLTask">
<classpath refid="classpath"/>
</taskdef> <torque-datasql
contextProperties="${build.properties}"
controlTemplate="${DataSQLControlTemplate}"
outputDirectory="${src.dir}/sql"
useClasspath="true"
outputFile="turbine-security.sql"
xmlFile="${conf.dir}/turbine-schema.xml"
dataXmlFile="${conf.dir}/turbine-security.xml"
dataDTD="${conf.dir}/turbine-security.dtd"
targetDatabase="${database}"
sqldbmap="${src.dir}/sql/sqldb.map"
/>
<!--
<ant
antfile="${torque.buildFile}"
target="project-datasql">
</ant>
-->
</target> <!-- ================================================================ -->
<!-- G E N E R A T E P R O J E C T P E E R B A S E D O M -->
<!-- ================================================================ -->
<!-- Generate the Peer-based object model for your project. -->
<!-- These are in addition to the base Turbine OM! -->
<!-- ================================================================ --> <target
name="project-om"
unless="noObjectModel"
description="--> generates the peer-based object model for your project"> <ant
antfile="${torque.buildFile}"
target="om">
</ant> <!--
<format-source>
<fileset dir="${src.dir}/${targetDirectory}">
<include name="**/*.java"/>
</fileset>
</format-source>
--> </target> <!-- ================================================================ -->
<!-- I N S E R T S I N G L E S Q L F I L E -->
<!-- ================================================================ --> <target
name="setDatabaseUrl"
if="build.databaseUrl"> <property name="sqlInsert.databaseUrl" value="${build.databaseUrl}"/>
</target> <target
name="insert-sql-files"
depends="setDatabaseUrl"> <property name="sqlInsert.databaseUrl" value="${databaseUrl}"/> <ant
antfile="${torque.buildFile}"
target="insert-sql">
</ant><!--
<sql-tdk
driver="${databaseDriver}"
url="${sqlInsert.databaseUrl}"
userid="${databaseUser}"
password="${databasePassword}"
autocommit="true"
onerror="continue"
sqldbmap="${src.dir}/sql/sqldb.map"
srcDir="${src.dir}/sql">
<classpath refid="classpath"/>
</sql-tdk>
-->
</target> <!-- ================================================================ -->
<!-- U P D A T E T U R B I N E R E S O U R C E S P R O P S -->
<!-- ================================================================ --> <target
name="update-tr-props"> <filter token="APPLICATION_ROOT" value="."/>
<filter token="DATABASE" value="${database}"/>
<filter token="DATABASE_DRIVER" value="${databaseDriver}"/>
<filter token="DATABASE_URL" value="${databaseUrl}"/>
<filter token="DATABASE_BUILD_URL" value="${build.databaseUrl}"/>
<filter token="DATABASE_USER" value="${databaseUser}"/>
<filter token="DATABASE_PASSWORD" value="${databasePassword}"/>
<filter token="DATABASE_HOST" value="${databaseHost}"/>
<filter token="DATABASE_DEFAULT" value="${tdk.project}"/> <property name="database.descriptor" value="${master.conf.dir}/database/${database}"/>
<property name="database.name" value="${tdk.project}"/>
<property file="${database.descriptor}"/> <filter token="DATABASE_ADAPTOR" value="${database.adaptor}"/> <copy
file="${conf.dir}/TurbineResources.template"
tofile="${conf.dir}/TurbineResources.properties"
overwrite="yes"
filtering="yes"
/>
<copy
file="${conf.dir}/Torque.template"
tofile="${conf.dir}/Torque.properties"
overwrite="yes"
filtering="yes"
/>
</target>