guchenbo / simple-build-tool

Automatically exported from code.google.com/p/simple-build-tool
Other
0 stars 0 forks source link

Missing dependency error while building with SBT #159

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem (please be specific)?
- clone the following project https://github.com/jlcanela/SbtMissingDependency
- download the file ICEpdf-pro-4.2.0-bin-trial.zip from 
http://www.icepdf.org/downloads.html 
   (sorry, due to license issue I cannot provide the jar used for this project)
- place the content of lib folder of the archive to lib directory
- 'sbt clean compile'

What is the expected behavior? What do you see instead?

expected behaviour : the project is compiled with success
current behaviour : 
[error] error while loading GlyphText, Missing dependency 'class 
java.awt.geom.Rectangle2D$Float', required by 
/private/tmp/SbtMissingDependency/lib/icepdf-core.jar(org/icepdf/core/pobjects/g
raphics/text/GlyphText.class)

What versions of the following are you using?

Java:
ava version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode)

Scala:
build.scala.versions=2.8.0

sbt:
sbt.version=0.7.4

Operating system:
Darwin xxx.local 10.7.1 Darwin Kernel Version 10.7.1: Mon Jan 31 14:55:53 PST 
2011; root:xnu-1504.10.48~4/RELEASE_X86_64 x86_64

Please provide any additional information below.
As its possible to build the source directly with scalac, I think the problem 
is related to sbt :
- when building with scalac (build-with-scalac.sh), it works
- when building with only ONE scala source file, it works
- when building with IcePdf non-trial version, it works

Original issue reported on code.google.com by jlcane...@gmail.com on 31 Mar 2011 at 8:46

GoogleCodeExporter commented 9 years ago
The error is generated at scala compiler level, but only when invoked from SBT 
and with BOTH scala source files provided. 

Original comment by jlcane...@gmail.com on 31 Mar 2011 at 8:59

GoogleCodeExporter commented 9 years ago
I need a test case with unrestricted access to dependencies, sorry.  In 
general, "Missing dependency" errors are not sbt bugs, but just the compiler 
requiring all classes on the classpath (including transitive dependencies).  It 
may be triggered by sbt forcing more types to be read, but it would still not 
be an sbt bug.  If all classes are on the classpath, it is likely a compiler 
issue.

Original comment by dmhar...@gmail.com on 22 Apr 2011 at 2:08