Re: plugins code reuse

25 views
Skip to first unread message

ericdr...@gmail.com

unread,
Jan 29, 2013, 10:36:53 AM1/29/13
to simple-b...@googlegroups.com
For anyone else looking to do the same here's an example of how I did it:

libraryDependencies ++= Seq(
 
"org.scalatest" %% "scalatest" % "1.8" % "test",
 
Defaults.sbtPluginExtra("group" % "sbt-plugins" % "0.6.3-20130129-144740", "0.12", "2.9.2")
)


On Monday, January 28, 2013 9:34:10 PM UTC-5, ericdr...@gmail.com wrote:
I have created a set of SBT plugins that my team uses internally.  I want to open-source a lot of what I have built.  I've created a project with the open-source code and have published it locally.  I can add the open-source plugins as a plugin (using addSbtPlugin like normal) to the closed-source plugins project and use it normally.  

Now I want to add the open-source plugins as a dependency to the closed-source plugins project in order to reuse some of the code and rewrite our internal plugins based on the open-source plugins.  

I've tried to add the open-source plugins as a dependency like one would normally but it doesn't resolve.  It seems that because the project is an SBT plugin project it gets published to an abnormal path 

sbt-plugins/scala_2.9.2/sbt_0.12/0.6.3-20130129-015150/jars/sbt-plugins-0.6.3-20130129-015150.jar

How do I accomplish this?

Mark Harrah

unread,
Feb 2, 2013, 11:39:45 AM2/2/13
to simple-b...@googlegroups.com
On Tue, 29 Jan 2013 07:36:53 -0800 (PST)
ericdr...@gmail.com wrote:

> For anyone else looking to do the same here's an example of how I did it:
>
> libraryDependencies ++= Seq(
> "org.scalatest" %% "scalatest" % "1.8" % "test",
> Defaults.sbtPluginExtra("group" % "sbt-plugins" % "0.6.3-20130129-144740",
> "0.12", "2.9.2")
> )

Note that this is the same as:

libraryDependencies += "org.scalatest" %% "scalatest" % "1.8" % "test"

addSbtPlugin("group" % "sbt-plugins" % "0.6.3-20130129-144740")

-Mark

>
> On Monday, January 28, 2013 9:34:10 PM UTC-5, ericdr...@gmail.com wrote:
> >
> > I have created a set of SBT plugins that my team uses internally. I want
> > to open-source a lot of what I have built. I've created a project with the
> > open-source code and have published it locally. I can add the open-source
> > plugins as a plugin (using addSbtPlugin like normal) to the closed-source
> > plugins project and use it normally.
> >
> > Now I want to add the open-source plugins as a dependency to the
> > closed-source plugins project in order to reuse some of the code and
> > rewrite our internal plugins based on the open-source plugins.
> >
> > I've tried to add the open-source plugins as a dependency like one would
> > normally but it doesn't resolve. It seems that because the project is an
> > SBT plugin project it gets published to an abnormal path
> >
> >
> > sbt-plugins/scala_2.9.2/sbt_0.12/0.6.3-20130129-015150/jars/sbt-plugins-0.6.3-20130129-015150.jar
> >
> > How do I accomplish this?
> >
>
> --
> You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-t...@googlegroups.com.
> To post to this group, send email to simple-b...@googlegroups.com.
> Visit this group at http://groups.google.com/group/simple-build-tool?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Reply all
Reply to author
Forward
0 new messages