WindChill build.xml

<?xml version="1.0" encoding="utf-8"?>
<project name="custom" basedir="." default="all">
	<description>Customization Build</description>

	<property environment="env" />
	<property name="base" location="." />
	<property name="wthome" location="${env.WT_HOME}" />
	<property name="bin" location="${wthome}/bin" />
	<property name="classpath" location="${env.CLASSPATH}" />
	<property name="wtcodebase" location="${wthome}/codebase" />
	<property name="wtsrc" location="${wthome}/src" />
	<property name="wtcustom" location="${wthome}/wtCustom" />
	<property name="wtsafearea" location="${wthome}/wtSafeArea" />
	<property name="sitemod" location="${wtsafearea}/siteMod" />
	<property name="archivelocation" location="${env.archivelocation}" />
	<target name="all" depends="check_path, dist, javac" >
		<echo message="${wthome}" />
	</target>

	<!--====================================================================-->
	<!-- Initialization                                                     -->
	<!--====================================================================-->
	<target name="init_os">
		<condition property="is_win32">
			<os family="windows" />
		</condition>
		<condition property="is_unix">
			<os family="unix" />
		</condition>
	</target>
	<target name="init_win32" depends="init_os" if="is_win32">
		<echo message="initializing win32 commands" />
		<property name="shell" value="cmd.exe" />
		<property name="shopt" value="/c" />
		<property name="ResourceBuild" value="${wthome}\bin\ResourceBuild.bat" />
		<property name="modelInstall" value="${wthome}\bin\modelInstall.bat" />
		<property name="xconfmanager" value="${wthome}\bin\xconfmanager.bat" />
		<property name="JavaGen" value="${wthome}\bin\JavaGen.bat" />
		<property name="ant" value="${wthome}\ant\bin\ant.bat" />
	</target>
	<target name="init_unix" depends="init_os" if="is_unix">
		<echo message="initializing unix commands" />
		<property name="shell" value="/bin/sh" />
		<property name="shopt" value="" />
		<property name="ResourceBuild" value="${wthome}/bin/ResourceBuild.sh" />
		<property name="BatchResourceBuild" value="${wthome}/bin/resource_all_unix.sh" />
		<property name="modelInstall" value="${wthome}/bin/modelInstall.sh" />
		<property name="xconfmanager" value="${wthome}/bin/xconfmanager" />
		<property name="JavaGen" value="${wthome}/bin/JavaGen.sh" />
		<property name="ant" value="${wthome}/ant/bin/ant" />
	</target>

	<target name="check_path" depends="init_win32, init_unix">
		<condition property="path_correct">
			<and>
				<available file="${wthome}/site.xconf" />
				<available file="${wthome}/codebase/wt.properties.xconf" />
				<available file="${wthome}/codebase/WEB-INF/ie.properties" />
			</and>
		</condition>
		<fail message="WT_HOME not correct, should work in windchill shell." unless="path_correct" />
	</target>

	<!--====================================================================-->
	<!-- Copy Files                                                         -->
	<!--====================================================================-->
	<target name="dist" depends="check_path">

		<copy todir="${wthome}" overwrite="true">
			<fileset dir="${base}">
				<include name="**/*.xconf" />
				<include name="**/*.addition" />
				<include name="**/*.properties" />
				<include name="bin/**/*" />
				<include name="conf/**/*" />
				<include name="db/sql3/**/*" />
				<include name="loadFiles/**/*" />
				<include name="loadXMLFiles/ext/**/*" />
				<include name="tasks/**/*.xml" />
				<include name="tasks/**/*.ldif" />
				<include name="wtCustom/**/*" />
				<include name="wtSafeArea/**/*" />
				<include name="install/**/*" />
				<exclude name="**/*.bak" />
				<exclude name="**/Thumbs.db" />
				<exclude name="**/.svn/**" />
			</fileset>
		</copy>

		<copy todir="${wthome}/src" overwrite="true">
			<fileset dir="${base}/src">
				<include name="**/*.rbInfo" />
				<include name="**/*.cat" />
				<include name="**/*.mData" />
				<include name="**/*.java" />
			</fileset>
		</copy>
		
		<copy todir="${wthome}/codebase" overwrite="true">
			<fileset dir="${base}/src">
				<include name="**/*.properties" />
				<include name="**/*.xml" />
			</fileset>
		</copy>
		
		<copy todir="${wthome}/codebase" overwrite="true">
			<fileset dir="${base}/codebase">
				<include name="**/*" />
				<exclude name="**/*.java" />
				<exclude name="**/*.rbInfo" />
				<exclude name="**/*.cat" />
				<exclude name="**/*.ca~" />
				<exclude name="**/*.mData" />
				<exclude name="**/*.bak" />
				<exclude name="**/Thumbs.db" />
				<exclude name="**/.svn/**" />
			</fileset>
		</copy>
		
	</target>

	<!--====================================================================-->
	<!-- Build Resource Files                                               -->
	<!--====================================================================-->
	<target name="resourcebuild" depends="dist">
		<exec executable="${shell}">
			<arg line="${shopt} ${ResourceBuild} wt.project.RoleRB true"/>	
		</exec>
		<exec executable="${shell}">
			<arg line="${shopt} ${ResourceBuild} wt.lifecycle.StateRB true"/>	
		</exec>
	</target>

	<!--====================================================================-->
	<!-- Compiling Java Source                                              -->
	<!--====================================================================-->
	<target name="javac" depends="resourcebuild">
		<javac srcdir="${base}/src" destdir="${wthome}/codebase" debug="on" fork="true" memoryinitialsize="512m" memorymaximumsize="1024m">
			<compilerarg line="-encoding UTF-8 " />
			<classpath>
				<pathelement location="${wthome}/srclib/wnc/wnc.jar" />
				<pathelement location="${wthome}/srclib/servlet25/servlet25.jar" />
				<fileset dir="${wthome}/srclib/tool" includes="*.jar" />
				<fileset dir="${wthome}/srclib/adobeFormLibs" includes="*.jar" />
				<fileset dir="${wthome}/codebase/WEB-INF/lib" includes="*.jar" />
				<fileset dir="${wthome}/codebase/lib" includes="*.jar" />
				<fileset dir="${wthome}/lib" includes="*.jar" />
			</classpath>
			<include name="**/*.java" />
			<include name="**/*.xml" />
			<include name="**/*.properties" />
			
		</javac>
	</target>
	
	<target name="deploy" depends="javac">
		<echo message="Windchill Customized deployed successfully" />
	</target>
	
</project>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值