Hi Benoit,

 

I noticed you have javassist as runtime scope - that means it would be
exported on the runtime classpath transitively which might not be what
you want, particularly as you are declaring a different version from
Hibernate.

 

Did you find a problem with the original patch I submitted? I see some
benefits in using Toolchains API over the compiler configuration due to
the risk of JDK API differences. Other than the above two differences
our patches are quite similar.

 

Regards Chris

 

From: Benoit Xhenseval [mailto:b...@appendium.com] 
Sent: 02 March 2010 20:50
To: Discussion of the Joda project
Subject: [SPAM] - Re: [Joda-interest] Joda-time and Hibernate 3.3.x -
Email found in subject

 

Ok, let's try to be concrete.

The latest release of joda-time-hibernate is version 1.2 and it is not
working with Hibernate 3.3.x, which has been released in 2008.
At least, I can confirm that it is not working with the Hibernate
Annotations.

I took the latest code from SVN and made a couple of changes, recompiled
and it is now working very nicely.

The changes are mainly due to changes in Hibernate, we now require more
dependencies, at least for testing:

1/ remove the hard coded executable path
 <!--<executable>C:\java\jdk1.4.2\bin\javac</executable>-->
 <!--<compilerVersion>1.4</compilerVersion>-->

The compiler should be:
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.1</version>
        <configuration>
          <verbose>true</verbose>
          <fork>true</fork>
          <source>1.4</source>
          <target>1.4</target>
        </configuration>
      </plugin>

This is the way to say that the source is JDK 1.4 and the target is also
1.4.

2/ Update the joda version to 1.6
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <version>1.6</version>
    </dependency>

    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
      <version>3.3.2.GA</version>
    </dependency>

The following ones are also required for tests, as you can see they are
limited to scope test/runtime and should no increase the dependencies.
Only by adding those can the unit tests run.

    <dependency>
      <groupId>javassist</groupId> 
      <artifactId>javassist</artifactId> 
      <version>3.11.0.GA</version> 
      <scope>runtime</scope> 
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId> 
      <artifactId>slf4j-log4j12</artifactId> 
      <version>1.5.9.RC1</version> 
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId> 
      <artifactId>slf4j-api</artifactId> 
      <version>1.5.9.RC1</version> 
      <scope>test</scope>
    </dependency>


I also added a repository, which should really be in your settings.xml
(it can be removed if you have the jars already)
(for Hibernate)

  <repositories>
   <repository>
    <id>jboss.repository</id> 
    <name>JBoss</name> 
    <url>http://repository.jboss.org/maven2</url> 
    </repository>
  </repositories>


I then do a "mvn clean package" and it the jar file works fine.

It would be very very useful to have a version 1.3 soon as, at the
moment, my build is based on a snapshot and I'm going to have my wrist
slapped for it... :-)

I enclose a patch.

I trust that this solution is a step in the right direction and should
be a good consensus for a version 1.3.

I hope this helps and that you will consider applying this.

Thanks

Benoit

On 2 March 2010 11:36, Stephen Colebourne <scolebou...@joda.org> wrote:

On 1 March 2010 20:16, Benoit Xhenseval <b...@appendium.com> wrote:
> I'd suggest to keep the dependencies to the bare minimum, eg if it the
> joda-time-hibernate works with version x; there is no need to change
the
> dependency to x+1.

...
> Having said that for Hibernate 3.3.2.GA (latest release, at least a
month
> ago) I *had* to recompile joda-time-hibernate and change the POM to:
> 1/ remove the hardcoded <executable>
> 2/ upgrade Hibernate to 3.3.2.GA
> 3/ ADD compile dependencies: javaassist 3.11.0.GA, maven-gpg-plugin,
slf4j

How is adding three specific dependencies (javassist, gpg and slf4j
minimal dependencies? Why can't maven just find these given the
hibernate version?

I've yet to see a proposal where everyone is happy...


> Now that you are joining OpenGamma (congrats!) may I hope for a more
regular
> release schedule to the maven central repository? Joda Time is SO
CRITICAL
> to many applications that new releases really, really ought to make it
> automatically to the central repository.

New releases of Joda-Time are on maven central. If they weren't I
wouldn't use maven at all. I generally spend more time on maven than
actually coding.

Stephen

------------------------------------------------------------------------
------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest




-- 
IMPORTANT NOTICE This communication contains information that is
considered confidential and may also be privileged . It is for the
exclusive use of the intended recipient(s). If you are not the intended
recipient(s) please note that any form of distribution, copying or use
of this communication or the information in it is strictly prohibited
and may be unlawful. If you have received this communication in error
please return it to the sender and delete the original.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to