[ANNOUNCE] sbt-deploy-aether released

452 views
Skip to first unread message

Erlend Hamnaberg

unread,
Aug 2, 2012, 4:00:10 PM8/2/12
to simple-b...@googlegroups.com
I just published sbt-aether-deploy to sonatype oss.

version 0.5 has been released for 0.11.2, 0.11.3 and 0.12.0.

Source can be found here:

https://github.com/arktekk/sbt-aether-deploy


Best regards

Erlend

Damien Lecan

unread,
Aug 12, 2012, 8:56:28 AM8/12/12
to simple-b...@googlegroups.com

Hi,

Interesting plugin. I'm looking for an alternative to default ivy deployer to deploy to webdav repositories.

How to override "publish" task with this plugin by default?

Thanks

Damien

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

Erlend Hamnaberg

unread,
Aug 13, 2012, 3:46:52 AM8/13/12
to simple-b...@googlegroups.com
Hi.

I've released 0.6 to make this even easier.

in you build.sbt file add:

seq(aetherPublishSettings: _*)

All other configuration is the same as when using normal sbt publish.

Take also a look at the README:
https://github.com/arktekk/sbt-aether-deploy/blob/master/README.md

One caveat with this plugin is that you still need to use the ivy
deployer for sbt-plugins.
This is due to the fact that the maven artifact coordinates in the
generated pom file and the sbt-path is out-of-sync.

I will see if its possible to convince aether to make this work as
well, but for now this is the one caveat.

Damien Lecan

unread,
Aug 13, 2012, 7:35:34 AM8/13/12
to simple-b...@googlegroups.com

> I will see if its possible to convince aether to make this work as
> well, but for now this is the one caveat.

Arf, so I will have to wait, I need it to deploy a sbt-plugin.

Anyway, good work.

Thanks

Damien

Erlend Hamnaberg

unread,
Aug 13, 2012, 5:53:09 PM8/13/12
to simple-b...@googlegroups.com

Looking into this now. Should be easy enough to add.

--

Josh Suereth

unread,
Aug 13, 2012, 10:39:24 PM8/13/12
to simple-b...@googlegroups.com
I'd recommend against Aether for SBT-plugins.  It's unable to capture all the metadata associated with SBT plugins.

Is there something about Ivy that's preventing you from publishing?

Note: we have an free-to-use ivy repository for sbt plugins.


Otherwise, nice work on the plugin. 

--

Erlend Hamnaberg

unread,
Aug 14, 2012, 3:31:40 AM8/14/12
to simple-b...@googlegroups.com
On Tue, Aug 14, 2012 at 4:39 AM, Josh Suereth <joshua....@gmail.com> wrote:
> I'd recommend against Aether for SBT-plugins. It's unable to capture all
> the metadata associated with SBT plugins.

Which metadata would that be? Something that is not packaged with the
packagedArtifacts task?

>
> Is there something about Ivy that's preventing you from publishing?
>
> Note: we have an free-to-use ivy repository for sbt plugins.
>
>
> Otherwise, nice work on the plugin.

Thanks.

Josh Suereth

unread,
Aug 14, 2012, 7:14:12 AM8/14/12
to simple-b...@googlegroups.com

The sbt binary version is encoded as an extra attribute, as well as the Scala binary version.  Aether can *encode* the value but not use it.   So it cannot distinguish between cross published versions.   That means the "addSbtPlugin" functions don't work.

I've also dabbled in whether + sbt.   Given the way sbt does some components/plugins you're never going to be able to replace ivy with aether.   It's unfortunate since ivy caching is terrible.

However for publishing it's a fine idea.   I'd just recommend against supporting plugins.

Erlend Hamnaberg

unread,
Aug 14, 2012, 7:46:11 AM8/14/12
to simple-b...@googlegroups.com
On Tue, Aug 14, 2012 at 1:14 PM, Josh Suereth <joshua....@gmail.com> wrote:
> The sbt binary version is encoded as an extra attribute, as well as the
> Scala binary version. Aether can *encode* the value but not use it. So it
> cannot distinguish between cross published versions. That means the
> "addSbtPlugin" functions don't work.
>

I've managed to get the Aether plugin working with creating exactly
the same path as Ivy does when publishing to for instance
oss.sonatype.org.

I am now going to try using the published plugin using the
addSbtPlugin function and see if this works, which I believe it will.

> I've also dabbled in whether + sbt. Given the way sbt does some
> components/plugins you're never going to be able to replace ivy with aether.
> It's unfortunate since ivy caching is terrible.
>

