0 Star 0 Fork 26

倚望离寻/jteach

forked from 狮子的魂/jteach 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.xml 3.18 KB
一键复制 编辑 原始数据 按行查看 历史
狮子的魂 提交于 2021-12-10 18:45 . all task tested
<?xml version="1.0" encoding="UTF-8"?>
<project name="jteach" default="usage" basedir=".">
<property name="bottom" value="jteach 2010-2021"/>
<property name="jars" value="${basedir}"/>
<property name="sources" value="${basedir}/src"/>
<property name="classes" value="${basedir}/classes"/>
<property name="lib.dir" value="lib"/>
<property name="version" value="1.3.8"/>
<property name="api" value="${basedir}/doc"/>
<property name="resource" value="res"/>
<delete dir="${classes}"/>
<mkdir dir="${classes}"/>
<mkdir dir="${api}"/>
<mkdir dir="${classes}/${resource}"/>
<!-- class path define -->
<path id="classpath">
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
</path>
<pathconvert property="quote.classpath" pathsep=" ">
<mapper>
<chainedmapper>
<flattenmapper />
<globmapper from="*" to="lib/*" />
</chainedmapper>
</mapper>
<path refid="classpath" />
</pathconvert>
<!--build-->
<target name="build" description="Compile main source java files">
<javac destdir="${classes}" includes="**/*" encoding="utf-8" includeantruntime="false">
<src path="${sources}"/>
<classpath refid="classpath"/>
</javac>
<!--copy the resource image-->
<copy todir="${classes}/${resource}">
<fileset dir="${sources}/${resource}"/>
</copy>
</target>
<!--Archive-->
<target name="dist" depends="build" description="Compress the java class files to jar">
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<delete>
<fileset dir="${jars}" includes="*.jar"/>
</delete>
<jar jarfile="${jars}/jteach-server-${version}.jar" basedir="${classes}">
<include name="**/*"/>
<exclude name="org/lionsoul/jteach/client/**/*"/>
<manifest>
<attribute name="Built-By" value="Lion" />
<attribute name="Implementation-Version" value="${version}" />
<attribute name="Built-Date" value="${TODAY}" />
<attribute name="Main-Class" value="org.lionsoul.jteach.server.JServer"/>
<attribute name="Class-Path" value="${quote.classpath}"/>
</manifest>
</jar>
<jar jarfile="${jars}/jteach-client-${version}.jar" basedir="${classes}">
<include name="**/*"/>
<exclude name="org/lionsoul/jteach/server/**/*"/>
<manifest>
<attribute name="Built-By" value="Lion" />
<attribute name="Implementation-Version" value="${version}" />
<attribute name="Built-Date" value="${TODAY}" />
<attribute name="Main-Class" value="org.lionsoul.jteach.client.JClient"/>
<attribute name="Class-Path" value=""/>
</manifest>
</jar>
</target>
<!--Java Document-->
<target name="all" depends="dist">
<javadoc packagenames="org.lionsoul.jteach.*" sourcepath="${sources}"
destdir="${api}" bottom="${bottom}" charset="UTF-8" author="true">
<classpath>
<pathelement location="${classes}"/>
</classpath>
</javadoc>
</target>
<target name="usage">
<echo message="Usage: "/>
<echo message=" ant [target]"/>
<echo message=""/>
<echo message=" target : "/>
<echo message=" build : Build Application"/>
<echo message=" dist : Build Application + Archive (JAR)"/>
<echo message=" all : Build Application + Archive + JavaDoc"/>
</target>
</project>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lqai/jteach.git
git@gitee.com:lqai/jteach.git
lqai
jteach
jteach
master

搜索帮助