You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Lonnie Lewis <lo...@hp.com> on 2011/11/29 15:35:20 UTC
generate-test-resources lifecycle question
I am working on a simple prototype project that involves (re)creating an HSQL
database from JPA objects. The build works fine, but I notice the tasks in
"generate-test-resources" are run multiple times.
My build includes:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>generate-db</id>
<phase>generate-test-resources</phase>
<goals>
<goal>hbm2ddl</goal>
</goals>
<configuration>
<components>
<component>
<name>hbm2ddl</name>
<implementation>jpaconfiguration</implementation>
</component>
</components>
<componentProperties>
<persistenceunit>demo</persistenceunit>
<outputfilename>schema.ddl</outputfilename>
<drop>false</drop>
<create>true</create>
<export>true</export>
<format>true</format>
</componentProperties>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<configuration>
<components>
<component>
<name>hbm2ddl</name>
<implementation>jpaconfiguration</implementation>
</component>
</components>
<componentProperties>
<persistenceunit>demo</persistenceunit>
<outputfilename>schema.ddl</outputfilename>
<drop>false</drop>
<create>true</create>
<export>true</export>
<format>true</format>
</componentProperties>
</configuration>
</plugin>
Which is being executed 8 times in the build. Is that supposed to happen? We
are required to use a parent POM by the customer, and I don't really know
what it is doing. Could that be causing a problem?
Is there a way to display the lifecycle goals as the build is progressing?
--
View this message in context: http://maven.40175.n5.nabble.com/generate-test-resources-lifecycle-question-tp5032543p5032543.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: generate-test-resources lifecycle question
Posted by Lonnie Lewis <lo...@hp.com>.
The processing that I am writing about is not in the parent POM, it is in my
"child" POM.
--
View this message in context: http://maven.40175.n5.nabble.com/generate-test-resources-lifecycle-question-tp5032543p5040180.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: generate-test-resources lifecycle question
Posted by Zilvinas Vilutis <ci...@gmail.com>.
Basically parent pom defines the project ( modules ) and rules for all
child poms that will be applied for each of the children, so you would
not need to re-write them ( e.g. dependency versions, plugin versions,
plugin execution & etc. )
Did you define this in your parent pom?
Žilvinas Vilutis
Mobile: (+1) 623 330 6048
E-mail: cikasfm@gmail.com
On Tue, Nov 29, 2011 at 7:35 AM, Lonnie Lewis <lo...@hp.com> wrote:
> I am working on a simple prototype project that involves (re)creating an HSQL
> database from JPA objects. The build works fine, but I notice the tasks in
> "generate-test-resources" are run multiple times.
>
> My build includes:
>
>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>hibernate3-maven-plugin</artifactId>
> <version>2.2</version>
> <executions>
> <execution>
> <id>generate-db</id>
> <phase>generate-test-resources</phase>
> <goals>
> <goal>hbm2ddl</goal>
> </goals>
> <configuration>
> <components>
> <component>
> <name>hbm2ddl</name>
> <implementation>jpaconfiguration</implementation>
> </component>
> </components>
> <componentProperties>
> <persistenceunit>demo</persistenceunit>
> <outputfilename>schema.ddl</outputfilename>
> <drop>false</drop>
> <create>true</create>
> <export>true</export>
> <format>true</format>
> </componentProperties>
> </configuration>
> </execution>
> </executions>
> <dependencies>
> <dependency>
> <groupId>org.hsqldb</groupId>
> <artifactId>hsqldb</artifactId>
> <version>2.0.0</version>
> <scope>compile</scope>
> </dependency>
> </dependencies>
> <configuration>
> <components>
> <component>
> <name>hbm2ddl</name>
> <implementation>jpaconfiguration</implementation>
> </component>
> </components>
> <componentProperties>
> <persistenceunit>demo</persistenceunit>
> <outputfilename>schema.ddl</outputfilename>
> <drop>false</drop>
> <create>true</create>
> <export>true</export>
> <format>true</format>
> </componentProperties>
> </configuration>
> </plugin>
>
> Which is being executed 8 times in the build. Is that supposed to happen? We
> are required to use a parent POM by the customer, and I don't really know
> what it is doing. Could that be causing a problem?
>
> Is there a way to display the lifecycle goals as the build is progressing?
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/generate-test-resources-lifecycle-question-tp5032543p5032543.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org