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

📄 build.xml

📁 protege汉化
💻 XML
📖 第 1 页 / 共 2 页
字号:
<?xml version="1.0"?><!-- ================================================================ --><!-- Protege-OWL build file for ant (build.xml)                       --><!-- ================================================================ --><project name="Protege-OWL" default="usage" basedir=".">    <property environment="env"/>    <property name="protege.home" location="${env.PROTEGE_HOME}"/>    <property file = "local.properties"/>    <property name = "src" location = "./src"/>    <property name = "lib" location = "./lib"/>    <property name = "build" location = "./build"/>    <property name = "classes" location = "${build}/classes"/>    <property name = "dist" location = "${build}/dist"/>    <property name = "plugins" location = "${build}/plugins"/>    <property name = "gensrc" location = "${build}/gensrc"/>    <property name = "etc" location = "./etc"/>    <property name = "owlplugin" value = "edu.stanford.smi.protegex.owl"/>    <property name = "plugin" location = "${plugins}/${owlplugin}"/>    <property name = "pluginName" value="protege-owl"/>    <property name = "debug" value = "on"/>    <property name = "source" value = "1.5"/>    <property name = "deprecation" value = "off"/>    <property name = "jarfile" location = "${dist}/${pluginName}.jar"/>    <property name = "debug" value = "on"/>    <property name = "source" value = "1.5"/>    <property name = "deprecation" value = "off"/>    <property name = "manchesterParseDir"              location = "${src}/edu/stanford/smi/protegex/owl/model/classparser/manchester"/>    <property name = "dlParseDir"              location = "${src}/edu/stanford/smi/protegex/owl/model/classparser/dl"/>    <property name = "compactParseDir"              location = "${src}/edu/stanford/smi/protegex/owl/model/classparser/compact"/>    <property name = "junit" location = "./junit"/>    <!-- =================================================================== -->    <!-- USAGE -->    <!-- Instructions for using the build file -->    <!-- =================================================================== -->    <target name = "usage">        <echo message = ""/>        <echo message = "protege owl build instructions"/>        <echo message = "-------------------------------------------------------------"/>        <echo message = ""/>        <echo message = " available targets are:"/>        <echo message = ""/>        <echo message = "   usage      --> provides help on using the build tool (default)"/>        <echo message = "   clean      --> cleans up all build related files and dirs"/>        <echo message = "   compile    --> compiles the source code"/>        <echo message = "   plugin.dir --> copies files into the Protege plugin directory"/>        <echo message = "   plugin.zip --> creates the protege-owl.zip file, "/>        <echo message = "                  containing the plugin dir"/>        <echo message = "   codeGeneration --> creates the generated code used by the junits"/>        <echo message = "   junit --> runs the junits"/>        <echo message = ""/>        <echo message = "-------------------------------------------------------------"/>        <echo message = ""/>    </target>    <!--        #  ********** Finding Protege Libraries. *************       #        #  We are using an approach that allows developers to decide       #  whether to hand copy the needed jars into the lib directory or       #  to point them to a protege installation.      -->    <target name="checkProtegeHome">        <condition property="protege.home.set">            <available file="${protege.home}/protege.jar" type="file"/>        </condition>    </target>    <target name="useProtegeHome" depends="checkProtegeHome"             if="protege.home.set">        <echo message="Using Protege Home = ${protege.home} to find protege jars"/>        <property name="protege.lib" location="${protege.home}/protege.jar"/>        <property name="looks.lib"   location="${protege.home}/looks-2.1.3.jar"/>    </target>    <target name="useLibDir" depends="checkProtegeHome"             unless="protege.home.set">        <echo message="Using lib dir to find protege jars"/>        <property name="protege.lib" location="${lib}/protege.jar"/>        <property name="looks.lib" location="${lib}/looks-2.1.3.jar"/>    </target>    <target name = "checkProtegeLibs" depends="useProtegeHome, useLibDir">        <condition property="libs.found">            <and>                <available file="${protege.lib}" type = "file"/>                <available file="${looks.lib}" type = "file"/>            </and>        </condition>        <path id="classpath.compile">            <pathelement location = "${protege.lib}"/>            <fileset dir="${lib}">                <include name="**/*.jar"/>            </fileset>        </path>    </target>    <target name="checkProtegeLibsAndReport" depends="checkProtegeLibs"            unless="libs.found">        <echo message="Missing protege libraries.  You can either "/>        <echo message="set the PROTEGE_HOME environment variable to a"/>        <echo message="protege installation directory where the"/>        <echo message="appropriate plugins have been installed or copy the"/>        <echo message="needed jars into the lib directory"/>        <echo message="Use the -v option to find the missing jar"/>        <fail message="build aborted."/>    </target>    <!--      #  ********** Finding Protege Libraries Done. *************     -->    <!-- ================================================================ -->    <!-- Creates the timestamp                                            -->    <!-- ================================================================ -->    <target name="init.time" depends="checkProtegeLibsAndReport">        <tstamp>            <format property="build.time" pattern="MM/dd/yyyy hh:mm aa"/>        </tstamp>    </target>    <target name="init" depends="init.time">        <mkdir dir="${build}"/>        <mkdir dir="${classes}"/>        <mkdir dir="${dist}"/>        <mkdir dir="${plugins}"/>    </target>    <!-- ================================================================ -->    <!-- Build the classpath                                              -->    <!--                                                                  -->    <!-- ================================================================ -->    <!-- ================================================================ -->    <!-- Clean up build directories -->    <!-- ================================================================ -->    <target name="clean"            description="clean up all build related files and dirs">        <delete dir="${build}"/>    </target>    <target name="javacc-compact">        <delete file="${compactParseDir}/CompactParser.java"/>        <delete file="${compactParseDir}/CompactParserConstants.java"/>        <delete file="${compactParseDir}/CompactParserTokenManager.java"/>        <delete file="${compactParseDir}/JavaCharStream.java"/>        <delete file="${compactParseDir}/ParseException.java"/>        <delete file="${compactParseDir}/Token.java"/>        <delete file="${compactParseDir}/TokenMgrError.java"/>        <!-- Run JavaCC on Parser.jj to regenerate files that were deleted in above step. -->        <javacc javacchome = "${javacc.home}/bin/lib"                target = "${compactParseDir}/CompactParser.jj"               outputdirectory = "${compactParseDir}"/>    </target>    <target name="javacc-dl">        <delete file="${dlParseDir}/DLSyntaxParser.java"/>        <delete file="${dlParseDir}/DLSyntaxParserConstants.java"/>        <delete file="${dlParseDir}/DLSyntaxParserTokenManager.java"/>        <delete file="${dlParseDir}/JavaCharStream.java"/>        <delete file="${dlParseDir}/ParseException.java"/>        <delete file="${dlParseDir}/Token.java"/>        <delete file="${dlParseDir}/TokenMgrError.java"/>        <!-- Run JavaCC on Parser.jj to regenerate files that were deleted in above step. -->        <javacc javacchome = "${javacc.home}/bin/lib"                target = "${dlParseDir}/DLSyntaxParser.jj"               outputdirectory = "${dlParseDir}"/>    </target>    <target name="javacc-manchester">        <delete file="${manchesterParseDir}/JavaCharStream.java"/>        <delete file="${manchesterParseDir}/ManchesterOWLParser.java"/>        <delete file="${manchesterParseDir}/ManchesterOWLParserConstants.java"/>        <delete file="${manchesterParseDir}/ManchesterOWLParserTokenManager.java"/>        <delete file="${manchesterParseDir}/ParseException.java"/>        <delete file="${manchesterParseDir}/Token.java"/>        <delete file="${manchesterParseDir}/TokenMgrError.java"/>        <!-- Run JavaCC on Parser.jj to regenerate files that were deleted in above step. -->        <javacc javacchome = "${javacc.home}/bin/lib"                target = "${manchesterParseDir}/ManchesterOWLParser.jj"               outputdirectory = "${manchesterParseDir}"/>    </target>    <!-- =================================================================== -->    <target name = "javacc"             depends = "javacc-manchester,javacc-dl,javacc-compact">    </target>    <!-- ================================================================ -->    <!-- Compile the source code                                          -->    <!-- ================================================================ -->    <target name="compile" depends="init,checkProtegeLibsAndReport"             description="compile the Java files" >        <javac srcdir="${src}" destdir="${classes}"                           deprecation = "${deprecation}"               debug = "${debug}"           source = "${source}"               includeAntRuntime="false">            <classpath refid="classpath.compile"/>        </javac>        <copy todir="${classes}">            <fileset dir="${src}">                <include name="**/*"/>                <exclude name="**/*.java"/>                <exclude name="**/MANIFEST.MF"/>                <exclude name="**/manifest.mf"/>            </fileset>        </copy>    </target>    <!-- ================================================================ -->    <!-- create the protege-owl.jar file                                  -->    <!-- ================================================================ -->    <target name="jar" depends="compile" description="Create the protege-owl.jar file">        <copy todir="${build}" file="${src}/META-INF/MANIFEST.MF" overwrite="true"/>        <manifest file="${build}/MANIFEST.MF"                   mode = "update">            <attribute name="Built-By" value = "${user.name}"/>            <attribute name="Build-Date" value = "${build.time}"/>        </manifest>        <jar jarfile="${jarfile}"             manifest="${build}/MANIFEST.MF">            <fileset dir="${classes}"/>        </jar>    </target>    <target name = "update" depends = "jar">        <fail message = "The Protege Home variable must be set for an install">

⌨️ 快捷键说明

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