-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Error while dealing with middlegen and ant
PostPosted: Thu Jan 05, 2006 9:50 am 
Newbie

Joined: Thu Jan 05, 2006 9:42 am
Posts: 2
I have written a build.xml. But when run with ant it shows following error :

buildfile : build.xml
BUILD Failed
Target 'build' does not exist in the project.



The build file is --:


<project name="alohanhiber" default="build" basedir=".">
<target
name="middlegen"
description="Run Middlegen"
unless="middlegen.skip"
>
<path id="hibernate.classpath">
<fileset dir="C:\gaurav\middlegen-2.1">
<include name="**/*.jar"/>
</fileset>
</path>

<mkdir dir="c:/gaurav/Filters"/>
<taskdef
name="middlegen"
classname="middlegen.MiddlegenTask"
classpathref="hibernate.classpath"
/>
<middlegen
appname="alohanhiber"
prefsdir=""
gui="true"
databaseurl="jdbc:microsoft:sqlserver://gauravrahi;database=Alohanet"
driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
username="sa"
password="sa"
>
<table name="AlohaLog" />
<table name="DBR" />
<table name="GroupData" />
<table name="Page" />
<table name="PagePrivilegeXref" />
<table name="Privilege" />
<table name="Role" />
<table name="RolePrivilegeXref" />
<table name="UserInfo" />
<table name="UserRoleXref" />

<!-- Plugins -->
<hibernate
destination="c:\gaurav\Filters"
package="${name}.hibernate"
javaTypeMapper="middlegen.plugins.hibernate.HibernateJavaTypeMapper"
/>
</middlegen>
<mkdir dir="c:\gaurav\Filters"/>
</target>

<target name="hbm2java"

description="Generate .java from .hbm files." >

<path id="hibernate.classpath">
<fileset dir="C:\gaurav\middlegen-2.1">
<include name="**/*.jar"/>
</fileset>
</path>
<property name="build.generate.dir" location="C:/gaurav/mapper"/>
<mkdir dir="${build.generate.dir}"/>
<taskdef
name="hbm2java"
classname="net.sf.hibernate.tool.hbm2java.Hbm2JavaTask"
classpathref="hibernate.classpath"
/>
<hbm2java output="${build.generate.dir}" classpathref="hibernate.classpath">
<fileset dir="c:/gaurav/Filters">
<include name="**/*.hbm.xml"/>
</fileset>
</hbm2java>
</target>

</project>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 05, 2006 9:53 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
? your target is named middlegen, not build.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


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

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.