I just tried to use joda time 2.0 (from the maven repo) with scala
2.9.0-1. It seems that the compiler can't analyze the lib:
[INFO] ...: info: compiling
[INFO] Compiling 3 source files to .../target/classes at 1312527976035
[ERROR] error: error while loading DateTime, Missing dependency 'class
org.joda.convert.FromString', required by
/Users/kriesten/.m2/repository/joda-time/joda-time/2.0/joda-time-2.0.jar(org/joda/time/DateTime.class)
[ERROR] error: error while loading AbstractInstant, Missing dependency
'class org.joda.convert.ToString', required by
/Users/kriesten/.m2/repository/joda-time/joda-time/2.0/joda-time-2.0.jar(org/joda/time/base/AbstractInstant.class)
[ERROR] .../Converter.scala:20: error: org.joda.time.DateTime does not
have a constructor
[INFO] new DateTime( date )
[INFO] ^
[ERROR] three errors found
This works fine with joda time 1.6.2. I double checked the 2.0 jar is
ok, also, the files can be decompiled fine using jad.
Any hint what might go wrong here?
Best regards, --- Jan.
<dependency>
<groupId>org.joda</groupId>
<artifactId>joda-convert</artifactId>
<version>1.1</version>
</dependency>
The Scala compiler requires that all classes referenced in signatures
of classes that you use are also available on the compile time
classpath.
-jason
[1] http://search.maven.org/remotecontent?filepath=joda-time/joda-time/2.0/joda-time-2.0.pom
You only need it at compile time, use the "provided" scope in Maven for that.
-jason
<dependency>
<groupId>org.joda</groupId>
<artifactId>joda-convert</artifactId>
<version>1.1</version>
</dependency>
-jason