我想使用 ant 和 build.xml(源类 java 作为模型表)生成 derby 数据库?
在正常情况下(我的意思是发展阶段)。建造它我没有问题。只需右键单击 ant 文件并构建(使用 eclipse)生成数据库。
问题是当我遇到实现步骤时(在 linux 中)。
我正在使用 bin/ant -f build.xml 命令,但它不会生成并给出如下错误:
[HibernateTools] Executing Hibernate Tool with a Hibernate Annotation/EJB3 Configuration
[HibernateTools] 1. task: hbm2ddl (Generates database schema)
[HibernateTools] log4j:WARN No appenders could be found for logger (org.hibernate.cfg.annotations.Version).
[HibernateTools] log4j:WARN Please initialize the log4j system properly.
[HibernateTools] log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
构建成功但是我找不到文件数据库是什么?
有人有经验吗?
@ alonso 嗨,谢谢,我想是的,我尝试使用 -v 并给我这个:
[root@APPTTPDEV01 TimesheetEJB_jar]# /home/rpangemanan/apache-ant-1.7.0/bin/ant -v build.xml
Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: build.xml
Detected Java version: 1.6 in: /usr/java/jdk1.6.0_32/jre
Detected OS: Linux
parsing buildfile /home/rpangemanan/glassfish/domains/domain1/applications/j2ee-apps/Timesheet/TimesheetEJB_jar/build.xml with URI = file:/home/rpangemanan/glassfish/domains/domain1/applications/j2ee-apps/Timesheet/TimesheetEJB_jar/build.xml
Project base dir set to: /home/rpangemanan/glassfish/domains/domain1/applications/j2ee-apps/Timesheet/TimesheetEJB_jar
BUILD FAILED
Target "build.xml" does not exist in the project "HelloWorld".
at org.apache.tools.ant.Project.tsort(Project.java:1821)
at org.apache.tools.ant.Project.topoSort(Project.java:1729)
at org.apache.tools.ant.Project.topoSort(Project.java:1692)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)