scala - Sbt plugin depending on another plugin throws a RuntimeException when tested with sbt-scripted -


i trying test sbt-plugin (hereafter myplugin) sbt-scripted, keeps on giving me java.lang.runtimeexception (the plugin compiles properly) due error (see here complete gist):

[error]  [error]   last tree typer: arrayvalue [error]               symbol: null [error]    symbol definition: null [error]        symbol owners:  [error]       context owners: method $sbtdef -> object $ca19269de636e3032318 -> package <empty> [error]  [error] == enclosing template or block == [error]  [error] apply( // implicit def wraprefarray(xs: array[object]): collection.mutable.wrappedarray in class lowpriorityimplicits [error]   scala.this."predef"."wraprefarray" // implicit def wraprefarray(xs: array[object]): collection.mutable.wrappedarray in class lowpriorityimplicits, tree.tpe=(xs: array[object])collection.mutable.wrappedarray [error]   arrayvalue( [error]     <tpt> // tree.tpe=sbt.autoplugin [error]     list( [error]       "it"."flatmap"."myplugin"."myplugin" // sym= <error> bad symbolic reference. signature in myplugin.class refers term plugin [error] in value com.sbteclipse not available. [error] may missing current classpath, or version on [error] classpath might incompatible version used when compiling myplugin.class. [error]     ) [error]   ) [error] ) [error]  

myplugin depends on sbteclipse (i need execute "eclipse" command programmatically), stated in last row of myplugin/build.sbt file:

sbtplugin := true  version := "0.0.1"  name := "myplugin"  scalaversion := "2.10.6" organization := "it.flatmap"  issnapshot := true  //configuring scriptedplugin scriptedplugin.scriptedsettings  scriptedlaunchopts <++= version apply { version =>   seq("-xmx1024m", "-dplugin.version=" + version) } //end of scripted plugin config  librarydependencies ++= seq("org.scalatest" %% "scalatest" % "3.0.0" % "test")  addsbtplugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0") 

my autoplugin subclass overrides both trigger , requires signatures follows:

override def trigger = allrequirements  override def requires = eclipseplugin 

i setup simple sbt scripted test, throws java.lang.runtimeexception described above. cannot understand why.

this sbt scripted configuration:

test/build.sbt

version := "0.0.1"  scalaversion in thisbuild := "2.10.6"  name := "mypluginsimpletest"  enableplugins(myplugin) 

test/project/plugins.sbt

{   val pluginversion = system.getproperty("plugin.version")   if(pluginversion == null)     throw new runtimeexception("""|the system property 'plugin.version' not defined.                                  |specify property using scriptedlaunchopts -d.""".stripmargin)   else addsbtplugin("it.flatmap" % "myplugin" % pluginversion) }  //should add eclipse plugin here? if so, why? 

what missing?

thank you!


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -