On Mon, 18 Mar 2013 21:26:44 -0700 (PDT)
Brian Topping <
brian....@gmail.com> wrote:
> Sorry to necro this thread, but I'd also like to know if this is possible.
> I'm guessing it's not possible because nobody's answered it, but hoping
> for the best!
Define these in a Build.scala file:
lazy val publishM2Configuration =
TaskKey[PublishConfiguration]("publish-m2-configuration",
"Configuration for publishing to the .m2 repository.")
lazy val publishM2 =
TaskKey[Unit]("publish-m2",
"Publishes artifacts to the .m2 repository.")
lazy val m2Repo =
Resolver.file("publish-m2-local",
Path.userHome / ".m2" / "repository")
and add these settings to each project you want to publish to .m2/repository/
publishM2Configuration <<= (packagedArtifacts, checksums in publish, ivyLoggingLevel) map { (arts, cs, level) =>
Classpaths.publishConfig(arts, None, resolverName = m2Repo.name, checksums = cs, logging = level)
},
publishM2 <<= Classpaths.publishTask(publishM2Configuration, deliverLocal),
otherResolvers += m2Repo
Then, run publish-m2.
Please let me know how this works out for you. I've provisionally added this for 0.13 and will keep it if you don't run into any problems. In general, it is hard to interoperate with the .m2/repository/ because it is a local repository mixed with a cache. Publishing should be fine, but resolving from it is problematic.
-Mark
> On Wednesday, June 13, 2012 7:53:01 AM UTC-4, Vetle Leinonen-Roeim wrote:
> >
> > Hi,
> >
> > Using publish-local, it is possible to publish an artifact to a local Ivy
> > repository. To publish to a local Maven repository, you can set publishTo,
> > as shown here:
https://github.com/harrah/xsbt/wiki/Publishing
> > Is there any way to get publish-local to publish to the local Maven
> > repository instead of the Ivy repository?
> >
> > Regards,
> > Vetle
> >
> >
>
> --
> 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.
>
>