1 Star 0 Fork 471

Yalpuz / jcseg

forked from 狮子的魂 / jcseg 
Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
build.xml 5.97 KB
Copy Edit Web IDE Raw Blame History
狮子的魂 authored 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>

Comment ( 0 )

Sign in for post a comment

Java
1
https://gitee.com/yalpuz/jcseg.git
git@gitee.com:yalpuz/jcseg.git
yalpuz
jcseg
jcseg
master

Search