I am not entirely sure this is impossible. Most stuff seems to be able
to be fixed with a combination of hackery and RepositoryLayouts.
I'll test some more and let you know what happens.

> However for publishing it's a fine idea. I'd just recommend against
> supporting plugins.
>
Fair enough. The 0.7 snapshot version not yet published, is disallowing this.


--Erlend

Josh Suereth

unread,
Aug 14, 2012, 7:49:46 AM8/14/12
to simple-b...@googlegroups.com

Just watch out for optional components and artifacts where pom/artifact don't match.   Aether had a terrible time resolving without writing your own resolver.

Erlend Hamnaberg

unread,
Aug 14, 2012, 10:26:57 AM8/14/12
to simple-b...@googlegroups.com
I've made the plugin work with the default addSbtPlugin function.

If anyone is interested. you can find the branch here:

https://github.com/arktekk/sbt-aether-deploy/tree/sbt-plugin

On Tue, Aug 14, 2012 at 1:49 PM, Josh Suereth <joshua....@gmail.com> wrote:
> Just watch out for optional components and artifacts where pom/artifact
> don't match. Aether had a terrible time resolving without writing your own
> resolver.

The resolving part is not yet something I will attempt. The publishing
part has been the focus for now.

-E

Josh Suereth

unread,
Aug 14, 2012, 10:43:09 AM8/14/12
to simple-b...@googlegroups.com

Awesome,   I'll take a look shortly.

Josh Suereth

unread,
Aug 14, 2012, 10:46:00 AM8/14/12
to simple-b...@googlegroups.com

I see.  You're adding custom support for sbt-isms.   If this has no negative effect on caching and resolution, I'm more than willing to jump in and help.   Resolving is where I gave up.

Erlend Hamnaberg

unread,
Aug 14, 2012, 10:56:34 AM8/14/12
to simple-b...@googlegroups.com
On Tue, Aug 14, 2012 at 4:46 PM, Josh Suereth <joshua....@gmail.com> wrote:
> I see. You're adding custom support for sbt-isms. If this has no negative
> effect on caching and resolution, I'm more than willing to jump in and help.
> Resolving is where I gave up.

AFAIK it should have no negative effect.

We can take the rest of the conversation off-list.

-E

Damien Lecan

unread,
Aug 16, 2012, 7:49:07 AM8/16/12
to simple-b...@googlegroups.com
Hi,

> Is there something about Ivy that's preventing you from publishing?

I'm the developer of Play2War, an sbt plugin extension for Play 2 web framework.

Currently, plugin binaries are deployed to
https://repository-play-war.forge.cloudbees.com/release/.
On this webdav repository, Ivy deployer is not able to create folder
structure (mkcol instructions), so I'm looking for an alternative
either to this Ivy deployer or to this webdav repository.

> Note: we have an free-to-use ivy repository for sbt plugins.

I found that:
http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases
I may switch in the future.

The best whould be to deploy to oss.sonatype.org, but Play runtimes
are not widely published (only on typesafe repo), so I can't.

Damien

Erlend Hamnaberg

unread,
Aug 16, 2012, 1:38:25 PM8/16/12
to simple-b...@googlegroups.com
Hi Damien.

You can try to compile the sbt-plugin branch of the aether-deploy
plugin and see if that works for you.

https://github.com/arktekk/sbt-aether-deploy/tree/sbt-plugin

-E

Damien Lecan

unread,
Aug 17, 2012, 5:01:54 AM8/17/12
to simple-b...@googlegroups.com
Hello,

I'm still using SBT 0.11.3, so I had to make modifications on your plugin.
See https://github.com/dlecan/sbt-aether-deploy/commit/87fa2c739db1519482176e0b1c10b355c70a7fae

Then, when I try to publish my multi-module project, I get errors:

