Re: [sbt] How to make xsbt not attempt to download plugins from http://repo1.maven.org/maven2

94 views
Skip to first unread message

laogao

unread,
Jul 5, 2012, 9:30:28 PM7/5/12
to simple-b...@googlegroups.com
Same issue here.

I believe the sbt.boot.properties is the most appropriate place to specify such an init (and global) setting, otherwise sbt won't even notice before it tries dutifully fetching from repo1.maven.org any dependencies, or meta files, the sbt itself might need to compile those .scala config files (which in theory can also specify whether to use maven-central).

However, after using the sbt.boot.properties to exclude maven-central, sbt still connects to repo1.maven.org. I wonder if there's a more effective way of doing this properly.

Thanks.

/laogao


On Thu, Jul 5, 2012 at 11:41 AM, Dong Wang <dongw.p...@gmail.com> wrote:
How to make xsbt not attempt to download plugins from http://repo1.maven.org/maven2
I've remove all occurences of "http://repo1.maven.org/maven2" from all places I could find including xsbt's sbt-launch.jar/sbt/sbt.boot.options, my plugin.sbt and my build.sbt files.

The reason for me to avoid access to maven central is that the server is blocked in China from time to time and the downloading is very slow otherwise.

Thank you.

--
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/-/_GQDoPRGMfsJ.
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.



--
regards,
laogao
http://laogao.me | http://twitter.com/laogao

Josh Suereth

unread,
Jul 6, 2012, 2:26:44 PM7/6/12
to simple-b...@googlegroups.com
In SBT 0.12.x there's "sbt.override.build.repos" and "sbt.repository.config" settings.   This allow you to configure a proxy repository and force all plugins to use this to resolve.   Here's my repository file:

[repositories]
  local
  ivy-artifactory-local: http://localhost:8081, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
  mvn-artifactory-local: http://localhost:8081

This ensures every artifacts comes from my local artifactory instance.   Hopefully that helps!

Also - I'm using SBT 0.12-0-RC3 on a daily basis.  If your plugins are all moved to it, I'd say it's ready to go.

- Josh

laogao

unread,
Jul 6, 2012, 11:50:33 AM7/6/12
to simple-b...@googlegroups.com
This doesn't seem to fix the problem. One can verify by the following steps:

1- modify /etc/hosts to point repo1.maven.org to some random IP e.g. 127.0.0.1;
2- clear ~/.ivy2/cache;
3- re-run sbt.

/laogao


On Fri, Jul 6, 2012 at 1:00 PM, xzhang <zoz...@gmail.com> wrote:
Since sbt combines resolvers with some default repositories to form external-resolvers, you can do this in your build.sbt

>> externalResolvers ~= { resolvers => resolvers filter (_.name != "public") }



On Friday, July 6, 2012 9:30:28 AM UTC+8, laogao wrote:
Same issue here.

I believe the sbt.boot.properties is the most appropriate place to specify such an init (and global) setting, otherwise sbt won't even notice before it tries dutifully fetching from repo1.maven.org any dependencies, or meta files, the sbt itself might need to compile those .scala config files (which in theory can also specify whether to use maven-central).

However, after using the sbt.boot.properties to exclude maven-central, sbt still connects to repo1.maven.org. I wonder if there's a more effective way of doing this properly.

Thanks.

/laogao


On Thu, Jul 5, 2012 at 11:41 AM, Dong Wang <dongw.p...@gmail.com> wrote:
How to make xsbt not attempt to download plugins from http://repo1.maven.org/maven2? 
I've remove all occurences of "http://repo1.maven.org/maven2" from all places I could find including xsbt's sbt-launch.jar/sbt/sbt.boot.options, my plugin.sbt and my build.sbt files.

The reason for me to avoid access to maven central is that the server is blocked in China from time to time and the downloading is very slow otherwise.

Thank you.

--
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/-/_GQDoPRGMfsJ.
To post to this group, send email to simple-build-tool@googlegroups.com.
To unsubscribe from this group, send email to simple-build-tool+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

--
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/-/wO_hiMhqbZ8J.

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.
Reply all
Reply to author
Forward
0 new messages