⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 build.xml

📁 动态添加图层的ARCGIS代码
💻 XML
字号:
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Eric Bader (ESRI) -->
<project default="about" name="ArcGIS Server Samples">
	<property environment="env"/>
	<property name="devkit.home" value="${env.AGSDEVKITHOME}"/>
	<property name="arcgisant.home" value="${devkit.home}/tools/ant"/>
	<!-- library dependency settings -->
	<property file="common.properties"/>
	<property file="build.properties"/>
	<property name="arcgis.dir" location="${devkit.home}/Templates/Java/WEB-INF/lib"/>
	<property name="templates.dir" location="${devkit.home}/Templates/Java"/>
	<path id="arcgis.classpath">
		<fileset dir="${arcgis.dir}" includes="**/*.jar"/>
		<fileset dir="${arcgisant.home}/lib" includes="**/*.jar"/>
	</path>
	<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="arcgis.classpath"/>
	<taskdef resource="com/esri/arcgis/util/ant/arcgisant_tasks.properties" classpathref="arcgis.classpath"/>
	<!-- ========================================= -->
	<!-- directory mappings -->
	<!-- ========================================= -->
	<property name="root.dir" location="${basedir}"/>
	<property name="src.dir" location="src"/>
	<property name="build.dir" location="build"/>
	<property name="dist.dir" location="dist"/>
	<property name="class.dir" location="${dist.dir}/${sample.name}/WEB-INF/classes"/>
	<path id="sample.classpath">
		<fileset dir="${dist.dir}/${sample.name}/WEB-INF" includes="**/*.*"/>
	</path>
	<target name="build" depends="clean-sample,get-input,check-input" if="valid.input" description="Builds this sample">
		<mkdir dir="${dist.dir}/${sample.name}"/>
		<antcall target="build-webcontrol-sample"/>
		<unjar src="${sample.name}.jar" dest="${dist.dir}/${sample.name}" overwrite="true"/>
		<antcall target="replace-properties">
			<param name="property.file" value="arcgis_webapps.properties"/>
		</antcall>
		<antcall target="compile" />
		<jar destfile="${dist.dir}/${sample.name}.war" basedir="${dist.dir}/${sample.name}"/>
	</target>
	<target name="build-webcontrol-sample">
		<copy todir="${dist.dir}/${sample.name}">
			<fileset dir="${templates.dir}">
				<include name="js/*.*"/>
				<include name="images/*.*"/>
				<exclude name="**/*.htm"/>
			</fileset>
		</copy>
		<copy todir="${dist.dir}/${sample.name}/css">
			<fileset dir="${templates.dir}" casesensitive="false">
				<include name="css/*.*"/>
			</fileset>
			<mapper type="flatten"/>
		</copy>
		<copy todir="${dist.dir}/${sample.name}/WEB-INF">
			<fileset dir="${templates.dir}/WEB-INF">
				<include name="**/*.*"/>
			</fileset>
		</copy>
	</target>
	<target name="get-input">
		<java classpathref="arcgis.classpath" classname="com.esri.arcgis.util.adf.ADFSamples" fork="true"/>
		<property file="_temp_agsant.properties"/>
	</target>
	<target name="compile">
		<javac srcdir="${class.dir}" destdir="${class.dir}">
			<classpath refid="sample.classpath"/>
		</javac>
	</target>
	
	<target name="replace-properties">
		<replace file="${dist.dir}/${sample.name}/WEB-INF/classes/${property.file}">
			<replacefilter token="[gisserver]" value="${gisserver}"/>
			<replacefilter token="[domain]" value="${domain}"/>
			<replacefilter token="[username]" value="${username}"/>
			<replacefilter token="[password]" value="${password}"/>
			<replacefilter token="[boolean]" value="false"/>
		</replace>
		<replace file="${dist.dir}/${sample.name}/mapviewer.jsp">
			<replacefilter token="[Server]" value="${gisserver}"/>
		</replace>
		<delete file="_temp_agsant.properties"/>
	</target>
	<target name="clean-sample">
		<delete dir="${dist.dir}/${sample.name}"/>
		<delete file="${dist.dir}/${sample.name}.war"/>
	</target>
	<target name="about" depends="check-env">
		<echo>		
--------------------------------------------------------------
This script builds and deploys the ArcGIS Server Java samples.
Type "arcgisant build" - for building the sample.	 
--------------------------------------------------------------
	</echo>
	</target>
	<target name="check-env" depends="check-anthome"/>
	<target name="check-anthome">
		<fail unless="env.AGSDEVKITHOME" message="Error::Environment variable AGSDEVKITHOME not available. Set AGSDEVKITHOME to [arcgis_install_dir]/DeveloperKit"/>
	</target>
	<target name="check-input">
		<condition property="valid.input">
			<and>
				<or>
					<isset property="gisserver"/>
				</or>
			</and>
		</condition>
		<fail unless="valid.input" message="ERROR::Action cancelled"/>
	</target>
	<target name="build-jar">
		<delete file="${sample.name}.jar"/>
		<jar destfile="${sample.name}.jar" basedir="." excludes="build.xml,build.properties,*.jar,**/*.scc,**/dist/**"/>
	</target>
</project>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -