This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Re: [maven-and-scala] Scala compiler plugins and Eclipse workspace resolution

1 reply
Joshua.Suereth
Joined: 2008-09-02,
User offline. Last seen 32 weeks 5 days ago.
I actually think this is a bug in how the Scala IDE for Eclipse is handling classpath resolution.  I would check to see if this already exists in trac (The Plugin not handling project dependencies in the classpath), as this may have been fixed.  What version of the Eclipse plugin are you using?



On Sun, Jun 28, 2009 at 8:18 PM, Erkki Lindpere <villane@gmail.com> wrote:

Sorry if this is the wrong place to report: I don't know enough about
Maven's internals to know if this is more of an issue for m2eclipse,
maven or maven-scala-plugin.

When using a scala compiler plugin described in the POM, and both the
project being built and the scala compiler plug-in are in the same
Eclipse workspace, and M2Eclipse is doing workspace resolution, I get
the following error when M2Eclipse is doing building.

It seems the Maven-scala-plugin assumes the resolved plug-in is a jar,
but it's actually a folder.

29.06.09 3:12:26 EEST: [WARN] Exception in thread "main"
java.io.FileNotFoundException: \path-to-plugin-project-in-workspace
\target\classes (Access is denied)
29.06.09 3:12:26 EEST: [WARN]   at java.util.zip.ZipFile.open(Native
Method)
29.06.09 3:12:26 EEST: [WARN]   at java.util.zip.ZipFile.<init>
(ZipFile.java:114)
29.06.09 3:12:26 EEST: [WARN]   at java.util.jar.JarFile.<init>
(JarFile.java:133)
29.06.09 3:12:26 EEST: [WARN]   at java.util.jar.JarFile.<init>
(JarFile.java:97)
29.06.09 3:12:26 EEST: [WARN]   at scala.tools.nsc.plugins.Plugin$.scala
$tools$nsc$plugins$Plugin$$loadDescription(Plugin.scala:81)
29.06.09 3:12:26 EEST: [WARN]   at scala.tools.nsc.plugins.Plugin
$.loadFrom(Plugin.scala:106)
29.06.09 3:12:26 EEST: [WARN]   at scala.tools.nsc.plugins.Plugin$
$anonfun$loadAllFrom$5.apply(Plugin.scala:142)
29.06.09 3:12:26 EEST: [WARN]   at scala.tools.nsc.plugins.Plugin$
$anonfun$loadAllFrom$5.apply(Plugin.scala:142)
29.06.09 3:12:26 EEST: [WARN]   at scala.List.map(List.scala:812)
29.06.09 3:12:26 EEST: [WARN]   at scala.tools.nsc.plugins.Plugin
$.loadAllFrom(Plugin.scala:142)
29.06.09 3:12:26 EEST: [WARN]   at scala.tools.nsc.plugins.Plugins
$class.loadRoughPluginsList(Plugins.scala:28)
29.06.09 3:12:26 EEST: [WARN]   at
scala.tools.nsc.Global.loadRoughPluginsList(Global.scala:34)
29.06.09 3:12:26 EEST: [WARN]   at scala.tools.nsc.plugins.Plugins
$class.roughPluginsList(Plugins.scala:38)
29.06.09 3:12:26 EEST: [WARN]   at
scala.tools.nsc.Global.roughPluginsList(Global.scala:34)
29.06.09 3:12:26 EEST: [WARN]   at scala.tools.nsc.plugins.Plugins
$class.loadPlugins(Plugins.scala:91)
29.06.09 3:12:26 EEST: [WARN]   at scala.tools.nsc.Global.loadPlugins
(Global.scala:34)
29.06.09 3:12:26 EEST: [WARN]   at scala.tools.nsc.plugins.Plugins
$class.plugins(Plugins.scala:123)
29.06.09 3:12:26 EEST: [WARN]   at scala.tools.nsc.Global.plugins
(Global.scala:34)
29.06.09 3:12:26 EEST: [WARN]   at scala.tools.nsc.plugins.Plugins
$class.computePhaseDescriptors(Plugins.scala:155)
29.06.09 3:12:26 EEST: [WARN]   at
scala.tools.nsc.Global.computePhaseDescriptors(Global.scala:34)
29.06.09 3:12:26 EEST: [WARN]   at
scala.tools.nsc.Global.phaseDescriptors(Global.scala:442)
29.06.09 3:12:26 EEST: [WARN]   at scala.tools.nsc.Global$Run.<init>
(Global.scala:490)
29.06.09 3:12:26 EEST: [WARN]   at scala.tools.nsc.Main$.process
(Main.scala:72)
29.06.09 3:12:26 EEST: [WARN]   at scala.tools.nsc.Main$.main
(Main.scala:87)
29.06.09 3:12:26 EEST: [WARN]   at scala.tools.nsc.Main.main(Main.scala)

Erkki Lindpere
Joined: 2008-12-19,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: [maven-and-scala] Scala compiler plugins and Eclipse wo

