epugh       2004/07/25 06:49:38

  Modified:    hibernate/src/plugin-test/src/main hibernate.cfg.xml
               hibernate/src/main/org/apache/maven/hibernate/beans
                        SchemaExportBean.java
               hibernate/xdocs changes.xml
               hibernate/src/plugin-test maven.xml project.xml
  Log:
  MPHIBERNATE-10 maven-hibernate ignores the "config" attribute
  
  Revision  Changes    Path
  1.2       +2 -2      
maven-plugins/hibernate/src/plugin-test/src/main/hibernate.cfg.xml
  
  Index: hibernate.cfg.xml
  ===================================================================
  RCS file: 
/home/cvs/maven-plugins/hibernate/src/plugin-test/src/main/hibernate.cfg.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- hibernate.cfg.xml 23 Jul 2004 10:35:13 -0000      1.1
  +++ hibernate.cfg.xml 25 Jul 2004 13:49:38 -0000      1.2
  @@ -10,13 +10,13 @@
   
       <session-factory>
   
  -    <property name="connection.driver_class">oracle.jdbc.OracleDriver</property>
  +    <property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
       <property name="connection.url">jdbc:hsqldb:.</property>
       <property name="connection.username">sa</property>
       <property name="connection.password"></property>
       <property name="connection.pool_size">0</property>
       <property name="show_sql">false</property>
  -    <property name="dialect">org.hsqldb.jdbcDriver</property>        
  +    <property name="dialect">net.sf.hibernate.dialect.HSQLDialect</property>        
       
       <mapping resource="org/apache/maven/hibernate/Item.hbm.xml"/>  
       
  
  
  
  1.7       +12 -13    
maven-plugins/hibernate/src/main/org/apache/maven/hibernate/beans/SchemaExportBean.java
  
  Index: SchemaExportBean.java
  ===================================================================
  RCS file: 
/home/cvs/maven-plugins/hibernate/src/main/org/apache/maven/hibernate/beans/SchemaExportBean.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SchemaExportBean.java     23 Jul 2004 10:35:13 -0000      1.6
  +++ SchemaExportBean.java     25 Jul 2004 13:49:38 -0000      1.7
  @@ -202,17 +202,16 @@
         ClassLoader oldClassLoader = currentThread.getContextClassLoader();
         try
         {
  -             if (getConfig() == null){
  -                 File [] baseDirs = getBaseDirs ();
  -                 URL  [] urls = new URL [baseDirs.length];
  -                 for (int i = 0; i < urls.length; i++) { 
  -                         urls [i] = baseDirs [i].toURL ();
  -                 }
  -             
  -            URLClassLoader newClassLoader =
  -              new URLClassLoader(urls, getClass().getClassLoader());
  -            currentThread.setContextClassLoader(newClassLoader);
  -             }
  +         File [] baseDirs = getBaseDirs ();
  +         URL  [] urls = new URL [baseDirs.length];
  +         for (int i = 0; i < urls.length; i++) { 
  +                 urls [i] = baseDirs [i].toURL ();
  +         }
  +     
  +        URLClassLoader newClassLoader =
  +          new URLClassLoader(urls, getClass().getClassLoader());
  +        currentThread.setContextClassLoader(newClassLoader);
  +    
           Configuration cfg = getConfiguration();
           SchemaExport schemaExport = getSchemaExport(cfg);
   
  @@ -240,7 +239,7 @@
         if (getConfig() != null)
         {              
                 File f = new File(getConfig());
  -              LOG.debug("File" + f.getAbsolutePath());
  +              LOG.debug("Hibernate Configuration File: " + f.getAbsolutePath());
            cfg.configure(f);
         }
   
  
  
  
  1.19      +1 -0      maven-plugins/hibernate/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/hibernate/xdocs/changes.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- changes.xml       23 Jul 2004 10:02:16 -0000      1.18
  +++ changes.xml       25 Jul 2004 13:49:38 -0000      1.19
  @@ -25,6 +25,7 @@
     </properties>
     <body>
       <release version="1.2-SNAPSHOT" date="in CVS">
  +      <action dev="epugh" type="fix" issue="MPHIBERNATE-10" due-to="Henning 
Schmiedehausen">maven-hibernate ignores the "config" attribute</action>
         <action dev="epugh" type="fix" issue="MPHIBERNATE-11" due-to="Henning 
Schmiedehausen">maven-hibernate needs cglib when sending SQL directly to the 
database</action>
         <action dev="epugh" type="fix" issue="MPHIBERNATE-7" due-to="Dion 
Gillard">Unit tests only functioned from the /src/plugin-test directory.  plugin:test 
fails</action>
         <action dev="epugh" type="add" issue="MPHIBERNATE-6" due-to="Alex 
Shnyderman">New aggregate-mappings goal to aggregate multiple .hbm files into one 
file.</action>
  
  
  
  1.5       +3 -1      maven-plugins/hibernate/src/plugin-test/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/hibernate/src/plugin-test/maven.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- maven.xml 23 Jul 2004 10:35:13 -0000      1.4
  +++ maven.xml 25 Jul 2004 13:49:38 -0000      1.5
  @@ -22,12 +22,13 @@
            xmlns:maven="jelly:maven"
            xmlns:x="jelly:xml">
            
  -  <goal name="testPlugin" 
prereqs="test-hibernate-schema-export-properties,test-hibernate-aggregate-mappings">
  +  <goal name="testPlugin" 
prereqs="test-hibernate-schema-export-properties,test-hibernate-schema-export-configuration,test-hibernate-aggregate-mappings">
       <attainGoal name="clean"/>
     </goal>
     
     <goal name="test-hibernate-schema-export-properties">
       <j:set var="maven.hibernate.properties" 
value="${basedir}/src/main/hibernate.properties" />    
  +    <attainGoal name="clean"/>
       <attainGoal name="jar"/>
       <attainGoal name="hibernate:schema-export"/>
       
  @@ -37,6 +38,7 @@
     
     <goal name="test-hibernate-schema-export-configuration">
       <j:set var="maven.hibernate.config" 
value="${basedir}/target/classes/hibernate.cfg.xml" />    
  +    <attainGoal name="clean"/>
       <attainGoal name="jar"/>
       <attainGoal name="hibernate:schema-export"/>
       
  
  
  
  1.3       +19 -0     maven-plugins/hibernate/src/plugin-test/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/hibernate/src/plugin-test/project.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- project.xml       2 Jul 2004 07:32:53 -0000       1.2
  +++ project.xml       25 Jul 2004 13:49:38 -0000      1.3
  @@ -60,6 +60,7 @@
         <version>20030211.142705</version>
         <url>http://jakarta.apache.org/commons/jelly/libs/xml/</url>
       </dependency>
  +  
         
       <dependency>
         <groupId>hsqldb</groupId>
  @@ -68,6 +69,24 @@
         <type>jar</type>
       </dependency>
     
  +    <dependency>
  +      <groupId>hibernate</groupId>
  +      <artifactId>hibernate</artifactId>
  +      <version>2.1.3</version>
  +      <type>jar</type>
  +    </dependency>    
  +    <dependency>
  +      <groupId>cglib</groupId>
  +      <artifactId>cglib</artifactId>
  +      <version>2.0.2</version>
  +      <type>jar</type>
  +    </dependency>
  +    <dependency>
  +      <groupId>dom4j</groupId>
  +      <artifactId>dom4j</artifactId>
  +      <version>1.4</version>
  +      <type>jar</type>
  +    </dependency>  
     </dependencies>
     
     <build>
  
  
  

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

Reply via email to