1

I have a scala file called ConcatPlugin.scala in package com.mariussoutier.sbt.

However when I import it in build.sbt I get error cannot resolve symbol ConcatPlugin

Build.sbt

import com.mariussoutier.sbt.ConcatPlugin

But when I type it in it does show that the class exists.

enter image description here

enter image description here

enter image description here

The ConcatPlugin.scala file can be found here

meucaa
  • 1,455
  • 2
  • 13
  • 27
user1184100
  • 6,742
  • 29
  • 80
  • 121
  • have you tried to compile anyways? – pedrofurla Jul 29 '16 at 02:35
  • When I run >activator compile I get this : error: object mariussoutier is not a member of package com import com.mariussoutier.sbt.ConcatPlugin – user1184100 Jul 29 '16 at 03:26
  • Is your plugin source file part of the project you want to build? If yes, I don't think this is possible; you have to build your plugin binary separately and reference it in plugins.sbt. More info: http://www.scala-sbt.org/0.13.1/docs/Extending/Plugins.html. – devkat Jul 29 '16 at 06:36
  • Yes it's not a part of project. I had to build it separately and I got a jar now called sbt-concat-1.0.1-SNAPSHOT.jar after running sbt package. Where do I place it and how do I reference this in the project ? – user1184100 Jul 29 '16 at 06:40
  • Given that the Scala versions match, it should be sufficient to deploy it to your local maven repository using `sbt publish-local` and to reference it in `plugins.sbt` using organization and artifact ID. – devkat Jul 29 '16 at 09:05
  • try `import _root_.com.mariussoutier.sbt.ConcatPlugin` – Alexander Arendar Jul 29 '16 at 10:54

0 Answers0