Hi Mike:

What you’re running into is the fact that part of River’s build system 
(classdep, in fact) uses the ASM library, and that library changed 
significantly between Java 7 and Java 8.  The net result is that the 2.2.2 
release does not build under JDK8.  

If you have a JDK7 installation around, it should work under that.

Patches have been contributed to fix the build system for JDK8, but personally, 
I’ve been concentrating on the river-examples project rather than patching and 
releasing the JTSK.  I’m not sure if anyone else has plans to do it 
immediately.  If not, I’ll probably get to it once the river-examples project 
is released.  I also started down the path of pulling the tools packages out of 
the JTSK (similar to your suggestions in another thread), but the package 
relationships are convoluted enough that I decided to work on the examples 
project first.

You asked “Is Maven the preferred way to build now?”  That’s an interesting 
question - I’d say no, but Maven Central is the preferred way to get the 
binaries.  In other words, I would tend to discourage you from actually 
building the distribution from source.  Not discourage you really, but I’d 
point out that if you can use the jars from Maven Central, then you don’t need 
to deal with the somewhat complex and non-JDK8-compatible build system in 
River.  And really, unless you’re hacking on the core, why do you need to build 
River itself?

The various artifacts are listed at http://river.apache.org/maven-artifacts.html

So in building a project that “uses” River, I’d suggest using Maven, Gradle, or 
Apache Ivy with Ant, each of which can retrieve artifacts from Maven Central.  
There is also the binary distribution that has the jars already compiled, if 
you’re dead set against going to Maven Central.

Cheers,

Greg Trasuk


On Feb 13, 2015, at 9:47 AM, Mike <mikro...@gmail.com> wrote:

> Following along in https://river.apache.org/building-river.html, I
> 
> $ cd $RIVER_HOME
> $ ant
> 
> ...
> 
> jsk-dl.jar:
>     [java] Exception in thread "main" 
> java.lang.ArrayIndexOutOfBoundsException: 5735
>     [java]     at org.objectweb.asm.ClassReader.readClass(Unknown Source)
>     [java]     at org.objectweb.asm.ClassReader.accept(Unknown Source)
>     [java]     at org.objectweb.asm.ClassReader.accept(Unknown Source)
>     [java]     at 
> com.sun.jini.tool.classdepend.ReferencedClasses.compute(ReferencedClasses.java:56)
>     [java]     at 
> com.sun.jini.tool.classdepend.ClassDepend.getDependencyRelationshipMap(ClassDepend.java:283)
>     [java]     at com.sun.jini.tool.ClassDep.compute(ClassDep.java:885)
>     [java]     at com.sun.jini.tool.ClassDep.main(ClassDep.java:1329)
> 
> BUILD FAILED
> 
> Anyone else seen this? Workarounds? Or is Maven the preferred way to build 
> now?
> 
> -- 
> Mike Morris
> http://mikro2nd.net/
> EarthStuff: http://blog.mikro2nd.net/
> TechStuff : http://onemikro2nd.blogspot.com/

Reply via email to