I ran mvn -U and got the latest snapshot. However, it still seems to
have an issue scanning JARs.
[INFO] [hibernate3:hbm2ddl {execution: default}]
[INFO] src/main/resources/hibernate.cfg.xml not found within the
project. Trying absolute path.
[INFO] No hibernate configuration file loaded.
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] error trying to scan <jar-file>: file:/C:/Documents and
Settings/mraible/.m2/repository/org/s
pringframework/spring-mock/2.0.1/spring-mock-2.0.1.jar
Illegal character in path at index 18: file:/C:/Documents and
Settings/mraible/.m2/repository/org/sp
ringframework/spring-mock/2.0.1/spring-mock-2.0.1.jar
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.RuntimeException: error trying to scan <jar-file>:
file:/C:/Documents and Settings/mraible
/.m2/repository/org/springframework/spring-mock/2.0.1/spring-mock-2.0.1.jar
at
org.codehaus.mojo.hibernate3.configuration.AnnotationComponentConfiguration.scanForClasse
s(AnnotationComponentConfiguration.java:112)
at
org.codehaus.mojo.hibernate3.configuration.AnnotationComponentConfiguration.createConfigu
ration(AnnotationComponentConfiguration.java:70)
at
org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfiguration.getConfiguratio
n(AbstractComponentConfiguration.java:32)
at
org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(Hbm2DDLExporterMojo.j
ava:87)
Matt
On 12/20/06, Johann Reyes <[EMAIL PROTECTED]> wrote:
Hello Matt
Yes, that is something that I fixed today in SVN. I just deployed again the
snapshot, so try it again.
Regards
Johann Reyes
-----Original Message-----
From: Matt Raible [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 20, 2006 9:10 PM
To: [email protected]
Subject: Re: [mojo-user] Scanning JARs with Hibernate3 Maven Plugin
I tried switching from defining annotated class in hibernate.cfg.xml
to defining them in my sessionFactory (with your change suggested
below). The error below is something I believe you fixed today in
SVN, correct?
[INFO] [hibernate3:hbm2ddl {execution: default}]
[INFO] src/main/resources/hibernate.cfg.xml not found within the
project. Trying absolute path.
[INFO] No hibernate configuration file loaded.
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] error trying to scan <jar-file>: file:/C:/Documents and
Settings/mraible/.m2/repository/org/s
pringframework/spring-mock/2.0.1/spring-mock-2.0.1.jar
Illegal character in path at index 18: file:/C:/Documents and
Settings/mraible/.m2/repository/org/sp
ringframework/spring-mock/2.0.1/spring-mock-2.0.1.jar
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.RuntimeException: error trying to scan <jar-file>:
file:/C:/Documents and Settings/mraible
/.m2/repository/org/springframework/spring-mock/2.0.1/spring-mock-2.0.1.jar
at
org.codehaus.mojo.hibernate3.configuration.AnnotationComponentConfiguration.
scanForClasse
s(AnnotationComponentConfiguration.java:112)
at
org.codehaus.mojo.hibernate3.configuration.AnnotationComponentConfiguration.
createConfigu
ration(AnnotationComponentConfiguration.java:70)
I tried to checkout and build locally, but I get:
[INFO]
The following documentation problems were found:
o Hibernate3 Maven Plugin (1 errors, 0 warnings)
[ERROR] Cannot reach scm with URL:
'https://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/ma
ven-hibernate3/hibernate3-maven-plugin'.
Error: sun.security.validator.ValidatorException: PKIX path building
failed: sun.security.provider.c
ertpath.SunCertPathBuilderException: unable to find valid
certification path to requested target
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] : documentation check
Documentation errors were found.
I'm using JDK 5 on XP.
Matt
On 12/20/06, Johann Reyes <[EMAIL PROTECTED]> wrote:
> Hello Matt
>
> If your annotated classes are found in a dependency jar you can try this:
>
> <componentProperties>
> <scan-jars>true</scan-jars>
> </componentProperties>
>
> Regards
>
> Johann Reyes
>
> PS also, Are you defining the annotated classes in hibernate.cfg.xml but
in
> a included jar?
>
>
> -----Original Message-----
> From: Matt Raible [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 20, 2006 8:43 PM
> To: [email protected]
> Subject: [mojo-user] Scanning JARs with Hibernate3 Maven Plugin
>
> I've found that the Hibernate3 Plugin requires I have a
> hibernate.cfg.xml, rather than definining my annotated classes in
> Spring. Is that still true with the 2.0-SNAPSHOT?
>
> My configuration currently is:
>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>hibernate3-maven-plugin</artifactId>
> <version>2.0-SNAPSHOT</version>
> <configuration>
> <components>
> <component>
> <name>hbm2ddl</name>
>
> <implementation>annotationconfiguration</implementation>
> </component>
> </components>
> <componentProperties>
> <jdk5>true</jdk5>
>
> <propertyfile>/target/test-classes/jdbc.properties</propertyfile>
> </componentProperties>
> </configuration>
> <executions>
> <execution>
> <phase>test-compile</phase>
> <goals>
> <goal>hbm2ddl</goal>
> </goals>
> </execution>
> </executions>
> <dependencies>
> <dependency>
> <groupId>${jdbc.groupId}</groupId>
> <artifactId>${jdbc.artifactId}</artifactId>
> <version>${jdbc.version}</version>
> </dependency>
> </dependencies>
> </plugin>
>
> Where my Spring sessionFactory is:
>
> <bean id="sessionFactory"
>
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactor
> yBean">
> <property name="dataSource" ref="dataSource"/>
> <property name="configLocation"
> value="classpath:hibernate.cfg.xml"/>
> <property name="hibernateProperties">
> <value>
> hibernate.dialect=${hibernate.dialect}
> hibernate.hbm2ddl.auto=update
> hibernate.query.substitutions=true 'Y', false 'N'
> </value>
> </property>
> </bean>
>
> Thanks,
>
> Matt
>
> --
> http://raibledesigns.com
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
--
http://raibledesigns.com
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
--
http://raibledesigns.com
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email