Scala plugin does not cope with broken dependencies (cycles)

13 views
Skip to first unread message

czertik

unread,
Mar 2, 2009, 6:35:43 AM3/2/09
to Maven and Scala
Hi,

current release of maven-scala-plugin added (or changed) some
functionality to check for multiple scala versions in dependencies,
which breaks in my project.

I'm using fop (org.apache.xmlgraphics, fop, 0.95), which depends on
org.apache.xmlgraphics/batik* packages, and these have obviously
broken dependencies, creating a cycle. Maven itself handles the
problem gracefully:

[DEBUG] org.apache.xmlgraphics:batik-svg-dom:jar:1.7:compile
(selected for compile)
[DEBUG] org.apache.xmlgraphics:batik-svg-dom:jar:1.7:compile
(removed - causes a cycle in the graph)

But the scala plugin fails:

[DEBUG] Trace
java.lang.StackOverflowError
at sun.nio.cs.UTF_8.updatePositions(UTF_8.java:58)
at sun.nio.cs.UTF_8$Encoder.encodeArrayLoop(UTF_8.java:392)
at sun.nio.cs.UTF_8$Encoder.encodeLoop(UTF_8.java:447)
at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:
544)
at java.lang.StringCoding$StringEncoder.encode
(StringCoding.java:240)
at java.lang.StringCoding.encode(StringCoding.java:272)
at java.lang.String.getBytes(String.java:947)
at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
at java.io.UnixFileSystem.getBooleanAttributes
(UnixFileSystem.java:228)
at java.io.File.exists(File.java:733)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve
(DefaultArtifactResolver.java:183)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve
(DefaultArtifactResolver.java:74)
at
org.scala_tools.maven.ScalaMojoSupport.resolveDependencyArtifacts
(ScalaMojoSupport.java:199)
at
org.scala_tools.maven.ScalaMojoSupport.resolveArtifactDependencies
(ScalaMojoSupport.java:219)
at
org.scala_tools.maven.ScalaMojoSupport.checkArtifactForScalaVersion
(ScalaMojoSupport.java:303)
at
org.scala_tools.maven.ScalaMojoSupport.checkArtifactForScalaVersion
(ScalaMojoSupport.java:306)
...

I just went back to previous version and thought you might want to
know :-)

--
Michal Prihoda

Josh Suereth

unread,
Mar 2, 2009, 7:26:36 AM3/2/09
to maven-a...@googlegroups.com, Maven and Scala
Thanks for the report! We discovered this as well and are working
towards a fix. I beleive the current nightly will allow you to turn
this feature off. I apologize for the inconvienience.

Also note this situation is now part of our integration test and
should not be repeated.

- Josh

David Bernard

unread,
Mar 2, 2009, 8:00:04 AM3/2/09
to maven-a...@googlegroups.com
In the 2.11-SNAPSHOT and futur version, you could disable the check (enabled by default) with
<checkMultipleScalaVersions>false</checkMultipleScalaVersions>

Until the new versionis released, force the version of the plugin to 2.9.
Reply all
Reply to author
Forward
0 new messages