Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Ant Problem - failed to create task or type project
Ant Problem - failed to create task or type project [message #634853] Sun, 24 October 2010 16:50 Go to next message
lanz  is currently offline lanz Friend
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 Go to previous message
Ed Merks is currently offline Ed MerksFriend
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/
Previous Topic:Cross-referencing namespaces & schemas
Next Topic:XSD comparer
Goto Forum:
  


Current Time: Fri Jan 24 14:36:59 GMT 2025

Powered by FUDForum. Page generated in 0.03307 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top