Pessoal estou seguindo o manual do hibernate em portugues que achei na net, para fazer minha primeira aplicação utilizando esse framework, só que começou ja me dando dor de cabeça rsrsrs, vou postar ai o arquivo xml e o problema pra ver se alguém me da uma luz..
<project name="hibernate-tutorial" default="compile">
<property name="sourcedir" value="${basedir}/src"/>
<property name="targetdir" value="${basedir}/bin"/>
<property name="librarydir" value="${basedir}/lib"/>
<path id="libraries">
<fileset dir="${librarydir}">
<include name="*.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="${targetdir}"/>
<mkdir dir="${targetdir}"/>
</target>
<target name="compile" depends="clean, copy-resources">
<javac srcdir="${sourcedir}"
destdir="${targetdir}"
classpathref="libraries"/>
</target>
<target name="copy-resources">
<copy todir="${targetdir}">
<fileset dir="${sourcedir}">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
</project>
e quando eu compilo ele da o seguinte erro..
clean:
Deleting directory C:\WORK_NETBEANS\HibernateTeste\src\bin
Created dir: C:\WORK_NETBEANS\HibernateTeste\src\bin
copy-resources:
C:\WORK_NETBEANS\HibernateTeste\src\build.xml:20: C:\WORK_NETBEANS\HibernateTeste\src\src not found.
FALHA NA CONSTRUÇÃO (tempo total: 0 segundos)
será que alguém poderia me ajudar..ja instalei o ant e tudo mais...mas não consigo achar o erro ele me aponta que o erro é nessa linha aqui ...
<copy todir="${targetdir}">
fico no aguardo
estou usando o postgres sql, os dois outros arquivos xml necessário segue abaixo..o Event.hbm.xml e o hibernate.cfg.xml
hibernate.cfg.xml
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="connection.url">jdbc:postgresql://localhost:5432/testa_hibernate</property>
<property name="connection.username">postgres</property>
<property name="connection.password">mysenha</property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<!-- Drop and re-create the database schema on startup -->
<property name="hbm2ddl.auto">create</property>
<mapping resource="events/Event.hbm.xml"/>
</session-factory>
</hibernate-configuration>
e o Event.hbm.xml
<hibernate-mapping>
<class name="events.Event" table="EVENTS">
<id name="id" column="EVENT_ID">
<generator class="native"/>
</id>
<property name="date" type="timestamp" column="EVENT_DATE"/>
<property name="title"/>
</class>
</hibernate-mapping>