Ant Problem - failed to create task or type project [message #634853] |
Sun, 24 October 2010 16:50 |
lanz Messages: 2 Registered: October 2010 |
Junior Member |
|
|
Hi,
I am trying to run this Ant file.
<project name="PruebaHibernate" default="run">
<target name="init">
<project name="src.dir" value="src" />
<project name="classes.dir" value="bin" />
<project name="lib.dir" value="lib" />
<project name="mainclass" value="mx.uam.hibernate.ManejadorLibro" />
<path id="classpath">
<pathelement location="${classes.dir}" />
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
</path>
</target>
<target name="prepare" depends="init">
<mkdir dir="${classes.dir}" />
<mkdir dir="${lib.dir}" />
</target>
<target name="compile" depends="copy-resources">
<javac srcdir="${src.dir}" destdir="${classes.dir}">
<classpath refid="classpath" />
</javac>
</target>
<target name="copy-resources" depends="prepare">
<copy todir="${classes.dir}">
<fileset dir="${src.dir}">
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="run" depends="compile">
<java classname="${mainclass}" fork="true">
<arg value="agrega" />
<arg value="Tutorial" />
<arg value="IngSW" />
<classpath refid="classpath" />
</java>
</target>
</project>
------------
But unfortunately it doesn´t run. If gices me the following error: (the error is in the line underlined in bold)
BUILD FAILED
C:\Documents and Settings\egoitz\workspace\PruebaHibernate\build.xml:3: Problem: failed to create task or type project
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.
----------------
I would be very grateful if anybody would tell me how to solved it.
Thanks with anticipation
Regards
[Updated on: Sun, 24 October 2010 16:51] Report message to a moderator
|
|
|
Re: Ant Problem - failed to create task or type project [message #634860 is a reply to message #634853] |
Sun, 24 October 2010 17:10 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Lanz,
I think you've posted to the wrong newsgroup. This has nothing to do
with XSD...
lanz wrote:
> Hi,
>
>
> I am trying to run this Ant file.
>
> <project name="PruebaHibernate" default="run">
> <target name="init">
> <project name="src.dir" value="src" />
> <project name="classes.dir" value="bin" />
> <project name="lib.dir" value="lib" />
> <project name="mainclass"
> value="mx.uam.hibernate.ManejadorLibro" />
> <path id="classpath">
> <pathelement location="${classes.dir}" />
> <fileset dir="${lib.dir}">
> <include name="*.jar" />
> </fileset>
> </path>
> </target>
> <target name="prepare" depends="init">
> <mkdir dir="${classes.dir}" />
> <mkdir dir="${lib.dir}" />
> </target>
> <target name="compile" depends="copy-resources">
> <javac srcdir="${src.dir}" destdir="${classes.dir}">
> <classpath refid="classpath" />
> </javac>
> </target>
> <target name="copy-resources" depends="prepare">
> <copy todir="${classes.dir}">
> <fileset dir="${src.dir}">
> <exclude name="**/*.java" />
> </fileset>
> </copy>
> </target>
> <target name="run" depends="compile">
> <java classname="${mainclass}" fork="true">
> <arg value="agrega" />
> <arg value="Tutorial" />
> <arg value="IngSW" />
> <classpath refid="classpath" />
> </java>
> </target>
> </project>
>
> ------------
>
> But unfortunately it doesn´t run. If gices me the following error:
> (the error is in the line underlined in bold)
>
> BUILD FAILED
>
> C:\Documents and
> Settings\egoitz\workspace\PruebaHibernate\build.xml:3: Problem: failed
> to create task or type project
>
> 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.
>
> ----------------
>
> I would be very grateful if anybody would tell me how to solved it.
>
> Thanks with anticipation
>
> Regards
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03307 seconds