Hello Lakshman

Sorry for not answering before, was out of town. Well I found some issues
with the dependencies of the plugin that I'm going as soon as I get some
free time. But basically the idea behind hbm2java goal is that it would look
for *.hbm.xml files in the classpath (target/classes) and then go ahead to
create the java files. So to begin with you have to take into account that
the plugin was created more as a command plugin than a lifecycle one so the
command to run hbm2java without modifying the lifecycles or having
executions and assuming your *.hbm.xml files are under your
/src/java/resources directory would be:

mvn clean resources:resources hibernate3:hbm2java

[clean] delete target directory
[resources:resources] copy my *.hbm.xml files to my target directory
[hibernate3:hbm2java] and now the hibernate plugin knows where to find your
hibernate mapping files so go ahead and create the java source files

Hope that helps, please let me know if you need any other help.

Regards

Johann Reyes



-----Original Message-----
From: Lakshman Srilakshmanan
[mailto:[EMAIL PROTECTED] 
Sent: Monday, August 14, 2006 9:37 PM
To: Cristian Jansenson
Cc: Maven Users List
Subject: RE: Hibernate plugin not binding?

Hi Cristian

Thanks for providing me with your feedback.

I did finally solve this problem by downloading and compiling it locally.

http://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/maven-hibernate3/hi
bernate3-maven-plugin/

my pom.xml is setup as follows

  <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate</artifactId>
            <version>3.1.2</version>
        </dependency>
        <dependency>
            <groupId>hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <version>1.8.0.4</version>
        </dependency>
  </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>hibernate3-maven-plugin</artifactId>
                <version>1.0-SNAPSHOT</version>
                <executions>
                    <execution>
                        <id>generate-hibernate</id>
                        <phase>generate-sources</phase>
                        <configuration>
                            <hibernate>
 
<configurationFile>/src/main/resources/hibernate.cfg.xml</configurationF
ile>
                            </hibernate>
                            <outputDirectory>
 
<hbm2cfgxml>src/main/resources</hbm2cfgxml>
 
<hbm2java>target/hibernate3/generated-sources</hbm2java>
                            </outputDirectory>
                        </configuration>
                        <goals>
                            <goal>hbm2java</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <extensions>
            <extension>
                <groupId>hsqldb</groupId>
                <artifactId>hsqldb</artifactId>
                <version>1.8.0.4</version>
            </extension>
        </extensions>
    </build>


Hope it helps :)

Thanks
Lakshman


> -----Original Message-----
> From: Cristian Jansenson [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 15 August 2006 11:07 AM
> To: Lakshman Srilakshmanan
> Subject: RE: Hibernate plugin not binding?
> 
> No problem...  and I didn't resolve this problem.  My understanding on
this
> issue is that, as of the date I reported it, it was not resolved.
> Furthermore, some people informally solved the problem by modifying
the
> plugin; However, they didn't submit the fix because it was a hack more
than
> a real fix.  I suspect this issue will be addressed with the official 
> version of the pluggin.
> 
> Cristian
> 
> -----Original Message-----
> From: Lakshman Srilakshmanan
> [mailto:[EMAIL PROTECTED]
> Sent: Sunday, August 13, 2006 8:10 PM
> To: [EMAIL PROTECTED]
> Subject: Hibernate plugin not binding?
> 
> Hi Cristian
> 
> Sorry for contacting you directly, but did you resolve the above issue
> 
> I have included a link to the above problem you raised for your 
> convenience.
> http://www.mail-archive.com/[email protected]/msg41711.html
> 
> 
> Your assistance is greatly appreciated.
> 
> Thanks
> Lakshman
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to