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

📄 build.xml

📁 THIS SOURCE CODE IS PROVIDED AS IS , WITH NO WARRANTIES WHATSOEVER, EXPRESS OR IMPLIED, INCLUDING A
💻 XML
字号:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 Nokia Corporation.

 THIS SOURCE CODE IS PROVIDED 'AS IS', WITH NO WARRANTIES WHATSOEVER,
 EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY, FITNESS
 FOR ANY PARTICULAR PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE
 OR TRADE PRACTICE, RELATING TO THE SOURCE CODE OR ANY WARRANTY OTHERWISE
 ARISING OUT OF ANY PROPOSAL, SPECIFICATION, OR SAMPLE AND WITH NO
 OBLIGATION OF NOKIA TO PROVIDE THE LICENSEE WITH ANY MAINTENANCE OR
 SUPPORT. FURTHERMORE, NOKIA MAKES NO WARRANTY THAT EXERCISE OF THE
 RIGHTS GRANTED HEREUNDER DOES NOT INFRINGE OR MAY NOT CAUSE INFRINGEMENT
 OF ANY PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OWNED OR CONTROLLED
 BY THIRD PARTIES

 Furthermore, information provided in this source code is preliminary,
 and may be changed substantially prior to final release. Nokia Corporation
 retains the right to make changes to this source code at
 any time, without notice. This source code is provided for informational
 purposes only.

 Nokia and Nokia Connecting People are registered trademarks of Nokia
 Corporation.
 Java and all Java-based marks are trademarks or registered trademarks of
 Sun Microsystems, Inc.
 Other product and company names mentioned herein may be trademarks or
 trade names of their respective owners.

 A non-exclusive, non-transferable, worldwide, limited license is hereby
 granted to the Licensee to download, print, reproduce and modify the
 source code. The licensee has the right to market, sell, distribute and
 make available the source code in original or modified form only when
 incorporated into the programs developed by the Licensee. No other
 license, express or implied, by estoppel or otherwise, to any other
 intellectual property rights is granted herein. -->

<!--
  This ant build file is meant to be used with Ant version 1.6.4 or higher
  It also uses the MIDP ant oriented tasks found in the Nokia Prototype
  SDK 3.0.
  Check the SDK's user manual as how to configure Ant to use the provided
  tasks
-->

<project name="MMSMIDlet" default="build" basedir=".">
  <description>
      Build file for the MMDMIDlet project
  </description>

  <!-- set your custom properties in build.properties -->
  <property file="build.properties"/>
  <property file="../build.properties"/>
  <property file="../../build.properties"/>
  <property file="${user.home}/build.properties"/>

  <!-- setup NDS ant tasks -->
  <property name="ndsj2me.home" value="C:\\Nokia\\Tools\\Nokia_developers_Suite_for_J2ME_3_0"/>
  <path id="ndsj2me.classpath">
	<fileset file="${ndsj2me.home}/bin/NDS_MIDPToolSet.jar" />
	<fileset dir="${ndsj2me.home}/bin/modules" includes="*.jar" />
	<fileset dir="${ndsj2me.home}/bin/lib" includes="*.jar" />
  </path>
  <taskdef resource="ndsj2me.properties" classpathref="ndsj2me.classpath"/>
  	
  <!--
    The emulator should support the WMA 2.0 API
    For example the Noka Prototype SDK 3.0
  -->
  <property name="ndsj2me.emulator" value="Nokia Prototype SDK 3.0 for J2ME(TM)"/>
  <property name="ndsj2me.device" value="Prototype_3_0_S60_MIDP_Emulator"/>
	
  <!-- set global properties for this build -->
  <property name="source.dir" location="src"/>
  <property name="build.dir" location="bin"/>
  <property name="name.jar" value="${ant.project.name}.jar"/>
  <property name="name.jad" value="${ant.project.name}.jad"/>

  <!--
    Prints out configuration information
  -->
  <target name="info" description="Prints some basic build info">
    <echo>Build file for the ${ant.project.name} MIDlet</echo>
    <echo>Using NDS as ${ndsj2me.home}</echo>
    <echo>Using Emulator ${ndsj2me.emulator}</echo>
    <echo>Using Device ${ndsj2me.device}</echo>
  </target>

  <!--
    Init tasks set ups the basic directory structure
  -->
  <target name="init" depends="info" description="Creates basic directories">
    <!-- Create the time stamp -->
    <tstamp/>
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${build.dir}"/>
  </target>

  <!--
    Compile tasks builds the source code
  -->
  <target name="compile" depends="init" description="Compiles the source">
    <!-- Compile the java code from ${src} into ${build} -->
	<ndsj2mejavac srcdir="${source.dir}" debug="true" destdir="${build.dir}"/>
  </target>

  <!--
    Build task build the jar file
  -->
  <target name="build" depends="compile" description="Build the MIDlet jar file">
    <!-- package the classes and update the jad file-->
  	<ndsj2mepackage classpath="${build.dir}"
  		name="MMSMIDlet"
  		version="1.0.0"
  		vendor="Forum Nokia"
  		jad="${name.jad}"
  		jar="${name.jar}">
  		<userattribute key="Application-ID" value="mmsdemo"/>
  	</ndsj2mepackage>
  </target>
	
  <!--
    Runs the MIDLet in the emulator
  -->
  <target name="run" depends="build" description="Runs the MIDlet">
	<ndsj2merun application="${name.jad}"/>
  </target>

  <!--
    Cleans directories
  -->
  <target name="clean" description="Clean up">
    <!-- Delete the ${classes} directory tree -->
    <delete dir="${build.dir}"/>
  </target>

  <!--
    Do a clean build
  -->
  <target name="cleanbuild" depends="clean, build" description="Cleans and builds"/>

</project>

⌨️ 快捷键说明

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