1 Star 0 Fork 660

Aorey/jcseg

forked from 狮子的魂/jcseg 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.xml 5.97 KB
一键复制 编辑 原始数据 按行查看 历史
狮子的魂 提交于 2019-07-27 12:57 . jcseg 2.4.1 beta version
<?xml version="1.0" encoding="UTF-8"?>
<project name="jcseg" default="usage" basedir=".">
<!--Initialize-->
<target name="init">
<echo message="------------------------------------------------------------"/>
<echo message="----------BUILDING JCSEG PACKAGE----------------------------"/>
<echo message=""/>
<property name="bottom" value="jcseg 2012-2017"/>
<property name="jars" value="${basedir}"/>
<property name="sources" value="${basedir}/src"/>
<property name="classes" value="${basedir}/classes"/>
<property name="version" value="2.4.1"/>
<property name="lib.dir" value="${basedir}/vendors/lib"/>
<property name="api" value="${basedir}/doc"/>
<!--maven modules-->
<property name="mvn.main" value="src/main/java"/>
<property name="mvn.test" value="src/test/java"/>
<property name="core" value="jcseg-core"/>
<property name="analyzer" value="jcseg-analyzer"/>
<property name="elasticsearch" value="jcseg-elasticsearch"/>
<property name="server" value="jcseg-server"/>
<property name="jdk.version" value="1.8"/>
<delete dir="${classes}"/>
<delete dir="${sources}"/>
<delete dir="${api}"/>
<mkdir dir="${sources}"/>
<mkdir dir="${classes}"/>
<mkdir dir="${api}"/>
<!--copy maven sub module sources to the src-->
<echo message="Coping sources of ${core}/${mvn.main} to ${sources}"/>
<copy todir="${sources}">
<fileset dir="${basedir}/${core}/${mvn.main}"/>
</copy>
<echo message="Coping lexicons to ${classes}"/>
<copy todir="${classes}/lexicon">
<fileset dir="${basedir}/vendors/lexicon"/>
</copy>
<echo message="Coping sources of ${analyzer} to ${sources}"/>
<copy todir="${sources}">
<fileset dir="${basedir}/${analyzer}/${mvn.main}"/>
</copy>
<echo message="Coping sources of ${elasticsearch} to ${sources}"/>
<copy todir="${sources}">
<fileset dir="${basedir}/${elasticsearch}/${mvn.main}"/>
</copy>
<echo message="Coping sources of ${server} to ${sources}"/>
<copy todir="${sources}">
<fileset dir="${basedir}/${server}/${mvn.main}"/>
</copy>
<!--specifal resource to copy-->
<copy file="${basedir}/jcseg.properties" todir="${classes}"/>
<copy file="${basedir}/jcseg-server.properties" todir="${classes}"/>
<copy todir="${classes}/res">
<fileset dir="${basedir}/${server}/${mvn.main}/res"/>
</copy>
</target>
<!--Build-->
<target name="build" depends="init">
<echo message="-------------Compiling Application--------------"/>
<echo message="${lib.dir}"/>
<javac srcdir="${sources}" destdir="${classes}" source="${jdk.version}" target="${jdk.version}">
<classpath>
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>
</classpath>
</javac>
</target>
<!--Archive-->
<target name="dist" depends="build">
<jar jarfile="${jars}/jcseg-core-${version}.jar" basedir="${classes}"
includes="org/lionsoul/jcseg/extractor/**/*,org/lionsoul/jcseg/sentence/**/*,org/lionsoul/jcseg/test/**/*,
org/lionsoul/jcseg/tokenizer/**/*,org/lionsoul/jcseg/util/*,jcseg.properties,lexicon/**/*">
<!--manifest information setting-->
<manifest>
<attribute name="Main-Class" value="org.lionsoul.jcseg.test.JcsegTest"/>
<attribute name="Class-Path" value=""/>
</manifest>
</jar>
<jar jarfile="${jars}/jcseg-analyzer-${version}.jar" basedir="${classes}"
includes="org/lionsoul/jcseg/analyzer/**/*"/>
<jar jarfile="${jars}/jcseg-elasticsearch-${version}.jar" basedir="${classes}"
includes="org/lionsoul/jcseg/elasticsearch/**/*,es-plugin.properties"/>
<jar jarfile="${jars}/jcseg-server-${version}.jar" basedir="${classes}"
includes="org/lionsoul/jcseg/server/**/*,org/lionsoul/jcseg/json/**/*,res/**/*,jcseg-server.properties">
<!--manifest information setting-->
<manifest>
<attribute name="Main-Class" value="org.lionsoul.jcseg.server.JcsegServer"/>
<attribute name="Class-Path" value=""/>
</manifest>
</jar>
</target>
<!--Java document-->
<target name="all" depends="dist">
<echo message="------------Making Java Document------------------"/>
<javadoc packagenames="org.*"
sourcepath="${sources}"
destdir="${api}"
bottom="${bottom}"
charset="UTF-8"
author="false">
<classpath>
<pathelement location="${classes}"/>
</classpath>
</javadoc>
<jar jarfile="${jars}/jcseg-${version}-javadoc.jar" basedir="${api}" includes="**/*"></jar>
<!--clean-->
<delete dir="${classes}"/>
<delete dir="${api}"/>
<delete dir="${sources}"/>
</target>
<!--project clean-->
<target name="clean">
<echo message="------------Cleaning project------------------"/>
<!--clean-->
<delete dir="${classes}"/>
<delete dir="${sources}"/>
<delete dir="${api}"/>
<delete>
<fileset dir="${basedir}" includes="*.jar"/>
</delete>
</target>
<target name="usage">
<echo message="*** Jcseg ANT Build Script ***"/>
<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>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/aorey/jcseg.git
git@gitee.com:aorey/jcseg.git
aorey
jcseg
jcseg
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385