I'm using 2.7.5 (with Eclipse 3.5)

Josh Suereth wrote:
> I actually think this is a bug in how the Scala IDE for Eclipse is
> handling classpath resolution. I would check to see if this already
> exists in trac (The Plugin not handling project dependencies in the
> classpath), as this may have been fixed. What version of the Eclipse
> plugin are you using?
>
>
>
> On Sun, Jun 28, 2009 at 8:18 PM, Erkki Lindpere > wrote:
>
>
> Sorry if this is the wrong place to report: I don't know enough about
> Maven's internals to know if this is more of an issue for m2eclipse,
> maven or maven-scala-plugin.
>
> When using a scala compiler plugin described in the POM, and both the
> project being built and the scala compiler plug-in are in the same
> Eclipse workspace, and M2Eclipse is doing workspace resolution, I get
> the following error when M2Eclipse is doing building.
>
> It seems the Maven-scala-plugin assumes the resolved plug-in is a jar,
> but it's actually a folder.
>
> 29.06.09 3:12:26 EEST: [WARN] Exception in thread "main"
> java.io.FileNotFoundException: \path-to-plugin-project-in-workspace
> \target\classes (Access is denied)
> 29.06.09 3:12:26 EEST: [WARN] at java.util.zip.ZipFile.open(Native
> Method)
> 29.06.09 3:12:26 EEST: [WARN] at java.util.zip.ZipFile.
> (ZipFile.java:114)
> 29.06.09 3:12:26 EEST: [WARN] at java.util.jar.JarFile.
> (JarFile.java:133)
> 29.06.09 3:12:26 EEST: [WARN] at java.util.jar.JarFile.
> (JarFile.java:97)
> 29.06.09 3:12:26 EEST: [WARN] at
> scala.tools.nsc.plugins.Plugin$.scala
> $tools$nsc$plugins$Plugin$$loadDescription(Plugin.scala:81)
> 29.06.09 3:12:26 EEST: [WARN] at scala.tools.nsc.plugins.Plugin
> $.loadFrom(Plugin.scala:106)
> 29.06.09 3:12:26 EEST: [WARN] at scala.tools.nsc.plugins.Plugin$
> $anonfun$loadAllFrom$5.apply(Plugin.scala:142)
> 29.06.09 3:12:26 EEST: [WARN] at scala.tools.nsc.plugins.Plugin$
> $anonfun$loadAllFrom$5.apply(Plugin.scala:142)
> 29.06.09 3:12:26 EEST: [WARN] at scala.List.map(List.scala:812)
> 29.06.09 3:12:26 EEST: [WARN] at scala.tools.nsc.plugins.Plugin
> $.loadAllFrom(Plugin.scala:142)
> 29.06.09 3:12:26 EEST: [WARN] at scala.tools.nsc.plugins.Plugins
> $class.loadRoughPluginsList(Plugins.scala:28)
> 29.06.09 3:12:26 EEST: [WARN] at
> scala.tools.nsc.Global.loadRoughPluginsList(Global.scala:34)
> 29.06.09 3:12:26 EEST: [WARN] at scala.tools.nsc.plugins.Plugins
> $class.roughPluginsList(Plugins.scala:38)
> 29.06.09 3:12:26 EEST: [WARN] at
> scala.tools.nsc.Global.roughPluginsList(Global.scala:34)
> 29.06.09 3:12:26 EEST: [WARN] at scala.tools.nsc.plugins.Plugins
> $class.loadPlugins(Plugins.scala:91)
> 29.06.09 3:12:26 EEST: [WARN] at scala.tools.nsc.Global.loadPlugins
> (Global.scala:34)
> 29.06.09 3:12:26 EEST: [WARN] at scala.tools.nsc.plugins.Plugins
> $class.plugins(Plugins.scala:123)
> 29.06.09 3:12:26 EEST: [WARN] at scala.tools.nsc.Global.plugins
> (Global.scala:34)
> 29.06.09 3:12:26 EEST: [WARN] at scala.tools.nsc.plugins.Plugins
> $class.computePhaseDescriptors(Plugins.scala:155)
> 29.06.09 3:12:26 EEST: [WARN] at
> scala.tools.nsc.Global.computePhaseDescriptors(Global.scala:34)
> 29.06.09 3:12:26 EEST: [WARN] at
> scala.tools.nsc.Global.phaseDescriptors(Global.scala:442)
> 29.06.09 3:12:26 EEST: [WARN] at scala.tools.nsc.Global$Run.
> (Global.scala:490)
> 29.06.09 3:12:26 EEST: [WARN] at scala.tools.nsc.Main$.process
> (Main.scala:72)
> 29.06.09 3:12:26 EEST: [WARN] at scala.tools.nsc.Main$.main
> (Main.scala:87)
> 29.06.09 3:12:26 EEST: [WARN] at
> scala.tools.nsc.Main.main(Main.scala)
>
>

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland