<?xml version="1.0" encoding="UTF-8"?>
<project default="build" name="user">
<description>
test flex access java data project
</description>
<!-- 1.定义变量 -->
<property name="author" value="sanny" />
<property name="java_src_dir" value="src" />
<property name="class_dest_dir" value="class" />
<property name="jar_dest_dir" value="lib" />
<!-- 执行javac命令时,需要文件路径参数 -->
<path id="classpath">
<pathelement location="${java_src_dir}" />
<pathelement location="${class_dest_dir}" />
<fileset dir="${jar_dest_dir}" includes="**/*.jar" />
</path>
<!-- 2.创建需要的文件夹 -->
<target name="init" description="test initialization">
<mkdir dir="${class_dest_dir}" />
</target>
<!-- 3.编译*.java为*.class -->
<target name="compile" depends="init">
<javac srcdir="${java_src_dir}" destdir="${class_dest_dir}" deprecation="on" debug="on">
<classpath refid="classpath" />
</javac>
</target>
<!-- 4.将*.class打包为*.jar文件 -->
<target name="build" depends="compile">
<jar destfile="${jar_dest_dir}/flexdata.jar" basedir="${class_dest_dir}">
<manifest>
<attribute name="Build-By" value="${author}" />
</manifest>
</jar>
<ant target="clean_classes" antfile="build.xml" />
</target>
<!-- 5.将java源打包为*.jar -->
<target name="buildSrcJar">
<jar destfile="flexdata-src.jar" basedir="${java_src_dir}">
<manifest>
<attribute name="Build-By" value="${author}" />
</manifest>
</jar>
</target>
<!-- 6.清除java源*.jar -->
<target name="cleanSrcJar">
<delete file="flexdata-src.jar" />
</target>
<!-- 7.将*.java打包为.zip文件 -->
<target name="buildZip">
<zip destfile="flexdata.zip" basedir="${java_src_dir}" />
</target>
<!-- 8.清除 *.zip文件 -->
<target name="cleanZip">
<delete file="flexdata.zip" />
</target>
<!-- 9.清除*.class文件 -->
<target name="clean_classes">
<delete dir="${class_dest_dir}" />
</target>
<!-- 10.清除*.jar 文件 -->
<target name="clean_jar">
<delete file="${jar_dest_dir}/flexdata.jar" />
</target>
<!-- 11.重新构造jar文件 -->
<target name="rebuild" depends="clean_classes,clean_jar,build" />
<!-- 12.重新构造jar文件(另一写法) -->
<target name="rebuild2">
<ant target="clean_classes" antfile="build.xml" />
<ant target="clean_jar" antfile="build.xml" />
<ant target="build" antfile="build.xml" />
</target>
<target name="compile" depends="init">
<javac srcdir="src" destdir="webapp/WEB-INF/classes" />
<jar destfile="build/resMS.war" basedir="webapp">
<manifest>
<attribute name="Build-By" value="${user.name}" />
</manifest>
</jar>
</target>
</project>
分享到:
相关推荐
#antdemo ##Antroduction antdemo - 蚂蚁演示##执照 Copyright (C) 2013 Snowdream Mobile <yanghui1986527>Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except ...
使用TouchGFX开发的Demo,Demo中包含控件有切换图片,下拉菜单,简单的动画。以及页面切换。
java多线程的应用在项目中有非常大的需求,这里举例测试了Thread和Runnable方式实现多线程的方法,测试成功有效
该代码演示了在VC中如何创建和使用动态链接库,附有较为详细的说明内容,适合初学者参考.
Use the links below to download a source distribution of Ant from one of our mirrors. It is good practice to verify the integrity of the distribution files, especially if you are using one of our ...
这个是使用ShadeButtonST、WinXPButtonST、CButtonST的例子,CButtonST这个类的版本大概是3.5的
hardware design of the PN512
如何使用预定义光标,很不错的demo.希望对大家有所帮助
Please use the documentation appropriate to your current version. Also, if you are using a version older than the most recent release, we recommend an upgrade to fix bugs as well as provide new ...
ant-design-vue3.x的form表单爬坑
Use java connect the openstack ,A sample Java project Demo
java ant use 介绍了java中ant的使用方法与技巧,
vulkan demo,draw trangle code,use vs2015 build
Android GPS定位的实现,简单的一个demo,使用的是Android的系统的定位
content_provider_demo, provide data to other app, use cursorLoader to update view
官方的DEMO,其中有几个因为动态库原因报错,未解决。 Sample01: How to create a simple 2D image and show it using OpenCV Window. Sample02: How to load and display images. Sample03: How to create a gray-...
Onlyoffice服务调用Demo-Java版本, ONLYOFFICE Document Server提供文档协作的服务功能,支持Word,Excel和PowerPoint的协作。但是这里告诉我们,需要进行文档管理和存储的二次开发。 Please note, that ONLY...
gtest单元测试的简单demo,内包含测试阶乘和测试素数两个测试用例,直接运行可以查看结果,关于其配置的相关信息可以参考文章:https://blog.csdn.net/didi_ya/article/details/123212877
The Android ANT and Android ANT SDKs enable developers to create unique applications that use ANT wireless communication technology to communicate between a wide array of devices over various network ...
netuse命令详解 netuse命令的详细使用说明