Tom Cleghorn
unread,Oct 25, 2012, 5:37:06 AM10/25/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to epub...@googlegroups.com
Morning,
I'm trying to use epubcheck as a library
called from a simple class within an Ant build for automatic QA on generated
EPUBs; I'm informed that we can't easily update the version of Java on
the production environment that the build has to run on, so we need to
be able to run under 1.5.
When calling my class from Ant, the
build fails with "java.lang.UnsupportedClassVersionError: Bad version
number in .class file". I get the same when running the distributed
jar on its own ("java -jar epubcheck-3.0-RC-1.jar test.epub")
under 1.5, but not under 1.6. This led me to try compiling epubcheck under
JDK 1.5, but this fails with:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
(default-compile) on project epubcheck: Compilation failure
[ERROR] \local\devel\epubcheck-src-3.0-RC-1\src\main\java\com\adobe\epubcheck\css\CSSChecker3.java:[39,-1]
cannot access com.phloc.css.ECSSVersion
[ERROR] bad class file: c:\local\devel\m2repo\com\phloc\phloc-css\3.2.1\phloc-css-3.2.1.jar(com/phloc/css/ECSSVersion.class)
[ERROR] class file has wrong version
50.0, should be 49.0
Under JDK 1.6, the Maven build seems
to compile successfully, but it results in dozens of failed tests and no
jar (log attached). I've also tried changing java.version at l.119 of pom.xml
to 1.5, but get the same results. As a matter of curiosity, I also tried
under openjdk1.6 on an Ubuntu system, but still got the same outcome.
Am I missing something obvious? Or should
I give up on 1.5 and set about making a case for updating Java on the target
system? Any pointers or advice will be most gratefully received - I'm happy
to provide more logs if necessary (I've tried to keep this concise!)
Many thanks
Tom Cleghorn
Content Systems Controller
Cambridge University Press