Discussion:
outputDirectory for hibernate3-maven-plugin not working properly
ikumar
2008-01-10 19:54:57 UTC
Permalink
Hi,
I am using the maven plugin to generate java pojo's from hibernate mapping
files(hbm.xml).
Here is the plugin details in pom.xml.

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.0-alpha-2</version>
<configuration>
<hibernate>

<configurationFile>/src/main/resources/hibernate.cfg.xml</configurationFile>
</hibernate>
<outputDirectory>
<hbm2java>src/main/java</hbm2java>
</outputDirectory>
</configuration>
</plugin>

When i run "mvn hibernate3:hbm2java" command, the POJO's are created but in
the target folder "target/src/java" not in the src folder "src/main/java".
Can anyone tell me what the problem is?
--
View this message in context: http://www.nabble.com/outputDirectory-for-hibernate3-maven-plugin-not-working-properly-tp14742354s177p14742354.html
Sent from the Maven - Users mailing list archive at Nabble.com.
Johann Reyes
2008-01-21 15:22:26 UTC
Permalink
Hello Ikumar

Your pom is not well configured. The correct syntax would be:

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.0</version>
<configuration>
<components>
<component>
<name>hbm2java</name>
<outputDirectory>src/main/java</outputDirectory>
</component>
</components>
</configuration>
</plugin>



Regards

Johann Reyes
Andrew Williams
2008-01-23 23:53:42 UTC
Permalink
Fear not Ikumar - I made the same mistake, the docs are very
misleading (in fact, multiple formats are used in one page)...

Andy
Post by Johann Reyes
Hello Ikumar
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.0</version>
<configuration>
<components>
<component>
<name>hbm2java</name>
<outputDirectory>src/main/java</outputDirectory>
</component>
</components>
</configuration>
</plugin>
Regards
Johann Reyes
Loading...