Can't resolve org.scala-lang#scala-library;2.* (any revision)

11 views
Skip to first unread message

Martin Weber

unread,
Aug 25, 2013, 11:02:16 AM8/25/13
to ivyro...@googlegroups.com
Hi all,

subject says it all.

ant resolve fails,
ant check-report marks any revision of org.scala-lang#scala-library as
unresolvable.

Crazy enough,
wget -S http://repo1.maven.org/maven2/org/scala-lang/scala-
library/2.10.0/scala-library-2.10.0.jar

works.

Can anyone please confirm this?

Thanks,
Martin

--
Cd wrttn wtht vwls s mch trsr.


Archie Cobbs

unread,
Aug 26, 2013, 9:57:51 AM8/26/13
to Ivy RoundUp Mailing List
Yes, I'm seeing the same thing.

The Maven repository is returning "403 Denied Access" for some reason, when ant is the client. Using Firefox for the same URL works, however.

I sent an email to sup...@sonatype.com asking for clarification.

-Archie



--
You received this message because you are subscribed to the Google Groups "ivyroundup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ivyroundup+...@googlegroups.com.
To post to this group, send email to ivyro...@googlegroups.com.
Visit this group at http://groups.google.com/group/ivyroundup.
For more options, visit https://groups.google.com/groups/opt_out.



--
Archie L. Cobbs

Archie Cobbs

unread,
Aug 26, 2013, 11:57:10 AM8/26/13
to Ivy RoundUp Mailing List
Sonatype is blocking HTTP requests with User-Agent containing "Java" due to abuse.

Ivy should be setting the User-Agent to "Apache Ivy" instead. See IVY-1435.

I am still in discussion with Sonatype to see if they will refine their filter somehow.

-Archie
--
Archie L. Cobbs

Archie Cobbs

unread,
Aug 27, 2013, 10:08:21 AM8/27/13
to Ivy RoundUp Mailing List
Just FYI, a little more info about the "abuse" that Maven central is trying to block...

A large software distributor shipped a product with a bug which on every startup, downloaded scala artifacts directly from Maven central. This caused roughly 10-12 times more continuous traffic to Maven central as a whole than normal.

The reason this fails with the Packager resolver is because the Packager resolver auto-generates a temporary ant build.xml file to resolve the archives, using ant's <get> task. When using <get> you get an HTTP User-Agent of "Java/X.Y".

-Archie

--
Archie L. Cobbs

Andre-John Mas

unread,
Aug 27, 2013, 12:37:43 PM8/27/13
to ivyro...@googlegroups.com
As a temporary solution, could applying the system property "http.agent" work?

Archie Cobbs

unread,
Aug 27, 2013, 12:53:38 PM8/27/13
to Ivy RoundUp Mailing List
Yes that works... for example, put this in your ~/.antrc:

ANT_OPTS="-Dhttp.agent=ApacheIvy"

-Archie

Martin Weber

unread,
Aug 26, 2013, 2:32:36 PM8/26/13
to ivyro...@googlegroups.com
Am Montag, 26. August 2013, 10:57:10 schrieb Archie Cobbs:
> Sonatype is blocking HTTP requests with User-Agent containing "Java" due to
> abuse.

Maybe it's the URL verification for ivyroundup, which is causing the abuse? I
do a full scan nearly every week.

>
> Ivy should be setting the User-Agent to "Apache Ivy" instead. See
> IVY-1435<https://issues.apache.org/jira/browse/IVY-1435>

It won't be sufficient to change that in Ivy. The packager resolver generates
an ant-script which initiates the HTTP request. So Ant has to be changed.

Andre-John Mas

unread,
Aug 27, 2013, 5:27:49 PM8/27/13
to ivyro...@googlegroups.com
I have opened up a related ticket on the ant side. While the ticket was originally
about allowing the over-riding of the user-agent for the get task, I have also suggested
that it may be an idea to simply change the default user-agent used by Ant:

https://issues.apache.org/bugzilla/show_bug.cgi?id=55489

Although that ticket doesn't solve the Ivy issue, I feel this ticket shows that
something better can be done on the ant side?

Archie Cobbs

unread,
Aug 27, 2013, 5:32:41 PM8/27/13
to Ivy RoundUp Mailing List
I agree. Ant should by default use "Apache Ant/X.Y" and in addition the <get> task should support a "useragent" attribute.

-Archie
--
Archie L. Cobbs
Reply all
Reply to author
Forward
0 new messages