davidB / vscaladoc

A variation of scaladoc : an API generator for project written in Scala
http://code.google.com/p/vscaladoc/
22 stars 3 forks source link

Scaladoc generation fails for Scala 2.8 #9

Closed indrajitr closed 14 years ago

indrajitr commented 14 years ago

When used with maven-scala-plugin 2.14 and vscaladoc 2.0-m1 the following exception is thrown when running scala:doc.

This could be maven-scala-plugin issue though, but looking at the reference to scala classes I was tempted to assume that this is a vscaladoc problem.

[INFO] Preparing scala:doc
[INFO] [enforcer:enforce {execution: default}]
[INFO] [scala:doc {execution: default-cli}]
[INFO] Checking for multiple versions of scala
[INFO] Checking for multiple versions of scala
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org_scala_tools_maven_executions.MainHelper.runMain(MainHelper.java:161)
    at org_scala_tools_maven_executions.MainWithArgsInFile.main(MainWithArgsInFile.java:26)
Caused by: java.lang.NoClassDefFoundError: scala/runtime/BoxedArray
    at org.scala_tools.vscaladoc.Main.main(Main.scala)
    ... 6 more
Caused by: java.lang.ClassNotFoundException: scala.runtime.BoxedArray
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    ... 7 more
davidB commented 14 years ago

vscaladoc 1.2 serie doesn't support scala 2.8.

the exeception ClassNotFoundException: scala.runtime.BoxedArray, is typical for scala version mismatch.

I'll try to provide a vscaladoc for scala 2.8.0 during july /august 2010 (need to port to the scaladoc2 api).

/davidB

indrajitr commented 14 years ago

Thanks for the update. Would look forward to vscaladoc for scala 2.8.0 :)

wolkenarchitekt commented 14 years ago

Any news here? How long will it take until this gets fixed?

davidB commented 14 years ago

migration to scaladoc2 api require a big rewrite (~50%). So rather than first do the rewrite and later do the plan rewrite to generate json and allow user extension. The first step (migration to scaladoc2) was aborted (no enough time). And vscaladoc 2.x serie was started (experimental branch on my box). But I didn't spend time as planned (lot time spend in scala-ide). So I'm a bit late, I hope to publish a snapshot this month (august) like in original plan.

Thanks to ping me

/davidB

wolkenarchitekt commented 14 years ago

Thanks for the update! So at the moment there is no option to create a Scaladoc for a mavenized Scala+Java project? Or are there other ways? Unfortunately, my release date is August, 17th, and it really should contain the docs.

davidB commented 14 years ago

currently you could use regular scaladoc2 but not vscaladoc to generate api for scala part of your project

davidB commented 14 years ago

to use regular scaladoc/scaladoc2, you should not define vscaladocVersion see http://scala-tools.org/mvnsites/maven-scala-plugin/example_doc.html

wolkenarchitekt commented 14 years ago

Thanks so far! I did not define a vscaladocVersion in my pom.xml. I just tried inserting <scaladocClassName>scala.tools.nsc.ScalaDoc</scaladocClassName> into the configuration-section both in the build-section and in the reporting-section, But i'm still getting the java.lang.reflect.InvocationTargetException when trying to build the doc with "mvn site" or "mvn scala:doc" Any other ideas?

davidB commented 14 years ago

remove , maven-scala-plugin select by default the right scaladoc class for your scala version (wich is not scala.tools.nsc.ScalaDoc for scala 2.8.0 iirc).

if for developer of scaladoc like tool, to be able to test them with the plugin.
hohonuuli commented 14 years ago

I'm running into this same problem. Has anyone found a way to get scaladoc2 to work with a Maven build using Scala 2.8?

davidB commented 14 years ago

read messages below follow instruction at http://scala-tools.org/mvnsites/maven-scala-plugin/example_doc.html

hohonuuli commented 14 years ago

Thanks david, I played around with the maven settings and now I no longer get the java.lang.reflect.InvocationTargetException. However, I'm working with a mixed Java/Scala project and now when I run 'mvn scala:doc' the scaladoc tool is not seeing any of the Java sources, so it fails with a long list of lines like 'error: not found: SomeJavaClass'. Any suggestion on how to configure the scaladoc tool to see the Java classes in a Maven project? Thanks!

davidB commented 14 years ago

it's a bug fixed in the snapshot version 2.14.2-SNAPSHOT (may be released next week, additionnal change should be added before)

hohonuuli commented 14 years ago

Excellent, I'll look forward to the next release. Thanks again.