
| View previous topic :: View next topic |
| Author |
Message |
migxit
Joined: 03 Jul 2009 Posts: 2
|
Posted: Fri Jul 03, 2009 2:17 pm Post subject: build-impl.xml:157: Problem: failed to create task or type nb-prep (PLEASE HELP!!!!) |
|
|
Hi i am trying to compile a jabber application called "Bombus" i installed the following:
Java Runtime "Latest"
Netbeans 6.7 "Latest"
Wireless Toolkit 2.5.2
and ME
I had to set the signed to on
and when i compile i get this error:
Target "build" does not exist in the project "".
BUILD FAILED (total time: 0 seconds)
but when i click RUN i get this error:
| Code: | pre-init:
pre-load-properties:
exists.config.active:
exists.netbeans.user:
exists.user.properties.file:
load-properties:
:bootclasspath/legacyfs.jar:bootclasspath/sielightapi.jar
Modified bootclasspath=C:\WTK2.5.2_01/lib/jsr75.jar:C:\WTK2.5.2_01/lib/mmapi.jar:C:\WTK2.5.2_01/lib/wma20.jar:C:\WTK2.5.2_01/lib/cldcapi10.jar:C:\WTK2.5.2_01/lib/midpapi20.jar:bootclasspath/legacyfs.jar:bootclasspath/sielightapi.jar
exists.platform.active:
exists.platform.configuration:
exists.platform.profile:
init:
Could not load definitions from resource org/netbeans/modules/kjava/antext/defs.properties. It could not be found.
post-init:
Copying 1 file to C:\Users\Paul\Documents\NetBeansProjects\trunk\resources
pre-preprocess:
deps-jar:
conditional-clean:
preprocess:
C:\Users\Paul\Documents\NetBeansProjects\trunk\nbproject\build-impl.xml:157: Problem: failed to create task or type nb-prep
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
BUILD FAILED (total time: 0 seconds)
|
This is my build.xml and my build-impl.xml:
Build.xml:
| Code: | <?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<project name="" default="jar" basedir=".">
<description>Builds, tests, and runs the project .</description>
<import file="nbproject/build-impl.xml"/>
<!-- release tasks -->
<target name="for-release-configs">
<antcall inheritrefs="false" inheritall="false" target="${target.to.call}">
<param name="config.active" value="Release"/>
</antcall>
<antcall inheritrefs="false" inheritall="false" target="${target.to.call}">
<param name="config.active" value="ReleaseJZLIB"/>
</antcall>
</target>
<target name="rebuild-release">
<antcall target="for-release-configs">
<param value="rebuild" name="target.to.call"/>
</antcall>
</target>
<target name="rebuild-midp2-release">
<antcall inheritrefs="false" inheritall="false" target="rebuild">
<param name="config.active" value="Release"/>
</antcall>
</target>
<target name="rebuild-jzlib-release">
<antcall inheritrefs="false" inheritall="false" target="rebuild">
<param name="config.active" value="ReleaseJZLIB"/>
</antcall>
</target>
<target name="deploy-release">
<antcall target="for-release-configs">
<param value="deploy" name="target.to.call"/>
</antcall>
<!-- version patch in arch packer
<copy file="pack.cmd.txt" tofile="pack.cmd" overwrite="true" />
<replace
file="pack.cmd"
propertyFile="resources/.version">
<replacefilter
token="$BOMBUSREV$"
property="bombus.revision"/>
</replace> -->
<!-- version patch in server files -->
<copy file="private/config.php.txt" tofile="ftp/config.php" overwrite="true" />
<property file="resources/.version" />
<replace
file="ftp/config.php"
token="$BOMBUSVERSION$"
value="${bombus.version}"/>
<delete>
<fileset dir="ftp" includes="bombus*.*" />
</delete>
<tstamp>
<format property="bombus.tstamp" pattern="MM_dd"/>
</tstamp>
<property name="destfile" location="ftp/bombus_${bombus.revision}(all)${bombus.tstamp}" />
<zip destfile="${destfile}.zip">
<zipfileset dir="ftp/midp2.0" prefix="midp2.0"/>
<zipfileset dir="ftp/midp2.0z" prefix="midp2.0-ZLIB"/>
<zipfileset file="changelog.txt"/>
<zipfileset file="copying.txt"/>
</zip>
<tar destfile="${destfile}.tar">
<tarfileset dir="ftp/midp2.0" prefix="midp2.0"/>
<tarfileset dir="ftp/midp2.0z" prefix="midp2.0-ZLIB"/>
<tarfileset file="changelog.txt"/>
<tarfileset file="copying.txt"/>
</tar>
<bzip2 src="${destfile}.tar" destfile="${destfile}.tar.bz2"/>
<delete>
<fileset dir="ftp" includes="bombus*.tar" />
</delete>
</target>
<!-- prepare version patch -->
<target name="post-init">
<exec executable="svnversion" output="resources/.svnrev" />
<loadfile srcFile="resources/.svnrev" property="bombus.svnrev"/>
<copy file="resources/version.properties" tofile="resources/.version" overwrite="true" />
<replace
file="resources/.version"
token="$WCREV$"
value="${bombus.svnrev}"/>
</target>
<!-- old version patcher
<target name="post-init-tsvn">
<property name="versionPatcher" location="C:/Program Files/TortoiseSVN/bin/SubWCRev.exe" />
<property name="file_in" location="resources\version.properties "/>
<property name="file_out" location="resources\.version "/>
<exec executable="${versionPatcher}" >
<arg value="."/>
<arg value="${file_in}"/>
<arg value="${file_out}"/>
</exec>
</target>
-->
<!-- version patch in Sources -->
<target name="post-preprocess">
<property file="resources/.version" />
<replace
file="${preprocessed.dir}\Info\Version.java"
token="$BOMBUSVERSION$"
value="${bombus.version}"/>
</target>
<!-- version patch in manifest -->
<target name="pre-jar" depends="create-jad">
<property file="resources/.version" />
<replace file="${build.dir}/manifest.mf"
token="$ BOMBUSVERSION $"
value="${bombus.version}"/>
<replace file="${build.dir}/manifest.mf"
token="$MIDLETVERSION$"
value="${bombus.midlet}"/>
</target>
<target name="post-jar">
<!-- version patch in jad -->
<property file="resources/.version" />
<replace file="${dist.dir}/Bombus.jad"
token="$BOMBUSVERSION$"
value="${bombus.version}"/>
<replace file="${dist.dir}/Bombus.jad"
token="$MIDLETVERSION$"
value="${bombus.midlet}"/>
</target>
<!-- overrided to change bootclasspath -->
<target depends="pre-load-properties,exists.config.active,exists.netbeans.user,exists.user.properties.file" name="load-properties">
<loadproperties srcfile="nbproject/project.properties">
<filterchain>
<containsregex replace="\1" pattern="^configs\.${config.active}\.(.*)"/>
<concatfilter prepend="nbproject/project.properties"/>
<containsregex pattern="^platform.active=|^deployment.method=|^bombus.bootclasspath="/>
</filterchain>
</loadproperties>
<property name="bombus.bootclasspath" value=""/>
<echo message="${bombus.bootclasspath}"/>
<loadproperties srcfile="${user.properties.file}">
<filterchain>
<replaceregex replace="platform." pattern="^platforms\.${platform.active}\."/>
<replaceregex replace="deployment.scriptfile=" pattern="^deployment\.${deployment.method}\.scriptfile="/>
</filterchain>
</loadproperties>
<!-- patching bootclasspath -->
<loadproperties srcfile="nbproject/project.properties">
<filterchain>
<containsregex replace="platform.bootclasspath=\1${bombus.bootclasspath}" pattern="^configs\.${config.active}\.platform\.bootclasspath=(.*)"/>
</filterchain>
</loadproperties>
<loadproperties srcfile="nbproject/project.properties">
<filterchain>
<containsregex replace="platform.bootclasspath=\1${bombus.bootclasspath}" pattern="^platform\.bootclasspath=(.*)"/>
</filterchain>
</loadproperties>
<loadproperties srcfile="nbproject/project.properties">
<filterchain>
<containsregex replace="\1" pattern="^configs\.${config.active}\.(.*)"/>
<concatfilter prepend="nbproject/project.properties"/>
</filterchain>
</loadproperties>
<echo message="Modified bootclasspath=${platform.bootclasspath}" />
</target>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
pre-init: called before initialization of project properties
post-init: called after initialization of project properties
pre-preprocess: called before text preprocessing of sources
post-preprocess: called after text preprocessing of sources
pre-compile: called before source compilation
post-compile: called after source compilation
pre-obfuscate: called before obfuscation
post-obfuscate: called after obfuscation
pre-preverify: called before preverification
post-preverify: called after preverification
pre-jar: called before jar building
post-jar: called after jar building
pre-clean: called before cleaning build products
post-clean: called after cleaning build products
Example of pluging a my-special-task after the compilation could look like
<target name="post-compile">
<my-special-task>
<fileset dir="${build.classes.dir}"/>
</my-special-task>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Other way how to customize the build is by overriding existing main targets.
The target of interest are:
preprocess: preprocessing
extract-libs: extraction of libraries and resources
compile: compilation
create-jad: construction of jad and jar manifest source
obfuscate: obfuscation
preverify: preverification
jar: jar archive building
run: execution
debug: execution in debug mode
javadoc: javadoc generation
Example of overriding the target for project execution could look like
<target name="run" depends="init,jar">
<my-special-exec jadfile="${dist.dir}/${dist.jad}"/>
</target>
Be careful about correct dependencies when overriding original target.
Again, for list of available properties which you can use check the target
you are overriding in nbproject/build-impl.xml file.
A special target for-all-configs can be used to run some specific targets for
all project configurations in a sequence. File nbproject/build-impl.xml
already contains some "for-all" targets:
jar-all
javadoc-all
clean-all
Example of definition of target iterating over all project configurations:
<target name="jar-all">
<property name="target.to.call" value="jar"/>
<antcall target="for-all-configs"/>
</target>
-->
</project>
|
build-impl.xml:
| Code: | <?xml version="1.0" encoding="UTF-8"?>
<!-- *** GENERATED FROM project.xml - DO NOT EDIT *** -->
<project xmlns:projdeps2="http://www.netbeans.org/ns/ant-project-references/2" basedir=".." default="jar" name="-impl">
<target name="pre-init"/>
<target depends="pre-init" name="pre-load-properties">
<property file="nbproject/private/private.properties"/>
<property value="0.0.1" name="deployment.number"/>
<property value="000002" name="deployment.counter"/>
<property location="${netbeans.user}/build.properties" name="user.properties.file"/>
<available file="${user.properties.file}" property="user.properties.file.exists"/>
</target>
<target unless="config.active" depends="pre-load-properties" name="exists.config.active">
<echo message="Active configuration (config.active property) is not set - using default." level="warning"/>
<property name="config.active" value=""/>
</target>
<target unless="netbeans.user" depends="pre-load-properties" name="exists.netbeans.user">
<echo message="NetBeans IDE user directory (netbeans.user property) is not set. By specifying this property many properties required by the project will be automatically evaluated (e.g.: ant-ext library home, ...). You could also open this project in the NetBeans IDE - in this case this property would be set automatically." level="warning"/>
</target>
<target unless="user.properties.file.exists" depends="pre-load-properties" name="exists.user.properties.file">
<echo message="User properties file (user.properties.file) property is not set. By specifying this property many properties required by the project will be automatically evaluated (e.g.: libraries, platforms, ...)." level="warning"/>
</target>
<target depends="pre-load-properties,exists.config.active,exists.netbeans.user,exists.user.properties.file" name="load-properties">
<loadproperties srcfile="nbproject/project.properties">
<filterchain>
<containsregex replace="\1" pattern="^configs\.${config.active}\.(.*)"/>
<concatfilter prepend="nbproject/project.properties"/>
<containsregex pattern="^platform.active=|^deployment.method="/>
</filterchain>
</loadproperties>
<loadproperties srcfile="${user.properties.file}">
<filterchain>
<replaceregex replace="platform." pattern="^platforms\.${platform.active}\."/>
<replaceregex replace="deployment.scriptfile=" pattern="^deployment\.${deployment.method}\.scriptfile="/>
</filterchain>
</loadproperties>
<loadproperties srcfile="nbproject/project.properties">
<filterchain>
<containsregex replace="\1" pattern="^configs\.${config.active}\.(.*)"/>
<concatfilter prepend="nbproject/project.properties"/>
</filterchain>
</loadproperties>
</target>
<target unless="platform.active" depends="load-properties" name="exists.platform.active">
<echo message="Active platform (platform.active property) in not set. If you set this and user.properties.file property, many properties required by the project will be automatically evaluated (e.g.: platform home, platform classpath, ...)." level="warning"/>
</target>
<target depends="load-properties" unless="platform.configuration" name="exists.platform.configuration">
<echo message="Platform configuration (platform.configuration) is not set. Using default (CLDC-1.0) configuration." level="warning"/>
<property value="CLDC-1.0" name="platform.configuration"/>
</target>
<target depends="load-properties" unless="platform.profile" name="exists.platform.profile">
<echo message="Platform profile (platform.profile) is not set. Using default (MIDP-1.0) profile." level="warning"/>
<property value="MIDP-1.0" name="platform.profile"/>
</target>
<target depends="pre-init,load-properties,exists.platform.active,exists.platform.configuration,exists.platform.profile" name="init">
<fail unless="libs.j2me_ant_ext.classpath">Classpath to J2ME Ant extension library (libs.j2me_ant_ext.classpath property) is not set. For example: location of mobility/modules/org-netbeans-modules-kjava-antext.jar file in the IDE installation directory.</fail>
<fail unless="platform.home">Platform home (platform.home property) is not set. Value of this property should be ${platform.active.description} emulator home directory location.</fail>
<fail unless="platform.bootclasspath">Platform boot classpath (platform.bootclasspath property) is not set. Value of this property should be ${platform.active.description} emulator boot classpath containing all J2ME classes provided by emulator.</fail>
<fail unless="src.dir">Must set src.dir</fail>
<fail unless="build.dir">Must set build.dir</fail>
<fail unless="build.classes.dir">Must set build.classes.dir</fail>
<fail unless="preprocessed.dir">Must set preprocessed.dir</fail>
<fail unless="preverify.classes.dir">Must set preverify.classes.dir</fail>
<fail unless="obfuscated.classes.dir">Must set obfuscated.classes.dir</fail>
<fail unless="dist.dir">Must set dist.dir</fail>
<fail unless="dist.jar">Must set dist.jar</fail>
<fail unless="dist.jad">Must set dist.jad</fail>
<fail unless="obfuscator.srcjar">Must set obfuscator.srcjar</fail>
<fail unless="obfuscator.destjar">Must set obfuscator.destjar</fail>
<fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
<property value="" name="abilities"/>
<property value="" name="obfuscator.classpath"/>
<property value="" name="kjava.configuration"/>
<property value="UEI-1.0" name="platform.type"/>
<property value="" name="platform.device"/>
<property value="0" name="obfuscation.level"/>
<property value="false" name="sign.enabled"/>
<property value="file://" name="dist.jad.url"/>
<property value="1.3" name="javac.source"/>
<property value="1.1" name="javac.target"/>
<property value="${file.encoding}" name="javac.encoding"/>
<condition property="no.deps">
<istrue value="${no.dependencies}"/>
</condition>
<condition property="no.javadoc.preview">
<isfalse value="${javadoc.preview}"/>
</condition>
<condition value="${filter.excludes},**/*Test.java,**/test,**/test/**" property="filter.excludes.evaluated">
<istrue value="${filter.exclude.tests}"/>
</condition>
<property value="${filter.excludes}" name="filter.excludes.evaluated"/>
<condition value="" property="evaluated.run.security.domain">
<isfalse value="${run.use.security.domain}"/>
</condition>
<condition value="" property="deployment.do.override.jarurl">
<istrue value="${deployment.override.jarurl}"/>
</condition>
<property value="${run.security.domain}" name="evaluated.run.security.domain"/>
<taskdef resource="org/netbeans/modules/kjava/antext/defs.properties">
<classpath>
<pathelement path="${libs.j2me_ant_ext.classpath}"/>
</classpath>
</taskdef>
<uptodate targetfile="${preprocessed.dir}/.timestamp" property="no.clean.before.build">
<srcfiles dir="nbproject">
<include name="project.properties"/>
<include name="build-impl.xml"/>
</srcfiles>
</uptodate>
<condition property="skip.deployment">
<equals trim="true" casesensitive="false" arg2="NONE" arg1="${deployment.method}"/>
</condition>
<condition property="skip-sign-keystore-password-input">
<or>
<isfalse value="${sign.enabled}"/>
<and>
<isset property="sign.keystore"/>
<isset property="sign.keystore.password"/>
<not>
<equals trim="true" arg2="" arg1="${sign.keystore}"/>
</not>
<not>
<equals trim="true" arg2="" arg1="${sign.keystore.password}"/>
</not>
</and>
</or>
</condition>
<condition property="skip-sign-alias-password-input">
<or>
<isfalse value="${sign.enabled}"/>
<and>
<isset property="sign.keystore"/>
<isset property="sign.alias"/>
<isset property="sign.alias.password"/>
<not>
<equals trim="true" arg2="" arg1="${sign.keystore}"/>
</not>
<not>
<equals trim="true" arg2="" arg1="${sign.alias}"/>
</not>
<not>
<equals trim="true" arg2="" arg1="${sign.alias.password}"/>
</not>
</and>
</or>
</condition>
<antcall inheritrefs="true" inheritall="true" target="post-init"/>
</target>
<target name="post-init"/>
<target name="deps-jar" depends="init" unless="no.deps"/>
<target description="Clean project in case its meta information has changed." unless="no.clean.before.build" depends="init" name="conditional-clean">
<antcall target="do-clean" inheritall="true" inheritrefs="true"/>
</target>
<target name="pre-preprocess"/>
<target description="Preprocess project sources." depends="init,pre-preprocess,deps-jar,conditional-clean" name="preprocess">
<mkdir dir="${preprocessed.dir}"/>
<echo file="${preprocessed.dir}/.timestamp" message="ignore me"/>
<nb-prep encoding="${javac.encoding}" preprocessfor="${config.active},${abilities}" destdir="${preprocessed.dir}">
<fileset excludes="${filter.excludes.evaluated}" defaultexcludes="${filter.use.standard}" dir="${src.dir}"/>
</nb-prep>
<antcall inheritrefs="true" inheritall="true" target="post-preprocess"/>
</target>
<target name="post-preprocess"/>
<target description="Extracts all bundled libraries." depends="init,deps-jar,conditional-clean" name="extract-libs">
<mkdir dir="${build.classes.dir}"/>
<nb-extract excludeManifest="true" dir="${build.classes.dir}">
<classpath>
<path path="${libs.classpath}"/>
</classpath>
</nb-extract>
</target>
<target name="pre-compile"/>
<target description="Compile project classes." depends="init,preprocess,extract-libs,pre-compile" name="compile">
<mkdir dir="${build.classes.dir}"/>
<javac encoding="${javac.encoding}" bootclasspath="${platform.bootclasspath}" srcdir="${preprocessed.dir}" destdir="${build.classes.dir}" debug="${javac.debug}" optimize="${javac.optimize}" deprecation="${javac.deprecation}" target="${javac.target}" source="${javac.source}" includeantruntime="false">
<classpath>
<path path="${libs.classpath}"/>
</classpath>
</javac>
<copy todir="${build.classes.dir}">
<fileset excludes="${filter.excludes.evaluated},${build.classes.excludes}" defaultexcludes="${filter.use.standard}" dir="${src.dir}"/>
</copy>
<antcall inheritrefs="true" inheritall="true" target="post-compile"/>
</target>
<target name="post-compile"/>
<target name="pre-compile-single"/>
<target description="Compile selected project classes." depends="init,preprocess,extract-libs,pre-compile-single" name="compile-single">
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
<mkdir dir="${build.classes.dir}"/>
<javac encoding="${javac.encoding}" includes="${javac.includes}" bootclasspath="${platform.bootclasspath}" destdir="${build.classes.dir}" srcdir="${preprocessed.dir}" debug="${javac.debug}" optimize="${javac.optimize}" deprecation="${javac.deprecation}" target="${javac.target}" source="${javac.source}" includeantruntime="false">
<classpath>
<path path="${libs.classpath}"/>
</classpath>
</javac>
<antcall inheritrefs="true" inheritall="true" target="post-compile-single"/>
</target>
<target name="post-compile-single"/>
<target depends="init" name="create-jad">
<mkdir dir="${build.dir}"/>
<dirname property="dist.jad.dir" file="${dist.dir}/${dist.jad}"/>
<mkdir dir="${dist.jad.dir}"/>
<condition value="${manifest.apipermissions}" property="evaluated.manifest.apipermissions">
<not>
<equals arg2="MIDP-1.0" arg1="${platform.profile}"/>
</not>
</condition>
<condition value="${manifest.pushregistry}" property="evaluated.manifest.pushregistry">
<not>
<equals arg2="MIDP-1.0" arg1="${platform.profile}"/>
</not>
</condition>
<condition property="contains.manifest.configuration">
<contains string="${manifest.others}" substring="MicroEdition-Configuration: "/>
</condition>
<condition property="contains.manifest.profile">
<contains string="${manifest.others}" substring="MicroEdition-Profile: "/>
</condition>
<property name="evaluated.manifest.apipermissions" value=""/>
<property name="evaluated.manifest.pushregistry" value=""/>
<property value="" name="manifest.jad"/>
<property value="" name="manifest.manifest"/>
<echo file="${dist.dir}/${dist.jad}">${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.jad}</echo>
<echo file="${build.dir}/manifest.mf">${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.manifest}</echo>
<antcall inheritrefs="true" inheritall="true" target="add-configuration"/>
<antcall inheritrefs="true" inheritall="true" target="add-profile"/>
</target>
<target unless="contains.manifest.configuration" name="add-configuration">
<echo append="true" file="${dist.dir}/${dist.jad}">MicroEdition-Configuration: ${platform.configuration}
</echo>
<echo append="true" file="${build.dir}/manifest.mf">MicroEdition-Configuration: ${platform.configuration}
</echo>
</target>
<target unless="contains.manifest.profile" name="add-profile">
<echo append="true" file="${dist.dir}/${dist.jad}">MicroEdition-Profile: ${platform.profile}
</echo>
<echo append="true" file="${build.dir}/manifest.mf">MicroEdition-Profile: ${platform.profile}
</echo>
</target>
<target name="pre-obfuscate"/>
<target description="Up-to-date check before obfuscation." depends="init,compile" name="obfuscate-check">
<uptodate targetfile="${obfuscator.destjar}" property="no.obfusc">
<srcfiles dir="${build.classes.dir}"/>
</uptodate>
</target>
<target unless="no.obfusc" description="Obfuscate project classes." depends="init,compile,obfuscate-check,pre-obfuscate" name="obfuscate">
<dirname property="obfuscator.srcjar.dir" file="${obfuscator.srcjar}"/>
<dirname property="obfuscator.destjar.dir" file="${obfuscator.destjar}"/>
<mkdir dir="${obfuscator.srcjar.dir}"/>
<mkdir dir="${obfuscator.destjar.dir}"/>
<jar basedir="${build.classes.dir}" jarfile="${obfuscator.srcjar}"/>
<property value="" name="obfuscation.custom"/>
<nb-obfuscate extraScript="${obfuscation.custom}" obfuscationLevel="${obfuscation.level}" classpath="${platform.bootclasspath}" obfuscatorclasspath="${obfuscator.classpath}" destjar="${obfuscator.destjar}" srcjar="${obfuscator.srcjar}"/>
<mkdir dir="${obfuscated.classes.dir}"/>
<unjar dest="${obfuscated.classes.dir}" src="${obfuscator.destjar}"/>
<antcall inheritrefs="true" inheritall="true" target="post-obfuscate"/>
</target>
<target name="post-obfuscate"/>
<target name="pre-preverify"/>
<target description="Preverify project classes." depends="init,compile,obfuscate,pre-preverify" name="preverify">
<mkdir dir="${preverify.classes.dir}"/>
<nb-preverify commandline="${platform.preverifycommandline}" platformtype="${platform.type}" platformhome="${platform.home}" configuration="${platform.configuration}" classpath="${platform.bootclasspath}" destdir="${preverify.classes.dir}" srcdir="${obfuscated.classes.dir}"/>
<antcall inheritrefs="true" inheritall="true" target="post-preverify"/>
</target>
<target name="post-preverify"/>
<target unless="skip-sign-keystore-password-input" if="netbeans.home" depends="init" name="set-keystore-password">
<nb-enter-password passwordproperty="sign.keystore.password" keystore="${sign.keystore}"/>
</target>
<target unless="skip-sign-alias-password-input" if="netbeans.home" depends="init" name="set-alias-password">
<nb-enter-password passwordproperty="sign.alias.password" keyalias="${sign.alias}" keystore="${sign.keystore}"/>
</target>
<target name="pre-jar"/>
<target description="Build jar and application descriptor." depends="init,preverify,create-jad,set-keystore-password,set-alias-password,pre-jar" name="jar">
<dirname property="dist.jar.dir" file="${dist.dir}/${dist.jar}"/>
<mkdir dir="${dist.jar.dir}"/>
<jar manifest="${build.dir}/manifest.mf" jarfile="${dist.dir}/${dist.jar}" compress="${jar.compress}">
<fileset dir="${preverify.classes.dir}"/>
<fileset dir="${obfuscated.classes.dir}">
<exclude name="**/*.class"/>
</fileset>
</jar>
<nb-jad aliaspassword="${sign.alias.password}" alias="${sign.alias}" keystorepassword="${sign.keystore.password}" keystore="${sign.keystore}" sign="${sign.enabled}" url="${dist.jar}" jarfile="${dist.dir}/${dist.jar}" jadfile="${dist.dir}/${dist.jad}"/>
<antcall inheritrefs="true" inheritall="true" target="post-jar"/>
</target>
<target name="post-jar"/>
<target description="Rebuild the application." depends="init,clean,jar" name="rebuild"/>
<target description="Run MIDlet suite." depends="init,jar" name="run">
<nb-run commandline="${platform.runcommandline}" securitydomain="${evaluated.run.security.domain}" execmethod="${run.method}" platformtype="${platform.type}" platformhome="${platform.home}" device="${platform.device}" jadurl="${dist.jad.url}" jadfile="${dist.dir}/${dist.jad}"/>
</target>
<target description="Quick Run already built MIDlet suite." depends="init" name="run-no-build">
<nb-run commandline="${platform.runcommandline}" securitydomain="${evaluated.run.security.domain}" execmethod="${run.method}" platformtype="${platform.type}" platformhome="${platform.home}" device="${platform.device}" jadurl="${dist.jad.url}" jadfile="${dist.dir}/${dist.jad}"/>
</target>
<target depends="init,clean,jar" description="Debug project." name="debug">
<delete file="${preprocessed.dir}/.timestamp"/>
<parallel>
<nb-run commandline="${platform.debugcommandline}" securitydomain="${evaluated.run.security.domain}" execmethod="${run.method}" jadfile="${dist.dir}/${dist.jad}" device="${platform.device}" platformhome="${platform.home}" platformtype="${platform.type}" debuggeraddressproperty="jpda.port" debugserver="true" debugsuspend="true" debug="true"/>
<sequential>
<sleep seconds="5"/>
<antcall target="nbdebug"/>
</sequential>
</parallel>
</target>
<target if="netbeans.home" description="Start NetBeans debugger" name="nbdebug">
<nb-kjava-debug period="2000" timeout="30000" name="${app.codename}" address="${jpda.port}">
<bootclasspath>
<path path="${platform.bootclasspath}"/>
</bootclasspath>
<classpath>
<path path="${dist.dir}/${dist.jar}"/>
</classpath>
<sourcepath>
<path path="${src.dir}"/>
<path path="${libs.src.path}"/>
</sourcepath>
</nb-kjava-debug>
</target>
<target depends="init,preprocess" name="javadoc">
<mkdir dir="${dist.javadoc.dir}"/>
<javadoc private="${javadoc.private}" windowtitle="${javadoc.windowtitle}" version="${javadoc.version}" author="${javadoc.author}" splitindex="${javadoc.splitindex}" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" use="${javadoc.use}" notree="${javadoc.notree}" bootclasspath="${platform.bootclasspath}" destdir="${dist.javadoc.dir}" source="${javac.source}">
<classpath>
<path path="${libs.classpath}"/>
</classpath>
<sourcepath>
<pathelement location="${preprocessed.dir}"/>
</sourcepath>
<fileset dir="${preprocessed.dir}"/>
</javadoc>
<antcall target="browse-javadoc"/>
</target>
<target unless="no.javadoc.preview" if="netbeans.home" name="browse-javadoc">
<nbbrowse file="${dist.javadoc.dir}/index.html"/>
</target>
<target name="pre-clean"/>
<target description="Clean build products." if="no.clean.before.build" depends="init,conditional-clean" name="clean">
<antcall inheritrefs="true" inheritall="true" target="do-clean"/>
</target>
<target depends="pre-clean" name="do-clean">
<delete dir="${preprocessed.dir}"/>
<delete dir="${build.classes.dir}"/>
<delete file="${obfuscator.srcjar}"/>
<delete file="${obfuscator.destjar}"/>
<delete dir="${obfuscated.classes.dir}"/>
<delete dir="${preverify.classes.dir}"/>
<delete file="${build.dir}/manifest.mf"/>
<delete file="${dist.dir}/${dist.jar}"/>
<delete file="${dist.dir}/${dist.jad}"/>
<delete dir="${dist.javadoc.dir}"/>
<antcall inheritrefs="true" inheritall="true" target="post-clean"/>
</target>
<target name="post-clean"/>
<target name="pre-deploy"/>
<target if="deployment.do.override.jarurl" depends="init,jar,pre-deploy" name="override-jad">
<property value="${dist.jar}" name="deployment.jarurl"/>
<nb-jad aliaspassword="${sign.alias.password}" alias="${sign.alias}" keystorepassword="${sign.keystore.password}" keystore="${sign.keystore}" sign="${sign.enabled}" url="${deployment.jarurl}" jarfile="${dist.dir}/${dist.jar}" jadfile="${dist.dir}/${dist.jad}"/>
</target>
<target unless="skip.deployment" if="deployment.method" depends="init,jar,override-jad,pre-deploy" name="deploy">
<fail unless="deployment.scriptfile">Property deployment.${deployment.method}.scriptfile not set. The property should point to an Ant script providing ${deployment.method} deployment.</fail>
<ant inheritrefs="true" inheritall="true" antfile="${deployment.scriptfile}">
<property location="${dist.dir}/${dist.jad}" name="deployment.jad"/>
<property location="${dist.dir}/${dist.jar}" name="deployment.jar"/>
</ant>
<propertyfile file="nbproject/private/private.properties">
<entry pattern="000000" default="2" operation="+" type="int" key="deployment.counter"/>
<entry value="${deployment.counter}" key="deployment.number"/>
</propertyfile>
<replaceregexp replace="deployment.number=\2\3.\5\6.\8\9" match="^deployment.number=[0-9]*(0|([1-9]))([0-9])(0|([1-9]))([0-9])(0|([1-9]))([0-9])$" file="nbproject/private/private.properties" byline="true"/>
<antcall inheritrefs="true" inheritall="true" target="post-deploy"/>
</target>
<target name="post-deploy"/>
<target name="for-all-configs">
<antcall inheritrefs="false" inheritall="false" target="${target.to.call}">
<param value="" name="config.active"/>
</antcall>
<antcall inheritrefs="false" inheritall="false" target="${target.to.call}">
<param name="config.active" value="M55_Release"/>
</antcall>
<antcall inheritrefs="false" inheritall="false" target="${target.to.call}">
<param name="config.active" value="M55"/>
</antcall>
<antcall inheritrefs="false" inheritall="false" target="${target.to.call}">
<param name="config.active" value="Release"/>
</antcall>
</target>
<target name="jar-all">
<antcall target="for-all-configs">
<param value="jar" name="target.to.call"/>
</antcall>
</target>
<target name="javadoc-all">
<antcall target="for-all-configs">
<param value="javadoc" name="target.to.call"/>
</antcall>
</target>
<target name="deploy-all">
<antcall target="for-all-configs">
<param value="deploy" name="target.to.call"/>
</antcall>
</target>
<target name="rebuild-all">
<antcall target="for-all-configs">
<param value="rebuild" name="target.to.call"/>
</antcall>
</target>
<target depends="load-properties" name="clean-all">
<fail unless="build.root.dir">Property build.root.dir is not set. By default its value should be \"build\".</fail>
<fail unless="dist.root.dir">Property dist.root.dir is not set. By default its value should be \"dist\".</fail>
<delete dir="${build.root.dir}"/>
<delete dir="${dist.root.dir}"/>
<antcall target="for-all-configs">
<param value="clean" name="target.to.call"/>
</antcall>
</target>
</project>
|
Please help me!
Also note i havent installed SDK from nokia 40 series as it will be for a nokia 40 series mobile. (But still shouldnt interfear with the build?)
I am using the "ant" from netbeans itself
any ideas? |
|
| Back to top |
|
 |
