Commit 17bdfa89 by HanDongdong

change ant config.

parent 04f17ac7
/bin/
*.war
<?xml version="1.0" encoding="UTF-8"?>
<sinoProp>
<connectionPool>
<prop name="platform.drivers">oracle.jdbc.driver.OracleDriver</prop>
<prop name="platform.url">jdbc:oracle:thin:@(description=(address_list=(address=(host=ts01-vip)(protocol=tcp)(port=1521))(address=(host=ts02-vip)(protocol=tcp)(port=1521))(load_balance=yes)(failover=on))(connect_data=(SERVER = DEDICATED)(service_name=dbsid)))</prop>
<prop name="platform.user">mnet_form</prop>
<prop name="platform.password">oracle123</prop>
<prop name="platform.maxconns">30</prop>
<prop name="platform.initconns">5</prop>
<prop name="platform.timeout">300</prop>
<prop name="platform.connectiontimeout">300</prop>
</connectionPool>
<connectionPool>
<prop name="ptcpjc.drivers">oracle.jdbc.driver.OracleDriver</prop>
<prop name="ptcpjc.url">jdbc:oracle:thin:@(description=(address_list=(address=(host=ts01-vip)(protocol=tcp)(port=1521))(address=(host=ts02-vip)(protocol=tcp)(port=1521))(load_balance=yes)(failover=on))(connect_data=(SERVER = DEDICATED)(service_name=dbsid)))</prop>
<prop name="ptcpjc.user">mnet_demo</prop>
<prop name="ptcpjc.password">oracle123</prop>
<prop name="ptcpjc.maxconns">30</prop>
<prop name="ptcpjc.initconns">5</prop>
<prop name="ptcpjc.timeout">300</prop>
<prop name="ptcpjc.connectiontimeout">300</prop>
</connectionPool>
</sinoProp>
## Dubbo zookeeper://192.168.80.113:2181?backup=192.168.80.113:2182,192.168.80.113:2183
dubbo.registry.address=zookeeper://192.30.30.4:2181?backup=192.30.30.5:2181,192.30.30.6:2181
dubbo.webform.port=19005
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>SINOEP-WEBFORM</display-name>
<!-- The front controller of this Spring Web application, responsible for handling all application requests -->
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:/config/log4j.xml</param-value>
</context-param>
<context-param>
<param-name>log4jRefreshInterval</param-name>
<param-value>60000</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<servlet>
<servlet-name>EnInitServlet</servlet-name>
<servlet-class>com.sinosoft.ep.en.plugin.InitServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>initServlet</servlet-name>
<servlet-class>com.sinosoft.main.HandleServlet</servlet-class>
<init-param>
<param-name>handle</param-name>
<param-value>/WEB-INF/sys/config/handle-config.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet>
<servlet-name>springDispatcherServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/product/webform/config/springmvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Map all requests to the DispatcherServlet for handling -->
<servlet-mapping>
<servlet-name>springDispatcherServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<listener>
<listener-class>
com.sinosoft.ep.webform.login.filter.InitFilterData
</listener-class>
</listener>
<filter>
<filter-name>ssoAuth</filter-name>
<filter-class>com.sinosoft.ep.webform.filter.SSOAuth</filter-class>
<init-param>
<!-- 认证系统服务 http://passport.com:8080/passport/ticket -->
<param-name>SSOService</param-name>
<param-value>http://192.30.30.14/sso/ticket</param-value>
</init-param>
<init-param>
<!-- 认证系统ticket名称 -->
<param-name>cookieName</param-name>
<param-value>SSOID</param-value>
</init-param>
<init-param>
<!-- 认证系统系统根路径 -->
<param-name>SSOPageUrl</param-name>
<param-value>http://59.207.34.135/sso/ticket</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ssoAuth</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- <listener>
<listener-class>
com.sinosoft.ep.webform.login.filter.InitFilterData
</listener-class>
</listener>
<filter>
<filter-name>ssoAuth</filter-name>
<filter-class>com.sinosoft.ep.webform.filter.SSOAuth</filter-class>
<init-param>
认证系统服务 http://passport.com:8080/passport/ticket
<param-name>SSOService</param-name>
<param-value>http://192.168.80.142:8080/sso/ticket</param-value>
</init-param>
<init-param>
认证系统ticket名称
<param-name>cookieName</param-name>
<param-value>SSOID</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ssoAuth</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> -->
<!-- <listener>
<listener-class>
com.sinosoft.ep.webform.login.filter.InitFilterData
</listener-class>
</listener>
登录拦截器
<filter>
<filter-name>ssoAuth</filter-name>
<filter-class>com.sinosoft.ep.webform.login.filter.SSOAuth</filter-class>
</filter>
<filter-mapping>
<filter-name>ssoAuth</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>/product/webform/index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sinoProp>
<connectionPool>
<prop name="platform.drivers">oracle.jdbc.driver.OracleDriver</prop>
<prop name="platform.url">jdbc:oracle:thin:@192.168.28.80/sinoepuias</prop>
<prop name="platform.user">form</prop>
<prop name="platform.password">form</prop>
<prop name="platform.maxconns">30</prop>
<prop name="platform.initconns">5</prop>
<prop name="platform.timeout">300</prop>
<prop name="platform.connectiontimeout">300</prop>
</connectionPool>
<connectionPool>
<prop name="ptcpjc.drivers">oracle.jdbc.driver.OracleDriver</prop>
<prop name="ptcpjc.url">jdbc:oracle:thin:@192.168.28.80/sinoepuias</prop>
<prop name="ptcpjc.user">demo</prop>
<prop name="ptcpjc.password">demo</prop>
<prop name="ptcpjc.maxconns">30</prop>
<prop name="ptcpjc.initconns">5</prop>
<prop name="ptcpjc.timeout">300</prop>
<prop name="ptcpjc.connectiontimeout">300</prop>
</connectionPool>
</sinoProp>
## Dubbo zookeeper://192.168.80.113:2181?backup=192.168.80.113:2182,192.168.80.113:2183
dubbo.registry.address=zookeeper://127.0.0.1:2181
dubbo.webform.port=19005
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>SINOEP-WEBFORM</display-name>
<!-- The front controller of this Spring Web application, responsible for handling all application requests -->
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:/config/log4j.xml</param-value>
</context-param>
<context-param>
<param-name>log4jRefreshInterval</param-name>
<param-value>60000</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<servlet>
<servlet-name>EnInitServlet</servlet-name>
<servlet-class>com.sinosoft.ep.en.plugin.InitServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>initServlet</servlet-name>
<servlet-class>com.sinosoft.main.HandleServlet</servlet-class>
<init-param>
<param-name>handle</param-name>
<param-value>/WEB-INF/sys/config/handle-config.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet>
<servlet-name>springDispatcherServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/product/webform/config/springmvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Map all requests to the DispatcherServlet for handling -->
<servlet-mapping>
<servlet-name>springDispatcherServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<listener>
<listener-class>
com.sinosoft.ep.webform.login.filter.InitFilterData
</listener-class>
</listener>
<filter>
<filter-name>ssoAuth</filter-name>
<filter-class>com.sinosoft.ep.webform.filter.SSOAuth</filter-class>
<init-param>
<!-- 认证系统服务 http://passport.com:8080/passport/ticket -->
<param-name>SSOService</param-name>
<param-value>http://127.0.0.1:8080/sso/ticket</param-value>
</init-param>
<init-param>
<!-- 认证系统ticket名称 -->
<param-name>cookieName</param-name>
<param-value>SSOID</param-value>
</init-param>
<init-param>
<!-- 认证系统系统根路径 -->
<param-name>SSOPageUrl</param-name>
<param-value></param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ssoAuth</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- <listener>
<listener-class>
com.sinosoft.ep.webform.login.filter.InitFilterData
</listener-class>
</listener>
<filter>
<filter-name>ssoAuth</filter-name>
<filter-class>com.sinosoft.ep.webform.filter.SSOAuth</filter-class>
<init-param>
认证系统服务 http://passport.com:8080/passport/ticket
<param-name>SSOService</param-name>
<param-value>http://192.168.80.142:8080/sso/ticket</param-value>
</init-param>
<init-param>
认证系统ticket名称
<param-name>cookieName</param-name>
<param-value>SSOID</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ssoAuth</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> -->
<!-- <listener>
<listener-class>
com.sinosoft.ep.webform.login.filter.InitFilterData
</listener-class>
</listener>
登录拦截器
<filter>
<filter-name>ssoAuth</filter-name>
<filter-class>com.sinosoft.ep.webform.login.filter.SSOAuth</filter-class>
</filter>
<filter-mapping>
<filter-name>ssoAuth</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>/product/webform/index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sinoProp>
<connectionPool>
<prop name="platform.drivers">oracle.jdbc.driver.OracleDriver</prop>
<prop name="platform.url">jdbc:oracle:thin:@127.0.0.1/sinoepuias</prop>
<prop name="platform.user">form</prop>
<prop name="platform.password">form</prop>
<prop name="platform.maxconns">30</prop>
<prop name="platform.initconns">5</prop>
<prop name="platform.timeout">300</prop>
<prop name="platform.connectiontimeout">300</prop>
</connectionPool>
<connectionPool>
<prop name="ptcpjc.drivers">oracle.jdbc.driver.OracleDriver</prop>
<prop name="ptcpjc.url">jdbc:oracle:thin:@127.0.0.1/sinoepuias</prop>
<prop name="ptcpjc.user">demo</prop>
<prop name="ptcpjc.password">demo</prop>
<prop name="ptcpjc.maxconns">30</prop>
<prop name="ptcpjc.initconns">5</prop>
<prop name="ptcpjc.timeout">300</prop>
<prop name="ptcpjc.connectiontimeout">300</prop>
</connectionPool>
<connectionPool>
<prop name="nbcs.drivers">oracle.jdbc.driver.OracleDriver</prop>
<prop name="nbcs.url">jdbc:oracle:thin:@127.0.0.1/sinoepuias</prop>
<prop name="nbcs.user">form</prop>
<prop name="nbcs.password">form</prop>
<prop name="nbcs.maxconns">30</prop>
<prop name="nbcs.initconns">5</prop>
<prop name="nbcs.timeout">300</prop>
<prop name="nbcs.connectiontimeout">300</prop>
</connectionPool>
</sinoProp>
## Dubbo zookeeper://192.168.80.113:2181?backup=192.168.80.113:2182,192.168.80.113:2183
dubbo.registry.address=zookeeper://127.0.0.1:2181
dubbo.webform.port=19005
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>SINOEP-WEBFORM</display-name>
<!-- The front controller of this Spring Web application, responsible for handling all application requests -->
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:/config/log4j.xml</param-value>
</context-param>
<context-param>
<param-name>log4jRefreshInterval</param-name>
<param-value>60000</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<servlet>
<servlet-name>EnInitServlet</servlet-name>
<servlet-class>com.sinosoft.ep.en.plugin.InitServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>initServlet</servlet-name>
<servlet-class>com.sinosoft.main.HandleServlet</servlet-class>
<init-param>
<param-name>handle</param-name>
<param-value>/WEB-INF/sys/config/handle-config.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet>
<servlet-name>springDispatcherServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/product/webform/config/springmvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Map all requests to the DispatcherServlet for handling -->
<servlet-mapping>
<servlet-name>springDispatcherServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<listener>
<listener-class>
com.sinosoft.ep.webform.login.filter.InitFilterData
</listener-class>
</listener>
<filter>
<filter-name>ssoAuth</filter-name>
<filter-class>com.sinosoft.ep.webform.filter.SSOAuth</filter-class>
<init-param>
<!-- 认证系统服务 http://passport.com:8080/passport/ticket -->
<param-name>SSOService</param-name>
<param-value>http://127.0.0.1:8080/sso/ticket</param-value>
</init-param>
<init-param>
<!-- 认证系统ticket名称 -->
<param-name>cookieName</param-name>
<param-value>SSOID</param-value>
</init-param>
<init-param>
<!-- 认证系统系统根路径 -->
<param-name>SSOPageUrl</param-name>
<param-value></param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ssoAuth</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- <listener>
<listener-class>
com.sinosoft.ep.webform.login.filter.InitFilterData
</listener-class>
</listener>
<filter>
<filter-name>ssoAuth</filter-name>
<filter-class>com.sinosoft.ep.webform.filter.SSOAuth</filter-class>
<init-param>
认证系统服务 http://passport.com:8080/passport/ticket
<param-name>SSOService</param-name>
<param-value>http://192.168.80.142:8080/sso/ticket</param-value>
</init-param>
<init-param>
认证系统ticket名称
<param-name>cookieName</param-name>
<param-value>SSOID</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ssoAuth</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> -->
<!-- <listener>
<listener-class>
com.sinosoft.ep.webform.login.filter.InitFilterData
</listener-class>
</listener>
登录拦截器
<filter>
<filter-name>ssoAuth</filter-name>
<filter-class>com.sinosoft.ep.webform.login.filter.SSOAuth</filter-class>
</filter>
<filter-mapping>
<filter-name>ssoAuth</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>/product/webform/index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project name="genwar" default="all" basedir=".">
<description> - Generate war file - </description>
<property environment="env" />
<property name="debuglevel" value="source,lines,vars" />
<property name="target" value="1.8" />
<property name="source" value="1.8" />
<property name="output.dir" location="." />
<!-- 要生成的WAR包的名称 -->
<property name="output.file" value="WebForm.war" />
<property name="project.build" location="./build" />
<!--项目的Java源文件-->
<property name="project.src" location="./src" />
<!--项目的Spring等配置源文件-->
<property name="project.log" location="./src/config" />
<property name="project.config" location="./WebContent/WEB-INF/product/webform/config" />
<property name="project.dubbo" location="./WebContent/WEB-INF/product/webform/dubbo" />
<property name="project.sysconfig" location="./WebContent/WEB-INF/sys/config" />
<!--<property name="project.spring" location="./WebContent/WEB-INF/product/webform/config" />-->
<!-- ANT 编译时需要使用到的配置文件 -->
<property name="project.ant" location="./ant/product" />
<!--项目的Web页面件-->
<property name="project.web" location="./WebContent" />
<!--项目的Java类库文件-->
<property name="project.lib" location="${project.web}/WEB-INF/lib" />
<!--项目的输出的WAR文件位置及名称-->
<property name="project.war" location="${project.build}/${output.file}" />
<property name="tmp" location="${project.build}/tmp" />
<property name="tmp.src" location="${tmp}/src" />
<property name="tmp.lib" location="${tmp}/lib" />
<property name="tmp.bin" location="${tmp}/bin" />
<property name="tmp.web" location="${tmp}/WebContent" />
<property name="tmp.classes" location="${tmp}/classes" />
<property name="boot.classpath" value="${env.classpath}/rt.jar"/>
<path id="javaclass.path">
<pathelement path="${env.classpath}" />
<fileset dir="${tmp.lib}" includes="*.jar" />
<fileset dir="${project.lib}" includes="*.jar" />
</path>
<target name="clean">
<delete file="${output.dir}/${output.file}" failonerror="false" />
<delete dir="${project.build}" failonerror="false" />
<mkdir dir="${project.build}" />
</target>
<target name="all" depends="clean,buildwar" />
<target name="initdir">
<echo message="Init directories " />
<delete dir="${tmp}" failonerror="false" />
<mkdir dir="${tmp}" />
<mkdir dir="${tmp.src}" />
<copy todir="${tmp.src}">
<fileset dir="${project.src}" excludes="**/.svn/**" />
</copy>
<mkdir dir="${tmp.lib}" />
<copy todir="${tmp.lib}">
<fileset dir="${project.web}/WEB-INF/lib" includes="*.jar" />
</copy>
<mkdir dir="${tmp.bin}" />
<mkdir dir="${tmp.web}/WEB-INF/lib" />
<delete dir="${tmp.web}/WEB-INF/classes" failonerror="false" />
<mkdir dir="${tmp.web}/WEB-INF/classes" />
</target>
<target name="compilejava" depends="initdir">
<echo message="Compiling java code " />
<javac debug="true"
debuglevel="${debuglevel}"
destdir="${tmp.bin}"
includeantruntime="on" encoding="UTF-8">
<compilerarg value="-Xlint:-options"/>
<src path="${project.src}" />
<classpath refid="javaclass.path" />
</javac>
<copy todir="${tmp.web}/WEB-INF/classes" includeemptydirs="false">
<fileset dir="${tmp.src}">
<exclude name="**/*.java" />
</fileset>
</copy>
<copy todir="${tmp.web}/WEB-INF/classes" includeemptydirs="false">
<fileset dir="${tmp.bin}">
<include name="**/*.class" />
</fileset>
</copy>
<!--<copy file="${project.ant}/log4j.xml" tofile="${project.log}/log4j.xml" /> -->
<!--将Spring配置文件复制到中间位置 -->
<copy todir="${tmp.web}/WEB-INF/classes" includeemptydirs="false">
<fileset dir="${project.sysconfig}" includes="*"/>
</copy>
<copy todir="${tmp.web}/WEB-INF/classes" includeemptydirs="false">
<fileset dir="${project.dubbo}" includes="*"/>
</copy>
<copy todir="${tmp.web}/WEB-INF/classes" includeemptydirs="false">
<fileset dir="${project.config}" includes="*"/>
</copy>
<copy todir="${tmp.web}/WEB-INF/classes" includeemptydirs="false">
<fileset dir="${project.log}" includes="*" />
</copy>
<!-- 项目配置文件 -->
<copy todir="${tmp.web}/WEB-INF/classes" includeemptydirs="false">
<fileset dir="${project.ant}" includes="*.properties" />
</copy>
<copy file="${project.ant}/connectionPool.xml" tofile="${tmp.web}/WEB-INF/sys/config/connectionPool.xml" overwrite="true"/>
<copy file="${project.ant}/web.xml" tofile="${tmp.web}/WEB-INF/web.xml" overwrite="true"/>
</target>
<target name="compilejava-without-copy" depends="initdir">
<echo message="Compiling java code " />
<javac debug="true" debuglevel="${debuglevel}"
destdir="${tmp.bin}" source="${source}" target="${target}"
encoding="UTF-8">
<compilerarg value="-Xlint:-options"/>
<src path="${project.src}" />
<classpath refid="javaclass.path" />
</javac>
</target>
<target name="buildwar" depends="compilejava">
<echo message="Packing war file " />
<copy todir="${tmp.web}">
<fileset dir="${project.web}" excludes="**/.svn/**" />
</copy>
<delete file="${project.war}" failonerror="false" />
<war destfile="${project.war}" basedir="${tmp.web}" webxml="${tmp.web}/WEB-INF/web.xml" encoding="utf-8" />
<delete dir="${tmp}" failonerror="false" />
<delete file="${output.dir}/${output.file}" failonerror="false" />
<move todir="${output.dir}" includeemptydirs="false" filtering="true">
<fileset dir="${project.build}">
<include name="**/*.war" />
</fileset>
</move>
<delete dir="${project.build}" failonerror="false" />
</target>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project name="genwar" default="all" basedir=".">
<description> - Generate war file - </description>
<property environment="env" />
<property name="debuglevel" value="source,lines,vars" />
<property name="target" value="1.8" />
<property name="source" value="1.8" />
<property name="output.dir" location="." />
<!-- 要生成的WAR包的名称 -->
<property name="output.file" value="WebForm.war" />
<property name="project.build" location="./build" />
<!--项目的Java源文件-->
<property name="project.src" location="./src" />
<!--项目的Spring等配置源文件-->
<property name="project.log" location="./src/config" />
<property name="project.config" location="./WebContent/WEB-INF/product/webform/config" />
<property name="project.dubbo" location="./WebContent/WEB-INF/product/webform/dubbo" />
<property name="project.sysconfig" location="./WebContent/WEB-INF/sys/config" />
<!--<property name="project.spring" location="./WebContent/WEB-INF/product/webform/config" />-->
<!-- ANT 编译时需要使用到的配置文件 -->
<property name="project.ant" location="./ant/sjy" />
<!--项目的Web页面件-->
<property name="project.web" location="./WebContent" />
<!--项目的Java类库文件-->
<property name="project.lib" location="${project.web}/WEB-INF/lib" />
<!--项目的输出的WAR文件位置及名称-->
<property name="project.war" location="${project.build}/${output.file}" />
<property name="tmp" location="${project.build}/tmp" />
<property name="tmp.src" location="${tmp}/src" />
<property name="tmp.lib" location="${tmp}/lib" />
<property name="tmp.bin" location="${tmp}/bin" />
<property name="tmp.web" location="${tmp}/WebContent" />
<property name="tmp.classes" location="${tmp}/classes" />
<property name="boot.classpath" value="${env.classpath}/rt.jar"/>
<path id="javaclass.path">
<pathelement path="${env.classpath}" />
<fileset dir="${tmp.lib}" includes="*.jar" />
<fileset dir="${project.lib}" includes="*.jar" />
</path>
<target name="clean">
<delete file="${output.dir}/${output.file}" failonerror="false" />
<delete dir="${project.build}" failonerror="false" />
<mkdir dir="${project.build}" />
</target>
<target name="all" depends="clean,buildwar" />
<target name="initdir">
<echo message="Init directories " />
<delete dir="${tmp}" failonerror="false" />
<mkdir dir="${tmp}" />
<mkdir dir="${tmp.src}" />
<copy todir="${tmp.src}">
<fileset dir="${project.src}" excludes="**/.svn/**" />
</copy>
<mkdir dir="${tmp.lib}" />
<copy todir="${tmp.lib}">
<fileset dir="${project.web}/WEB-INF/lib" includes="*.jar" />
</copy>
<mkdir dir="${tmp.bin}" />
<mkdir dir="${tmp.web}/WEB-INF/lib" />
<delete dir="${tmp.web}/WEB-INF/classes" failonerror="false" />
<mkdir dir="${tmp.web}/WEB-INF/classes" />
</target>
<target name="compilejava" depends="initdir">
<echo message="Compiling java code " />
<javac debug="true"
debuglevel="${debuglevel}"
destdir="${tmp.bin}"
includeantruntime="on" encoding="UTF-8">
<compilerarg value="-Xlint:-options"/>
<src path="${project.src}" />
<classpath refid="javaclass.path" />
</javac>
<copy todir="${tmp.web}/WEB-INF/classes" includeemptydirs="false">
<fileset dir="${tmp.src}">
<exclude name="**/*.java" />
</fileset>
</copy>
<copy todir="${tmp.web}/WEB-INF/classes" includeemptydirs="false">
<fileset dir="${tmp.bin}">
<include name="**/*.class" />
</fileset>
</copy>
<!--<copy file="${project.ant}/log4j.xml" tofile="${project.log}/log4j.xml" /> -->
<!--将Spring配置文件复制到中间位置 -->
<copy todir="${tmp.web}/WEB-INF/product/webform/dubbo" includeemptydirs="false">
<fileset dir="${project.dubbo}" includes="*.*" />
</copy>
<copy todir="${tmp.web}/WEB-INF/product/webform/config" includeemptydirs="false">
<fileset dir="${project.config}" includes="*.*" />
</copy>
<copy todir="${tmp.web}/WEB-INF/sys/config" includeemptydirs="false">
<fileset dir="${project.sysconfig}" includes="*.*" />
</copy>
<copy todir="${tmp.web}/WEB-INF/classes/config" includeemptydirs="false">
<fileset dir="${project.log}" includes="*.*" />
</copy>
<!-- 项目配置文件 -->
<copy todir="${tmp.web}/WEB-INF/classes" includeemptydirs="false">
<fileset dir="${project.ant}" includes="*.properties" />
</copy>
<copy file="${project.ant}/connectionPool.xml" tofile="${tmp.web}/WEB-INF/sys/config/connectionPool.xml" overwrite="true"/>
<copy file="${project.ant}/web.xml" tofile="${tmp.web}/WEB-INF/web.xml" overwrite="true"/>
</target>
<target name="compilejava-without-copy" depends="initdir">
<echo message="Compiling java code " />
<javac debug="true" debuglevel="${debuglevel}"
destdir="${tmp.bin}" source="${source}" target="${target}"
encoding="UTF-8">
<compilerarg value="-Xlint:-options"/>
<src path="${project.src}" />
<classpath refid="javaclass.path" />
</javac>
</target>
<target name="buildwar" depends="compilejava">
<echo message="Packing war file " />
<copy todir="${tmp.web}">
<fileset dir="${project.web}" excludes="**/.svn/**" />
</copy>
<delete file="${project.war}" failonerror="false" />
<war destfile="${project.war}" basedir="${tmp.web}" webxml="${tmp.web}/WEB-INF/web.xml" encoding="utf-8" />
<delete dir="${tmp}" failonerror="false" />
<delete file="${output.dir}/${output.file}" failonerror="false" />
<move todir="${output.dir}" includeemptydirs="false" filtering="true">
<fileset dir="${project.build}">
<include name="**/*.war" />
</fileset>
</move>
<delete dir="${project.build}" failonerror="false" />
</target>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project name="genwar" default="all" basedir=".">
<description> - Generate war file - </description>
<property environment="env" />
<property name="debuglevel" value="source,lines,vars" />
<property name="target" value="1.8" />
<property name="source" value="1.8" />
<property name="output.dir" location="." />
<!-- 要生成的WAR包的名称 -->
<property name="output.file" value="WebForm.war" />
<property name="project.build" location="./build" />
<!--项目的Java源文件-->
<property name="project.src" location="./src" />
<!--项目的Spring等配置源文件-->
<property name="project.log" location="./src/config" />
<property name="project.config" location="./WebContent/WEB-INF/product/webform/config" />
<property name="project.dubbo" location="./WebContent/WEB-INF/product/webform/dubbo" />
<property name="project.sysconfig" location="./WebContent/WEB-INF/sys/config" />
<!--<property name="project.spring" location="./WebContent/WEB-INF/product/webform/config" />-->
<!-- ANT 编译时需要使用到的配置文件 -->
<property name="project.ant" location="./ant/test" />
<!--项目的Web页面件-->
<property name="project.web" location="./WebContent" />
<!--项目的Java类库文件-->
<property name="project.lib" location="${project.web}/WEB-INF/lib" />
<!--项目的输出的WAR文件位置及名称-->
<property name="project.war" location="${project.build}/${output.file}" />
<property name="tmp" location="${project.build}/tmp" />
<property name="tmp.src" location="${tmp}/src" />
<property name="tmp.lib" location="${tmp}/lib" />
<property name="tmp.bin" location="${tmp}/bin" />
<property name="tmp.web" location="${tmp}/WebContent" />
<property name="tmp.classes" location="${tmp}/classes" />
<property name="boot.classpath" value="${env.classpath}/rt.jar"/>
<path id="javaclass.path">
<pathelement path="${env.classpath}" />
<fileset dir="${tmp.lib}" includes="*.jar" />
<fileset dir="${project.lib}" includes="*.jar" />
</path>
<target name="clean">
<delete file="${output.dir}/${output.file}" failonerror="false" />
<delete dir="${project.build}" failonerror="false" />
<mkdir dir="${project.build}" />
</target>
<target name="all" depends="clean,buildwar" />
<target name="initdir">
<echo message="Init directories " />
<delete dir="${tmp}" failonerror="false" />
<mkdir dir="${tmp}" />
<mkdir dir="${tmp.src}" />
<copy todir="${tmp.src}">
<fileset dir="${project.src}" excludes="**/.svn/**" />
</copy>
<mkdir dir="${tmp.lib}" />
<copy todir="${tmp.lib}">
<fileset dir="${project.web}/WEB-INF/lib" includes="*.jar" />
</copy>
<mkdir dir="${tmp.bin}" />
<mkdir dir="${tmp.web}/WEB-INF/lib" />
<delete dir="${tmp.web}/WEB-INF/classes" failonerror="false" />
<mkdir dir="${tmp.web}/WEB-INF/classes" />
</target>
<target name="compilejava" depends="initdir">
<echo message="Compiling java code " />
<javac debug="true"
debuglevel="${debuglevel}"
destdir="${tmp.bin}"
includeantruntime="on" encoding="UTF-8">
<compilerarg value="-Xlint:-options"/>
<src path="${project.src}" />
<classpath refid="javaclass.path" />
</javac>
<copy todir="${tmp.web}/WEB-INF/classes" includeemptydirs="false">
<fileset dir="${tmp.src}">
<exclude name="**/*.java" />
</fileset>
</copy>
<copy todir="${tmp.web}/WEB-INF/classes" includeemptydirs="false">
<fileset dir="${tmp.bin}">
<include name="**/*.class" />
</fileset>
</copy>
<!--<copy file="${project.ant}/log4j.xml" tofile="${project.log}/log4j.xml" /> -->
<!--将Spring配置文件复制到中间位置 -->
<copy todir="${tmp.web}/WEB-INF/product/webform/dubbo" includeemptydirs="false">
<fileset dir="${project.dubbo}" includes="*.*" />
</copy>
<copy todir="${tmp.web}/WEB-INF/product/webform/config" includeemptydirs="false">
<fileset dir="${project.config}" includes="*.*" />
</copy>
<copy todir="${tmp.web}/WEB-INF/sys/config" includeemptydirs="false">
<fileset dir="${project.sysconfig}" includes="*.*" />
</copy>
<copy todir="${tmp.web}/WEB-INF/classes/config" includeemptydirs="false">
<fileset dir="${project.log}" includes="*.*" />
</copy>
<!-- 项目配置文件 -->
<copy todir="${tmp.web}/WEB-INF/classes" includeemptydirs="false">
<fileset dir="${project.ant}" includes="*.properties" />
</copy>
<copy file="${project.ant}/connectionPool.xml" tofile="${tmp.web}/WEB-INF/sys/config/connectionPool.xml" overwrite="true"/>
<copy file="${project.ant}/web.xml" tofile="${tmp.web}/WEB-INF/web.xml" overwrite="true"/>
</target>
<target name="compilejava-without-copy" depends="initdir">
<echo message="Compiling java code " />
<javac debug="true" debuglevel="${debuglevel}"
destdir="${tmp.bin}" source="${source}" target="${target}"
encoding="UTF-8">
<compilerarg value="-Xlint:-options"/>
<src path="${project.src}" />
<classpath refid="javaclass.path" />
</javac>
</target>
<target name="buildwar" depends="compilejava">
<echo message="Packing war file " />
<copy todir="${tmp.web}">
<fileset dir="${project.web}" excludes="**/.svn/**" />
</copy>
<delete file="${project.war}" failonerror="false" />
<war destfile="${project.war}" basedir="${tmp.web}" webxml="${tmp.web}/WEB-INF/web.xml" encoding="utf-8" />
<delete dir="${tmp}" failonerror="false" />
<delete file="${output.dir}/${output.file}" failonerror="false" />
<move todir="${output.dir}" includeemptydirs="false" filtering="true">
<fileset dir="${project.build}">
<include name="**/*.war" />
</fileset>
</move>
<delete dir="${project.build}" failonerror="false" />
</target>
</project>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment