2012-01-02 9 views
0

私はEnvers用の休止状態のスキーマジェネレータを組み込もうとしています。 私はこのターゲットを追加しました:EnversHibernateToolTask​​(NetBeanビルドファイルの問題あり)

<target name="schemaexport" 
     description="Exports a generated schema to DB and file"> 
    <path id="hibernate.classpath"> 
     <pathelement path="./lib/hibernate-persistence/*.jar" /> 
    </path> 
    <taskdef name="hibernatetool" 
      classname="org.hibernate.tool.ant.EnversHibernateToolTask" 
      classpathref="hibernate.classpath"/> 

    <hibernatetool destdir="."> 
     <classpath> 
      <fileset refid="lib.hibernate" /> 
      <path location="${build.demo.dir}" /> 
      <path location="${build.main.dir}" /> 
     </classpath> 
     <jpaconfiguration persistenceunit="AuroraServicePU" /> 
     <hbm2ddl 
      drop="false" 
      create="true" 
      export="false" 
      outputfilename="versioning-ddl.sql" 
      delimiter=";" 
      format="true"/> 
    </hibernatetool> 
</target> 

問題は、私は休止状態でmyproject \ libに\ [ のtaskdefクラスorg.hibernate.tool.ant.EnversHibernateToolTask​​は、クラスローダのAntClassLoaderを使用して を見つけることができないエラーを取得するということです-persistence * .jar]

ヘルプは素晴らしいでしょう。

ありがとう、 Ido。

答えて

0

あなたのパスが間違っていると思われます。 pathelementでワイルドカードを使用できるとは思いません。 -vタグでアリを実行し、

<path id="hibernate.classpath"> 
    <fileset dir="lib"> 
     <include name="**/*.jar"/> 
    </fileset> 
</path> 

それが失敗した場合、よりヒントのデバッグをご確認ください:

があるためにあなたのpathを変更してみてください。

関連する問題