Did you put the netbeans ant jars in your jenkins ant lib folder ? I'm pretty sure those tasks/namespaces are not published by ant but are extensions developped by netbeans.
Richard On 2012-09-28, at 07:31, Kayode Odeyemi <[email protected]> wrote: > Hi all, > > I'm creating a build job using the Ant task below; > > <project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" > xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" > name="pcdn-core" default="default" basedir="."> > <description>Builds, tests, and runs the project pcdn-core.</description> > <fail message="Please build using Ant 1.8.0 or higher."> > <condition> > <not> > <antversion atleast="1.8.0"/> > </not> > </condition> > </fail> > <target depends="test,jar,javadoc" description="Build and test whole > project." name="default"/> > .... > .... > <target depends="init" name="-pre-pre-jar"> > <dirname file="${dist.jar}" property="dist.jar.dir"/> > <mkdir dir="${dist.jar.dir}"/> > </target> > <target name="-pre-jar"> > <!-- Empty placeholder for easier customization. --> > <!-- You can override this target in the ../build.xml file. --> > </target> > <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" > name="-do-jar-without-manifest" unless="manifest.available-mkdist.available"> > <j2seproject1:jar/> > </target> > <target depends="init,compile,-pre-pre-jar,-pre-jar" > if="do.archive+manifest.available" name="-do-jar-with-manifest" > unless="manifest.available+main.class-mkdist.available"> > <j2seproject1:jar manifest="${manifest.file}"/> > </target> > <target depends="init,compile,-pre-pre-jar,-pre-jar" > if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" > unless="manifest.available+main.class+mkdist.available"> > <j2seproject1:jar manifest="${manifest.file}"> > <j2seproject1:manifest> > <j2seproject1:attribute name="Main-Class" > value="${main.class}"/> > </j2seproject1:manifest> > </j2seproject1:jar> > <echo level="info">To run this application from the command line > without Ant, try:</echo> > <property location="${build.classes.dir}" > name="build.classes.dir.resolved"/> > <property location="${dist.jar}" name="dist.jar.resolved"/> > <pathconvert property="run.classpath.with.dist.jar"> > <path path="${run.classpath}"/> > <map from="${build.classes.dir.resolved}" > to="${dist.jar.resolved}"/> > </pathconvert> > <echo level="info">java -cp "${run.classpath.with.dist.jar}" > ${main.class}</echo> > </target> > <target depends="init" if="do.archive" > name="-do-jar-with-libraries-create-manifest" unless="manifest.available"> > <tempfile deleteonexit="true" destdir="${build.dir}" > property="tmp.manifest.file"/> > <touch file="${tmp.manifest.file}" verbose="false"/> > </target> > <target depends="init" if="do.archive+manifest.available" > name="-do-jar-with-libraries-copy-manifest"> > <tempfile deleteonexit="true" destdir="${build.dir}" > property="tmp.manifest.file"/> > <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> > </target> > <target > depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" > if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main"> > <manifest file="${tmp.manifest.file}" mode="update"> > <attribute name="Main-Class" value="${main.class}"/> > </manifest> > </target> > <target > depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main" > if="do.mkdist" name="-do-jar-with-libraries-pack"> > <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> > <echo level="info">To run this application from the command line > without Ant, try:</echo> > <property location="${dist.jar}" name="dist.jar.resolved"/> > <echo level="info">java -jar "${dist.jar.resolved}"</echo> > </target> > <target depends="-do-jar-with-libraries-pack" if="do.archive" > name="-do-jar-with-libraries-delete-manifest"> > <delete> > <fileset file="${tmp.manifest.file}"/> > </delete> > </target> > <target > depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" > name="-do-jar-with-libraries"/> > <target name="-post-jar"> > <!-- Empty placeholder for easier customization. --> > <!-- You can override this target in the ../build.xml file. --> > </target> > <target > depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" > description="Build JAR." name="jar"/> > > > However, I'm surprised that Jenkins cannot parse j2se-project namespace from > Netbeans. > > /var/lib/jenkins/jobs/pcdnmgt core build/workspace/build.xml:257: Problem: > failed to create task or type http://www.netbeans.org/ns/j2se-project/1:jar > > Any ideas on this will be greatly appreciated. > > Thanks
