On 25/07/2011, at 1:51 PM, vsajja wrote:
> Hi All,
>
> I have a ~650mb lib file that I’m trying to upload to Artifactory via
> Gradle. I’m running out of Java heap space which I can’t get past, it gets
> stuck at 512 MB.
>
> I have set my GRADLE_OPTS to:
> -Xms1536m -Xmx1536m -XX:PermSize=128m -XX:MaxPermSize=128m -XX:NewSize=768m
> -XX:MaxNewSize=768m -XX:+UseParNewGC -XX:+UseTLAB -XX:+UseConcMarkSweepGC
>
> Talked to the Artifactory guys and they mentioned that it's because Ivy is
> using the simple http client which creates a full buffer in memory. A work
> around suggested is to configure the Ivy URLResolver to use the apache
> commons http client with preemptive authentication.
>
> Has anything like this been done before?
Yes it has. If you're using Gradle 1.0-milestone-3, you can use the new ivy()
repository, which does both streaming upload and preemptive authentication for
HTTP:
repositories {
ivy {
artifactPattern "http://....some ivy pattern..."
username = 'some.user'
password = 'some.password'
}
}
The javadocs for the RepositoryHandler interface have more details:
http://gradle.org/current/docs/javadoc/org/gradle/api/artifacts/dsl/RepositoryHandler.html
--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com