[error] {file:/project-code/}play2-war/*:publish:
java.lang.NoClassDefFoundError:
com/ning/http/client/providers/netty/NettyAsyncHttpProvider
[error] {file:/project-code/}integration-tests/*:publish:
java.lang.NoClassDefFoundError:
org/jboss/netty/channel/SimpleChannelUpstreamHandler
[error] {file:/project-code/}play2-war-plugin/*:publish:
java.lang.NoClassDefFoundError:
com/ning/http/client/providers/netty/NettyAsyncHttpProvider
[error] {file:/project-code/}play2-war-core-servlet25/*:publish:
java.lang.NoClassDefFoundError:
com/ning/http/client/providers/netty/NettyAsyncHttpProvider
[error] {file:/project-code/}play2-war-core-servlet30/*:publish:
java.lang.NoClassDefFoundError:
com/ning/http/client/providers/netty/NettyAsyncHttpProvider
[error] {file:/project-code/}play2-war-core-common/*:publish:
java.lang.NoClassDefFoundError:
com/ning/http/client/providers/netty/NettyAsyncHttpProvider
[error] Total time: 1 s

Damien

2012/8/16 Erlend Hamnaberg <nga...@gmail.com>:

Damien Lecan

unread,
Aug 20, 2012, 7:59:43 AM8/20/12
to simple-b...@googlegroups.com
Hi Erland,

Using correct Scala version (2.9.1) fixed the issue, and ... it works.
I am able to plugin an sbt plugin with your plugin. (Scala 2.9.1 and
SBT 0.11.3).

But, Sonatype aether doesn't work as except :
- http proxy doesn't seem to be managed (your plugin or eather ?)
- I'm falling into this bug https://issues.sonatype.org/browse/AHC-122

Do you know if it is possible to use Maven Wagon provider with your plugin ?

Thanks

Damien

Erlend Hamnaberg

unread,
Aug 20, 2012, 8:24:05 AM8/20/12
to simple-b...@googlegroups.com
On Mon, Aug 20, 2012 at 1:59 PM, Damien Lecan <m...@dlecan.com> wrote:
> Hi Erland,
>
> Using correct Scala version (2.9.1) fixed the issue, and ... it works.
> I am able to plugin an sbt plugin with your plugin. (Scala 2.9.1 and
> SBT 0.11.3).

Cool :)
>
> But, Sonatype aether doesn't work as except :
> - http proxy doesn't seem to be managed (your plugin or eather ?)

This is my plugin. I suppose I would have to pull in whatever SBT does for this.

> - I'm falling into this bug https://issues.sonatype.org/browse/AHC-122
>
> Do you know if it is possible to use Maven Wagon provider with your plugin ?

It is possible. There is another branch of the plugin which uses the wagon api.

I'm not sure if this will override the the plugins settings atm, as I
have not really been experimenting with this.

Take a look at the wagon-provider branch:

https://github.com/arktekk/sbt-aether-deploy/tree/wagon-provider

-E

Damien Lecan

unread,
Aug 20, 2012, 9:53:20 AM8/20/12
to simple-b...@googlegroups.com
>> Do you know if it is possible to use Maven Wagon provider with your plugin ?
> Take a look at the wagon-provider branch:
> https://github.com/arktekk/sbt-aether-deploy/tree/wagon-provider

Not compatible with SBT plugins :(

When I look at the code, I don' understand how Wagon will use the
right Webdav provider.
As "https" is a common scheme, I think I should configure somewhere
association "http => wagon-webdav-jackrabbit".

Damien

Erlend Hamnaberg

unread,
Aug 20, 2012, 10:12:45 AM8/20/12
to simple-b...@googlegroups.com
Hi Damien.
I'll see if I can find the time to provide a configuration example later today.

-E

Erlend Hamnaberg

unread,
Aug 21, 2012, 3:15:18 AM8/21/12
to simple-b...@googlegroups.com

Damien Lecan

unread,
Aug 21, 2012, 10:21:28 AM8/21/12
to simple-b...@googlegroups.com
Hi Erlend,

> https://github.com/arktekk/sbt-aether-deploy/tree/sbt-plugin/src/sbt-test/deploy/sbt-plugin

Ok, thank you for the samples.

Ok, publish task is now using Wagon Webdav provider (i've done
stacktrace dumps to check it), but it fails to deploy artifacts
because my webdav repository needs an SSL connection.

It tried to switch "dav" to "davs" in repository url and in "wagons"
configuration ([1]), but that doesn't work.
Eather switches back to asynchttpclient provider :(

To sum up :
- dav : probably work (Wagon provider is used), but my repository needs SSL
- davs : doesn't work because asynchttpclient provider is used
instead of Wagon one.

> For proxy support, have a look at the 'proxy' branch:
> https://github.com/arktekk/sbt-aether-deploy/tree/proxy

I will try it later.

Thanks for your work.

Damien

[1] : wagons := Seq(aether.WagonWrapper("davs", new
org.apache.maven.wagon.providers.webdav.WebDavWagon()))

Erlend Hamnaberg

unread,
Sep 3, 2012, 9:30:06 AM9/3/12
to simple-b...@googlegroups.com
Porting that particular code should not be a big problem.

Is there a compelling reason for not upgrading to 0.12 ?

-E

On Fri, Aug 31, 2012 at 8:37 PM, om8gis <om8...@gmail.com> wrote:
> Hi. I am still using SBT 0.11.2 but the proxy branch for your plugin
> requires 0.12.0. Will you or can you port the code to also compile with the
> 0.11.2?
>
> Thanks.
> --
> You received this message because you are subscribed to the Google Groups
> "simple-build-tool" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/simple-build-tool/-/ZxssxS-ayLYJ.

om8gis

unread,
Sep 4, 2012, 1:42:56 PM9/4/12
to simple-b...@googlegroups.com
Hey.  Thanks for responding.

Our engineering team is still unfortunately locked into SBT 0.11.2 and Play 2.0.1.  We have not vetted out the newer versions and so migrating all of our engineering projects to this can't be done yet.

I understand that your porting of this code is based on your availability and the generosity of your time :-) but what kind of time frame are you looking at to making this plugin work with 0.11.2?  Thank you very much.

Erlend Hamnaberg

unread,
Sep 5, 2012, 12:40:29 PM9/5/12
to simple-b...@googlegroups.com
On Tue, Sep 4, 2012 at 7:42 PM, om8gis <om8...@gmail.com> wrote:
> Hey. Thanks for responding.
>
> Our engineering team is still unfortunately locked into SBT 0.11.2 and Play
> 2.0.1. We have not vetted out the newer versions and so migrating all of
> our engineering projects to this can't be done yet.
>
> I understand that your porting of this code is based on your availability
> and the generosity of your time :-) but what kind of time frame are you
> looking at to making this plugin work with 0.11.2? Thank you very much.
>

I am really not sure, the time ahead looks really busy. If you want to
fix it, please do and send a pull request and I'll release something.


Ping me off-list if you have any questions for how to move forward.

-E

om8gis

unread,
Sep 10, 2012, 3:07:53 PM9/10/12
to simple-b...@googlegroups.com
Just a quick update to this thread.  One of our engineers figured out t was as simple as renaming scalaBinaryVersion back to scalaVersion to fix the compilation error.

om8gis

unread,
Oct 9, 2012, 3:34:41 AM10/9/12
to simple-b...@googlegroups.com
Hi. Erlend.  Sorry to post to this thread again as I have no way of contacting you.

If you want to take this offline, please email me at om8...@gmail.com

I get a compile error from just simply trying with "import AetherKeys._".  I also try your example build file and it fails with the same error.  No problems with the "import aether._" statement.  And I was unable to find any objects or package name/object matching AetherKeys.

$ sbt -ivy ./.ivy2 update compile
Detected sbt version 0.11.2
Using /home/user/.sbt/0.11.2 as sbt dir, -sbt-dir to override.
[info] Loading project definition from /home/user/git_src/web.aether/project
[error] /home/user/git_src/web.aether/project/Build.scala:4: not found: object AetherKeys
[error] import AetherKeys._
[error]        ^
[error] one error found
[error] {file:/home/user/git_src/web.aether/project/}default-14d1f9/compile:compile: Compilation failed
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q

Are you able to get it to compile and is the example up-to-date?  I can see it was just updated two months ago but...

Erlend Hamnaberg

unread,
Oct 10, 2012, 3:05:20 PM10/10/12
to simple-b...@googlegroups.com
Hi.

On Tue, Oct 9, 2012 at 9:34 AM, om8gis <om8...@gmail.com> wrote:
> Hi. Erlend. Sorry to post to this thread again as I have no way of
> contacting you.
>
> If you want to take this offline, please email me at om8...@gmail.com
>
> I get a compile error from just simply trying with "import AetherKeys._". I
> also try your example build file and it fails with the same error. No
> problems with the "import aether._" statement. And I was unable to find any
> objects or package name/object matching AetherKeys.
>
> $ sbt -ivy ./.ivy2 update compile
> Detected sbt version 0.11.2
> Using /home/user/.sbt/0.11.2 as sbt dir, -sbt-dir to override.
> [info] Loading project definition from /home/user/git_src/web.aether/project
> [error] /home/user/git_src/web.aether/project/Build.scala:4: not found:
> object AetherKeys
> [error] import AetherKeys._
> [error] ^
> [error] one error found
> [error]
> {file:/home/user/git_src/web.aether/project/}default-14d1f9/compile:compile:
> Compilation failed
> Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q
>
> Are you able to get it to compile and is the example up-to-date? I can see
> it was just updated two months ago but...

AetherKeys is no longer part of the plugin,as you have correctly determined.
All the keys has been moved to the Aether object.

I have updated the sample build file to be correct.

-E
Reply all
Reply to author
Forward
0 new messages