Hi Johann,

On 12/8/06, Johann Reyes <[EMAIL PROTECTED]> wrote:
Hello Kostis

Were you able to build the plugin? I would recommend for the moment to
remove those 2 tests that are failing to be able to build the plugin
successfully.
...
I'll install gentoo later in my box to try to reproduce the errors that you
are getting with tests.

I'm building the plugin using -Dmaven.test.skip.
I apologize for not taking the time to investigate the error my self.


I don't see the new output that tells what naming strategy is
running. Also if you were able to build the plugin successfully, then can
you send the part of your pom where you are configuring the plugin?

You were right about the version.  I was using my private copy.
After i used the latest, i got the warning:

INFO: Bytecode provider name : cglib
8 Δεκ 2006 7:03:07 μμ org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
[ERROR] Couldn't resolve org.hibernate.cfg.ImprovedNamingStrategy
[INFO] src/main/resources/hibernate.cfg.xml not found within the
project. Trying absolute path.
[INFO] No hibernate configuration file loaded.
[INFO] Configuration Properties file loaded:
/home/kana/work/Larysi/mod_xml/src/main/config/database.properties



I then tried adding the hibernate dependency (that contains the
required class) but it didn't help either.

The plugin config is similar to the one you gave me back - it just
uses an extra dependency to the hyperjaxb2 library:

     <plugin>
       <groupId>org.codehaus.mojo</groupId>
       <artifactId>hibernate3-maven-plugin</artifactId>
       <executions>
         <execution>
           <id>export-db-schema</id>
           <phase>process-classes</phase>
           <goals>
             <goal>hbm2ddl</goal>
           </goals>
           <configuration>
             <configurationTaskProperties>
               <outputfilename>frepor-ddl.sql</outputfilename>
               <propertyfile>src/main/config/database.properties</propertyfile>
             </configurationTaskProperties>
           </configuration>
         </execution>
       </executions>

       <configuration>
         <configurationTaskProperties>
           <drop>true</drop>
           <export>false</export>
           <format>true</format>
           
<namingstrategy>org.hibernate.cfg.ImprovedNamingStrategy</namingstrategy>
         </configurationTaskProperties>

         <goals>
           <goal>
             <name>hbm2ddl</name>
             <implementation>configuration</implementation>
           </goal>
         </goals>
       </configuration>

       <dependencies>
         <dependency>
           <groupId>org.jvnet.hyperjaxb2</groupId>
           <artifactId>hyperjaxb2-shared</artifactId>
           <version>0.5.1</version>
         </dependency>
     </plugin>


I have also a comment regarding the JIRA issue:
http://jira.codehaus.org/browse/MOJO-489
for problems when log4j library is included in the dependencies.

Since i'm using the hj2 library which has a transitive dependency to
log4j, the commons-logging of hibernate thinks that is should use it,
and logs into non-existent log4j categories.

The solution would be to include a 'commons-logging.properties' file
into the classpath having just a single property:
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger

See this for an explanation:
http://jakarta.apache.org/commons/logging/guide.html#Configuration

I will update the issue about the proposed solution.


Regards,
 Kostis

Reply via email to