Java 如何防止hibernate3 maven插件HBM2DDL打印到控制台

Java 如何防止hibernate3 maven插件HBM2DDL打印到控制台,java,maven,hbm2ddl,hibernate3,Java,Maven,Hbm2ddl,Hibernate3,我使用hibernate3 maven插件自动创建了一个SQL脚本,可以用来在新数据库中创建数据库模式。我通过hbm2ddl工具来实现这一点。我认为,当我指示它将SQL写入一个文件时,它将不再用50页的SQL凌乱我的maven构建。要让它停止写入控制台而只写入文件吗?找不到答案 将此添加到此插件的配置中: <componentProperties> ... <console>false</console> ... </componentPro

我使用hibernate3 maven插件自动创建了一个SQL脚本,可以用来在新数据库中创建数据库模式。我通过hbm2ddl工具来实现这一点。我认为,当我指示它将SQL写入一个文件时,它将不再用50页的SQL凌乱我的maven构建。要让它停止写入控制台而只写入文件吗?找不到答案

将此添加到此插件的配置中:

<componentProperties>
  ...
  <console>false</console>
  ...
</componentProperties>

...
假的
...

org.codehaus.mojo
hibernate3 maven插件
3
创建模式
过程测试资源
跑
有一个名为“console”的属性,您只需将其设置为“false”

<plugin>
            <!-- run "mvn hibernate3:hbm2ddl" to generate a schema -->
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>hibernate3-maven-plugin</artifactId>
            <version>3.0</version>
            <executions>
                <execution>
                    <id>create-schema</id>
                    <phase>process-test-resources</phase>
                    <goals>
                        <goal>run</goal>
                    </goals>
                    <configuration>
                        <hibernatetool>
                            <classpath>
                                <path location="${project.build.directory}/classes" />
                                <path location="${project.basedir}/src/main/resources" />
                            </classpath>

                            <configuration configurationfile="${project.basedir}/src/main/resources/hibernate.cfg.xml"></configuration>
                            <hbm2ddl create="true" export="false" console="false" destdir="${project.basedir}/target" drop="true" outputfilename="mysql.sql" format="true" />
                        </hibernatetool>
                    </configuration>
                </execution>
            </executions>
        </plugin>