Petr Suchomel Posted via mailing list.
|
Posted: Fri Jul 03, 2009 2:23 pm Post subject: build-impl.xml:157: Problem: failed to create task or type nb-prep (PLEASE HELP!!!!) |
|
|
Are you able to compile any project in NetBeans? Seems you have
completely broken Ant configuration.
I can see some suspicious items, such as
bootclasspath/legacyfs.jar:bootclasspath/sielightapi.jar
Check you classpath settings first.
--Petr
migxit wrote:
| Quote: | Hi i am trying to compile a jabber application called "Bombus" i installed the following:
Java Runtime "Latest"
Netbeans 6.7 "Latest"
Wireless Toolkit 2.5.2
and ME
I had to set the signed to on
and when i compile i get this error:
Target "build" does not exist in the project "".
BUILD FAILED (total time: 0 seconds)
but when i click RUN i get this error:
Code:
pre-init:
pre-load-properties:
exists.config.active:
exists.netbeans.user:
exists.user.properties.file:
load-properties:
:bootclasspath/legacyfs.jar:bootclasspath/sielightapi.jar
Modified bootclasspath=C:\WTK2.5.2_01/lib/jsr75.jar:C:\WTK2.5.2_01/lib/mmapi.jar:C:\WTK2.5.2_01/lib/wma20.jar:C:\WTK2.5.2_01/lib/cldcapi10.jar:C:\WTK2.5.2_01/lib/midpapi20.jar:bootclasspath/legacyfs.jar:bootclasspath/sielightapi.jar
exists.platform.active:
exists.platform.configuration:
exists.platform.profile:
init:
Could not load definitions from resource org/netbeans/modules/kjava/antext/defs.properties. It could not be found.
post-init:
Copying 1 file to C:\Users\Paul\Documents\NetBeansProjects\trunk\resources
pre-preprocess:
deps-jar:
conditional-clean:
preprocess:
C:\Users\Paul\Documents\NetBeansProjects\trunk\nbproject\build-impl.xml:157: Problem: failed to create task or type nb-prep
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
BUILD FAILED (total time: 0 seconds)
This is my build.xml and my build-impl.xml:
Build.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<project name="" default="jar" basedir=".">
<description>Builds, tests, and runs the project .</description>
<import file="nbproject/build-impl.xml"/>
<!-- release tasks -->
<target name="for-release-configs">
<antcall inheritrefs="false" inheritall="false" target="${target.to.call}">
<param name="config.active" value="Release"/>
</antcall>
<antcall inheritrefs="false" inheritall="false" target="${target.to.call}">
<param name="config.active" value="ReleaseJZLIB"/>
</antcall>
</target>
<target name="rebuild-release">
<antcall target="for-release-configs">
<param value="rebuild" name="target.to.call"/>
</antcall>
</target>
<target name="rebuild-midp2-release">
<antcall inheritrefs="false" inheritall="false" target="rebuild">
<param name="config.active" value="Release"/>
</antcall>
</target>
<target name="rebuild-jzlib-release">
<antcall inheritrefs="false" inheritall="false" target="rebuild">
<param name="config.active" value="ReleaseJZLIB"/>
</antcall>
</target>
<target name="deploy-release">
<antcall target="for-release-configs">
<param value="deploy" name="target.to.call"/>
</antcall>
<!-- version patch in arch packer
<copy file="pack.cmd.txt" tofile="pack.cmd" overwrite="true" />
<replace
file="pack.cmd"
propertyFile="resources/.version">
<replacefilter
token="$BOMBUSREV$"
property="bombus.revision"/>
</replace> -->
<!-- version patch in server files -->
<copy file="private/config.php.txt" tofile="ftp/config.php" overwrite="true" />
<property file="resources/.version" />
<replace
file="ftp/config.php"
token="$BOMBUSVERSION$"
value="${bombus.version}"/>
<delete>
<fileset dir="ftp" includes="bombus*.*" />
</delete>
<tstamp>
<format property="bombus.tstamp" pattern="MM_dd"/>
</tstamp>
<property name="destfile" location="ftp/bombus_${bombus.revision}(all)${bombus.tstamp}" />
<zip destfile="${destfile}.zip">
<zipfileset dir="ftp/midp2.0" prefix="midp2.0"/>
<zipfileset dir="ftp/midp2.0z" prefix="midp2.0-ZLIB"/>
<zipfileset file="changelog.txt"/>
<zipfileset file="copying.txt"/>
</zip>
<tar destfile="${destfile}.tar">
<tarfileset dir="ftp/midp2.0" prefix="midp2.0"/>
<tarfileset dir="ftp/midp2.0z" prefix="midp2.0-ZLIB"/>
<tarfileset file="changelog.txt"/>
<tarfileset file="copying.txt"/>
</tar>
<bzip2 src="${destfile}.tar" destfile="${destfile}.tar.bz2"/>
<delete>
<fileset dir="ftp" includes="bombus*.tar" />
</delete>
</target>
<!-- prepare version patch -->
<target name="post-init">
<exec executable="svnversion" output="resources/.svnrev" />
<loadfile srcFile="resources/.svnrev" property="bombus.svnrev"/>
<copy file="resources/version.properties" tofile="resources/.version" overwrite="true" />
<replace
file="resources/.version"
token="$WCREV$"
value="${bombus.svnrev}"/>
</target>
<!-- old version patcher
<target name="post-init-tsvn">
<property name="versionPatcher" location="C:/Program Files/TortoiseSVN/bin/SubWCRev.exe" />
<property name="file_in" location="resources\version.properties "/>
<property name="file_out" location="resources\.version "/>
<exec executable="${versionPatcher}" >
<arg value="."/>
<arg value="${file_in}"/>
<arg value="${file_out}"/>
</exec>
</target>
-->
<!-- version patch in Sources -->
<target name="post-preprocess">
<property file="resources/.version" />
<replace
file="${preprocessed.dir}\Info\Version.java"
token="$BOMBUSVERSION$"
value="${bombus.version}"/>
</target>
<!-- version patch in manifest -->
<target name="pre-jar" depends="create-jad">
<property file="resources/.version" />
<replace file="${build.dir}/manifest.mf"
token="$ BOMBUSVERSION $"
value="${bombus.version}"/>
<replace file="${build.dir}/manifest.mf"
token="$MIDLETVERSION$"
value="${bombus.midlet}"/>
</target>
<target name="post-jar">
<!-- version patch in jad -->
<property file="resources/.version" />
<replace file="${dist.dir}/Bombus.jad"
token="$BOMBUSVERSION$"
value="${bombus.version}"/>
<replace file="${dist.dir}/Bombus.jad"
token="$MIDLETVERSION$"
value="${bombus.midlet}"/>
</target>
<!-- overrided to change bootclasspath -->
<target depends="pre-load-properties,exists.config.active,exists.netbeans.user,exists.user.properties.file" name="load-properties">
<loadproperties srcfile="nbproject/project.properties">
<filterchain>
<containsregex replace="\1" pattern="^configs\.${config.active}\.(.*)"/>
<concatfilter prepend="nbproject/project.properties"/>
<containsregex pattern="^platform.active=|^deployment.method=|^bombus.bootclasspath="/>
</filterchain>
</loadproperties>
<property name="bombus.bootclasspath" value=""/>
<echo message="${bombus.bootclasspath}"/>
<loadproperties srcfile="${user.properties.file}">
<filterchain>
<replaceregex replace="platform." pattern="^platforms\.${platform.active}\."/>
<replaceregex replace="deployment.scriptfile=" pattern="^deployment\.${deployment.method}\.scriptfile="/>
</filterchain>
</loadproperties>
<!-- patching bootclasspath -->
<loadproperties srcfile="nbproject/project.properties">
<filterchain>
<containsregex replace="platform.bootclasspath=\1${bombus.bootclasspath}" pattern="^configs\.${config.active}\.platform\.bootclasspath=(.*)"/>
</filterchain>
</loadproperties>
<loadproperties srcfile="nbproject/project.properties">
<filterchain>
<containsregex replace="platform.bootclasspath=\1${bombus.bootclasspath}" pattern="^platform\.bootclasspath=(.*)"/>
</filterchain>
</loadproperties>
<loadproperties srcfile="nbproject/project.properties">
<filterchain>
<containsregex replace="\1" pattern="^configs\.${config.active}\.(.*)"/>
<concatfilter prepend="nbproject/project.properties"/>
</filterchain>
</loadproperties>
<echo message="Modified bootclasspath=${platform.bootclasspath}" />
</target>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
pre-init: called before initialization of project properties
post-init: called after initialization of project properties
pre-preprocess: called before text preprocessing of sources
post-preprocess: called after text preprocessing of sources
pre-compile: called before source compilation
post-compile: called after source compilation
pre-obfuscate: called before obfuscation
post-obfuscate: called after obfuscation
pre-preverify: called before preverification
post-preverify: called after preverification
pre-jar: called before jar building
post-jar: called after jar building
pre-clean: called before cleaning build products
post-clean: called after cleaning build products
Example of pluging a my-special-task after the compilation could look like
<target name="post-compile">
<my-special-task>
<fileset dir="${build.classes.dir}"/>
</my-special-task>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Other way how to customize the build is by overriding existing main targets.
The target of interest are:
preprocess: preprocessing
extract-libs: extraction of libraries and resources
compile: compilation
create-jad: construction of jad and jar manifest source
obfuscate: obfuscation
preverify: preverification
jar: jar archive building
run: execution
debug: execution in debug mode
javadoc: javadoc generation
Example of overriding the target for project execution could look like
<target name="run" depends="init,jar">
<my-special-exec jadfile="${dist.dir}/${dist.jad}"/>
</target>
Be careful about correct dependencies when overriding original target.
Again, for list of available properties which you can use check the target
you are overriding in nbproject/build-impl.xml file.
A special target for-all-configs can be used to run some specific targets for
all project configurations in a sequence. File nbproject/build-impl.xml
already contains some "for-all" targets:
jar-all
javadoc-all
clean-all
Example of definition of target iterating over all project configurations:
<target name="jar-all">
<property name="target.to.call" value="jar"/>
<antcall target="for-all-configs"/>
</target>
-->
</project>
build-impl.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!-- *** GENERATED FROM project.xml - DO NOT EDIT *** -->
<project xmlns:projdeps2="http://www.netbeans.org/ns/ant-project-references/2" basedir=".." default="jar" name="-impl">
<target name="pre-init"/>
<target depends="pre-init" name="pre-load-properties">
<property file="nbproject/private/private.properties"/>
<property value="0.0.1" name="deployment.number"/>
<property value="000002" name="deployment.counter"/>
<property location="${netbeans.user}/build.properties" name="user.properties.file"/>
<available file="${user.properties.file}" property="user.properties.file.exists"/>
</target>
<target unless="config.active" depends="pre-load-properties" name="exists.config.active">
<echo message="Active configuration (config.active property) is not set - using default." level="warning"/>
<property name="config.active" value=""/>
</target>
<target unless="netbeans.user" depends="pre-load-properties" name="exists.netbeans.user">
<echo message="NetBeans IDE user directory (netbeans.user property) is not set. By specifying this property many properties required by the project will be automatically evaluated (e.g.: ant-ext library home, ...). You could also open this project in the NetBeans IDE - in this case this property would be set automatically." level="warning"/>
</target>
<target unless="user.properties.file.exists" depends="pre-load-properties" name="exists.user.properties.file">
<echo message="User properties file (user.properties.file) property is not set. By specifying this property many properties required by the project will be automatically evaluated (e.g.: libraries, platforms, ...)." level="warning"/>
</target>
<target depends="pre-load-properties,exists.config.active,exists.netbeans.user,exists.user.properties.file" name="load-properties">
<loadproperties srcfile="nbproject/project.properties">
<filterchain>
<containsregex replace="\1" pattern="^configs\.${config.active}\.(.*)"/>
<concatfilter prepend="nbproject/project.properties"/>
<containsregex pattern="^platform.active=|^deployment.method="/>
</filterchain>
</loadproperties>
<loadproperties srcfile="${user.properties.file}">
<filterchain>
<replaceregex replace="platform." pattern="^platforms\.${platform.active}\."/>
<replaceregex replace="deployment.scriptfile=" pattern="^deployment\.${deployment.method}\.scriptfile="/>
</filterchain>
</loadproperties>
<loadproperties srcfile="nbproject/project.properties">
<filterchain>
<containsregex replace="\1" pattern="^configs\.${config.active}\.(.*)"/>
<concatfilter prepend="nbproject/project.properties"/>
</filterchain>
</loadproperties>
</target>
<target unless="platform.active" depends="load-properties" name="exists.platform.active">
<echo message="Active platform (platform.active property) in not set. If you set this and user.properties.file property, many properties required by the project will be automatically evaluated (e.g.: platform home, platform classpath, ...)." level="warning"/>
</target>
<target depends="load-properties" unless="platform.configuration" name="exists.platform.configuration">
<echo message="Platform configuration (platform.configuration) is not set. Using default (CLDC-1.0) configuration." level="warning"/>
<property value="CLDC-1.0" name="platform.configuration"/>
</target>
<target depends="load-properties" unless="platform.profile" name="exists.platform.profile">
<echo message="Platform profile (platform.profile) is not set. Using default (MIDP-1.0) profile." level="warning"/>
<property value="MIDP-1.0" name="platform.profile"/>
</target>
<target depends="pre-init,load-properties,exists.platform.active,exists.platform.configuration,exists.platform.profile" name="init">
<fail unless="libs.j2me_ant_ext.classpath">Classpath to J2ME Ant extension library (libs.j2me_ant_ext.classpath property) is not set. For example: location of mobility/modules/org-netbeans-modules-kjava-antext.jar file in the IDE installation directory.</fail>
<fail unless="platform.home">Platform home (platform.home property) is not set. Value of this property should be ${platform.active.description} emulator home directory location.</fail>
<fail unless="platform.bootclasspath">Platform boot classpath (platform.bootclasspath property) is not set. Value of this property should be ${platform.active.description} emulator boot classpath containing all J2ME classes provided by emulator.</fail>
<fail unless="src.dir">Must set src.dir</fail>
<fail unless="build.dir">Must set build.dir</fail>
<fail unless="build.classes.dir">Must set build.classes.dir</fail>
<fail unless="preprocessed.dir">Must set preprocessed.dir</fail>
<fail unless="preverify.classes.dir">Must set preverify.classes.dir</fail>
<fail unless="obfuscated.classes.dir">Must set obfuscated.classes.dir</fail>
<fail unless="dist.dir">Must set dist.dir</fail>
<fail unless="dist.jar">Must set dist.jar</fail>
<fail unless="dist.jad">Must set dist.jad</fail>
<fail unless="obfuscator.srcjar">Must set obfuscator.srcjar</fail>
<fail unless="obfuscator.destjar">Must set obfuscator.destjar</fail>
<fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
<property value="" name="abilities"/>
<property value="" name="obfuscator.classpath"/>
<property value="" name="kjava.configuration"/>
<property value="UEI-1.0" name="platform.type"/>
<property value="" name="platform.device"/>
<property value="0" name="obfuscation.level"/>
<property value="false" name="sign.enabled"/>
<property value="file://" name="dist.jad.url"/>
<property value="1.3" name="javac.source"/>
<property value="1.1" name="javac.target"/>
<property value="${file.encoding}" name="javac.encoding"/>
<condition property="no.deps">
<istrue value="${no.dependencies}"/>
</condition>
<condition property="no.javadoc.preview">
<isfalse value="${javadoc.preview}"/>
</condition>
<condition value="${filter.excludes},**/*Test.java,**/test,**/test/**" property="filter.excludes.evaluated">
<istrue value="${filter.exclude.tests}"/>
</condition>
<property value="${filter.excludes}" name="filter.excludes.evaluated"/>
<condition value="" property="evaluated.run.security.domain">
<isfalse value="${run.use.security.domain}"/>
</condition>
<condition value="" property="deployment.do.override.jarurl">
<istrue value="${deployment.override.jarurl}"/>
</condition>
<property value="${run.security.domain}" name="evaluated.run.security.domain"/>
<taskdef resource="org/netbeans/modules/kjava/antext/defs.properties">
<classpath>
<pathelement path="${libs.j2me_ant_ext.classpath}"/>
</classpath>
</taskdef>
<uptodate targetfile="${preprocessed.dir}/.timestamp" property="no.clean.before.build">
<srcfiles dir="nbproject">
<include name="project.properties"/>
<include name="build-impl.xml"/>
</srcfiles>
</uptodate>
<condition property="skip.deployment">
<equals trim="true" casesensitive="false" arg2="NONE" arg1="${deployment.method}"/>
</condition>
<condition property="skip-sign-keystore-password-input">
<or>
<isfalse value="${sign.enabled}"/>
<and>
<isset property="sign.keystore"/>
<isset property="sign.keystore.password"/>
<not>
<equals trim="true" arg2="" arg1="${sign.keystore}"/>
</not>
<not>
<equals trim="true" arg2="" arg1="${sign.keystore.password}"/>
</not>
</and>
</or>
</condition>
<condition property="skip-sign-alias-password-input">
<or>
<isfalse value="${sign.enabled}"/>
<and>
<isset property="sign.keystore"/>
<isset property="sign.alias"/>
<isset property="sign.alias.password"/>
<not>
<equals trim="true" arg2="" arg1="${sign.keystore}"/>
</not>
<not>
<equals trim="true" arg2="" arg1="${sign.alias}"/>
</not>
<not>
<equals trim="true" arg2="" arg1="${sign.alias.password}"/>
</not>
</and>
</or>
</condition>
<antcall inheritrefs="true" inheritall="true" target="post-init"/>
</target>
<target name="post-init"/>
<target name="deps-jar" depends="init" unless="no.deps"/>
<target description="Clean project in case its meta information has changed." unless="no.clean.before.build" depends="init" name="conditional-clean">
<antcall target="do-clean" inheritall="true" inheritrefs="true"/>
</target>
<target name="pre-preprocess"/>
<target description="Preprocess project sources." depends="init,pre-preprocess,deps-jar,conditional-clean" name="preprocess">
<mkdir dir="${preprocessed.dir}"/>
<echo file="${preprocessed.dir}/.timestamp" message="ignore me"/>
<nb-prep encoding="${javac.encoding}" preprocessfor="${config.active},${abilities}" destdir="${preprocessed.dir}">
<fileset excludes="${filter.excludes.evaluated}" defaultexcludes="${filter.use.standard}" dir="${src.dir}"/>
</nb-prep>
<antcall inheritrefs="true" inheritall="true" target="post-preprocess"/>
</target>
<target name="post-preprocess"/>
<target description="Extracts all bundled libraries." depends="init,deps-jar,conditional-clean" name="extract-libs">
<mkdir dir="${build.classes.dir}"/>
<nb-extract excludeManifest="true" dir="${build.classes.dir}">
<classpath>
<path path="${libs.classpath}"/>
</classpath>
</nb-extract>
</target>
<target name="pre-compile"/>
<target description="Compile project classes." depends="init,preprocess,extract-libs,pre-compile" name="compile">
<mkdir dir="${build.classes.dir}"/>
<javac encoding="${javac.encoding}" bootclasspath="${platform.bootclasspath}" srcdir="${preprocessed.dir}" destdir="${build.classes.dir}" debug="${javac.debug}" optimize="${javac.optimize}" deprecation="${javac.deprecation}" target="${javac.target}" source="${javac.source}" includeantruntime="false">
<classpath>
<path path="${libs.classpath}"/>
</classpath>
</javac>
<copy todir="${build.classes.dir}">
<fileset excludes="${filter.excludes.evaluated},${build.classes.excludes}" defaultexcludes="${filter.use.standard}" dir="${src.dir}"/>
</copy>
<antcall inheritrefs="true" inheritall="true" target="post-compile"/>
</target>
<target name="post-compile"/>
<target name="pre-compile-single"/>
<target description="Compile selected project classes." depends="init,preprocess,extract-libs,pre-compile-single" name="compile-single">
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
<mkdir dir="${build.classes.dir}"/>
<javac encoding="${javac.encoding}" includes="${javac.includes}" bootclasspath="${platform.bootclasspath}" destdir="${build.classes.dir}" srcdir="${preprocessed.dir}" debug="${javac.debug}" optimize="${javac.optimize}" deprecation="${javac.deprecation}" target="${javac.target}" source="${javac.source}" includeantruntime="false">
<classpath>
<path path="${libs.classpath}"/>
</classpath>
</javac>
<antcall inheritrefs="true" inheritall="true" target="post-compile-single"/>
</target>
<target name="post-compile-single"/>
<target depends="init" name="create-jad">
<mkdir dir="${build.dir}"/>
<dirname property="dist.jad.dir" file="${dist.dir}/${dist.jad}"/>
<mkdir dir="${dist.jad.dir}"/>
<condition value="${manifest.apipermissions}" property="evaluated.manifest.apipermissions">
<not>
<equals arg2="MIDP-1.0" arg1="${platform.profile}"/>
</not>
</condition>
<condition value="${manifest.pushregistry}" property="evaluated.manifest.pushregistry">
<not>
<equals arg2="MIDP-1.0" arg1="${platform.profile}"/>
</not>
</condition>
<condition property="contains.manifest.configuration">
<contains string="${manifest.others}" substring="MicroEdition-Configuration: "/>
</condition>
<condition property="contains.manifest.profile">
<contains string="${manifest.others}" substring="MicroEdition-Profile: "/>
</condition>
<property name="evaluated.manifest.apipermissions" value=""/>
<property name="evaluated.manifest.pushregistry" value=""/>
<property value="" name="manifest.jad"/>
<property value="" name="manifest.manifest"/>
<echo file="${dist.dir}/${dist.jad}">${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.jad}</echo>
<echo file="${build.dir}/manifest.mf">${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.manifest}</echo>
<antcall inheritrefs="true" inheritall="true" target="add-configuration"/>
<antcall inheritrefs="true" inheritall="true" target="add-profile"/>
</target>
<target unless="contains.manifest.configuration" name="add-configuration">
<echo append="true" file="${dist.dir}/${dist.jad}">MicroEdition-Configuration: ${platform.configuration}
</echo>
<echo append="true" file="${build.dir}/manifest.mf">MicroEdition-Configuration: ${platform.configuration}
</echo>
</target>
<target unless="contains.manifest.profile" name="add-profile">
<echo append="true" file="${dist.dir}/${dist.jad}">MicroEdition-Profile: ${platform.profile}
</echo>
<echo append="true" file="${build.dir}/manifest.mf">MicroEdition-Profile: ${platform.profile}
</echo>
</target>
<target name="pre-obfuscate"/>
<target description="Up-to-date check before obfuscation." depends="init,compile" name="obfuscate-check">
<uptodate targetfile="${obfuscator.destjar}" property="no.obfusc">
<srcfiles dir="${build.classes.dir}"/>
</uptodate>
</target>
<target unless="no.obfusc" description="Obfuscate project classes." depends="init,compile,obfuscate-check,pre-obfuscate" name="obfuscate">
<dirname property="obfuscator.srcjar.dir" file="${obfuscator.srcjar}"/>
<dirname property="obfuscator.destjar.dir" file="${obfuscator.destjar}"/>
<mkdir dir="${obfuscator.srcjar.dir}"/>
<mkdir dir="${obfuscator.destjar.dir}"/>
<jar basedir="${build.classes.dir}" jarfile="${obfuscator.srcjar}"/>
<property value="" name="obfuscation.custom"/>
<nb-obfuscate extraScript="${obfuscation.custom}" obfuscationLevel="${obfuscation.level}" classpath="${platform.bootclasspath}" obfuscatorclasspath="${obfuscator.classpath}" destjar="${obfuscator.destjar}" srcjar="${obfuscator.srcjar}"/>
<mkdir dir="${obfuscated.classes.dir}"/>
<unjar dest="${obfuscated.classes.dir}" src="${obfuscator.destjar}"/>
<antcall inheritrefs="true" inheritall="true" target="post-obfuscate"/>
</target>
<target name="post-obfuscate"/>
<target name="pre-preverify"/>
<target description="Preverify project classes." depends="init,compile,obfuscate,pre-preverify" name="preverify">
<mkdir dir="${preverify.classes.dir}"/>
<nb-preverify commandline="${platform.preverifycommandline}" platformtype="${platform.type}" platformhome="${platform.home}" configuration="${platform.configuration}" classpath="${platform.bootclasspath}" destdir="${preverify.classes.dir}" srcdir="${obfuscated.classes.dir}"/>
<antcall inheritrefs="true" inheritall="true" target="post-preverify"/>
</target>
<target name="post-preverify"/>
<target unless="skip-sign-keystore-password-input" if="netbeans.home" depends="init" name="set-keystore-password">
<nb-enter-password passwordproperty="sign.keystore.password" keystore="${sign.keystore}"/>
</target>
<target unless="skip-sign-alias-password-input" if="netbeans.home" depends="init" name="set-alias-password">
<nb-enter-password passwordproperty="sign.alias.password" keyalias="${sign.alias}" keystore="${sign.keystore}"/>
</target>
<target name="pre-jar"/>
<target description="Build jar and application descriptor." depends="init,preverify,create-jad,set-keystore-password,set-alias-password,pre-jar" name="jar">
<dirname property="dist.jar.dir" file="${dist.dir}/${dist.jar}"/>
<mkdir dir="${dist.jar.dir}"/>
<jar manifest="${build.dir}/manifest.mf" jarfile="${dist.dir}/${dist.jar}" compress="${jar.compress}">
<fileset dir="${preverify.classes.dir}"/>
<fileset dir="${obfuscated.classes.dir}">
<exclude name="**/*.class"/>
</fileset>
</jar>
<nb-jad aliaspassword="${sign.alias.password}" alias="${sign.alias}" keystorepassword="${sign.keystore.password}" keystore="${sign.keystore}" sign="${sign.enabled}" url="${dist.jar}" jarfile="${dist.dir}/${dist.jar}" jadfile="${dist.dir}/${dist.jad}"/>
<antcall inheritrefs="true" inheritall="true" target="post-jar"/>
</target>
<target name="post-jar"/>
<target description="Rebuild the application." depends="init,clean,jar" name="rebuild"/>
<target description="Run MIDlet suite." depends="init,jar" name="run">
<nb-run commandline="${platform.runcommandline}" securitydomain="${evaluated.run.security.domain}" execmethod="${run.method}" platformtype="${platform.type}" platformhome="${platform.home}" device="${platform.device}" jadurl="${dist.jad.url}" jadfile="${dist.dir}/${dist.jad}"/>
</target>
<target description="Quick Run already built MIDlet suite." depends="init" name="run-no-build">
<nb-run commandline="${platform.runcommandline}" securitydomain="${evaluated.run.security.domain}" execmethod="${run.method}" platformtype="${platform.type}" platformhome="${platform.home}" device="${platform.device}" jadurl="${dist.jad.url}" jadfile="${dist.dir}/${dist.jad}"/>
</target>
<target depends="init,clean,jar" description="Debug project." name="debug">
<delete file="${preprocessed.dir}/.timestamp"/>
<parallel>
<nb-run commandline="${platform.debugcommandline}" securitydomain="${evaluated.run.security.domain}" execmethod="${run.method}" jadfile="${dist.dir}/${dist.jad}" device="${platform.device}" platformhome="${platform.home}" platformtype="${platform.type}" debuggeraddressproperty="jpda.port" debugserver="true" debugsuspend="true" debug="true"/>
<sequential>
<sleep seconds="5"/>
<antcall target="nbdebug"/>
</sequential>
</parallel>
</target>
<target if="netbeans.home" description="Start NetBeans debugger" name="nbdebug">
<nb-kjava-debug period="2000" timeout="30000" name="${app.codename}" address="${jpda.port}">
<bootclasspath>
<path path="${platform.bootclasspath}"/>
</bootclasspath>
<classpath>
<path path="${dist.dir}/${dist.jar}"/>
</classpath>
<sourcepath>
<path path="${src.dir}"/>
<path path="${libs.src.path}"/>
</sourcepath>
</nb-kjava-debug>
</target>
<target depends="init,preprocess" name="javadoc">
<mkdir dir="${dist.javadoc.dir}"/>
<javadoc private="${javadoc.private}" windowtitle="${javadoc.windowtitle}" version="${javadoc.version}" author="${javadoc.author}" splitindex="${javadoc.splitindex}" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" use="${javadoc.use}" notree="${javadoc.notree}" bootclasspath="${platform.bootclasspath}" destdir="${dist.javadoc.dir}" source="${javac.source}">
<classpath>
<path path="${libs.classpath}"/>
</classpath>
<sourcepath>
<pathelement location="${preprocessed.dir}"/>
</sourcepath>
<fileset dir="${preprocessed.dir}"/>
</javadoc>
<antcall target="browse-javadoc"/>
</target>
<target unless="no.javadoc.preview" if="netbeans.home" name="browse-javadoc">
<nbbrowse file="${dist.javadoc.dir}/index.html"/>
</target>
<target name="pre-clean"/>
<target description="Clean build products." if="no.clean.before.build" depends="init,conditional-clean" name="clean">
<antcall inheritrefs="true" inheritall="true" target="do-clean"/>
</target>
<target depends="pre-clean" name="do-clean">
<delete dir="${preprocessed.dir}"/>
<delete dir="${build.classes.dir}"/>
<delete file="${obfuscator.srcjar}"/>
<delete file="${obfuscator.destjar}"/>
<delete dir="${obfuscated.classes.dir}"/>
<delete dir="${preverify.classes.dir}"/>
<delete file="${build.dir}/manifest.mf"/>
<delete file="${dist.dir}/${dist.jar}"/>
<delete file="${dist.dir}/${dist.jad}"/>
<delete dir="${dist.javadoc.dir}"/>
<antcall inheritrefs="true" inheritall="true" target="post-clean"/>
</target>
<target name="post-clean"/>
<target name="pre-deploy"/>
<target if="deployment.do.override.jarurl" depends="init,jar,pre-deploy" name="override-jad">
<property value="${dist.jar}" name="deployment.jarurl"/>
<nb-jad aliaspassword="${sign.alias.password}" alias="${sign.alias}" keystorepassword="${sign.keystore.password}" keystore="${sign.keystore}" sign="${sign.enabled}" url="${deployment.jarurl}" jarfile="${dist.dir}/${dist.jar}" jadfile="${dist.dir}/${dist.jad}"/>
</target>
<target unless="skip.deployment" if="deployment.method" depends="init,jar,override-jad,pre-deploy" name="deploy">
<fail unless="deployment.scriptfile">Property deployment.${deployment.method}.scriptfile not set. The property should point to an Ant script providing ${deployment.method} deployment.</fail>
<ant inheritrefs="true" inheritall="true" antfile="${deployment.scriptfile}">
<property location="${dist.dir}/${dist.jad}" name="deployment.jad"/>
<property location="${dist.dir}/${dist.jar}" name="deployment.jar"/>
</ant>
<propertyfile file="nbproject/private/private.properties">
<entry pattern="000000" default="2" operation="+" type="int" key="deployment.counter"/>
<entry value="${deployment.counter}" key="deployment.number"/>
</propertyfile>
<replaceregexp replace="deployment.number=\2\3.\5\6.\8\9" match="^deployment.number=[0-9]*(0|([1-9]))([0-9])(0|([1-9]))([0-9])(0|([1-9]))([0-9])$" file="nbproject/private/private.properties" byline="true"/>
<antcall inheritrefs="true" inheritall="true" target="post-deploy"/>
</target>
<target name="post-deploy"/>
<target name="for-all-configs">
<antcall inheritrefs="false" inheritall="false" target="${target.to.call}">
<param value="" name="config.active"/>
</antcall>
<antcall inheritrefs="false" inheritall="false" target="${target.to.call}">
<param name="config.active" value="M55_Release"/>
</antcall>
<antcall inheritrefs="false" inheritall="false" target="${target.to.call}">
<param name="config.active" value="M55"/>
</antcall>
<antcall inheritrefs="false" inheritall="false" target="${target.to.call}">
<param name="config.active" value="Release"/>
</antcall>
</target>
<target name="jar-all">
<antcall target="for-all-configs">
<param value="jar" name="target.to.call"/>
</antcall>
</target>
<target name="javadoc-all">
<antcall target="for-all-configs">
<param value="javadoc" name="target.to.call"/>
</antcall>
</target>
<target name="deploy-all">
<antcall target="for-all-configs">
<param value="deploy" name="target.to.call"/>
</antcall>
</target>
<target name="rebuild-all">
<antcall target="for-all-configs">
<param value="rebuild" name="target.to.call"/>
</antcall>
</target>
<target depends="load-properties" name="clean-all">
<fail unless="build.root.dir">Property build.root.dir is not set. By default its value should be \"build\".</fail>
<fail unless="dist.root.dir">Property dist.root.dir is not set. By default its value should be \"dist\".</fail>
<delete dir="${build.root.dir}"/>
<delete dir="${dist.root.dir}"/>
<antcall target="for-all-configs">
<param value="clean" name="target.to.call"/>
</antcall>
</target>
</project>
Please help me!
Also note i havent installed SDK from nokia 40 series as it will be for a nokia 40 series mobile. (But still shouldnt interfear with the build?)
I am using the "ant" from netbeans itself
any ideas?
|
--
Petr Suchomel <address-removed>
Architect, NetBeans Mobility
Sun Microsystems, Inc.
Phone +420 2 33009234 (x49234), Fax +420 2 33009311 |
|
| Back to top |
|
 |
migxit
Joined: 03 Jul 2009 Posts: 2
|
Posted: Sun Jul 05, 2009 5:30 pm Post subject: |
|
|
There is nothing under my ant classpath nor under properties,
This is the source, you can use it by Checkout option under tools:
http://svn.xmpp.ru/repos/bombus/trunk
If you can compile it and tell me what steps you took and what you needed i will greatly appreciate it
and yes i can compile hello world etc... |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|
|