On Wed, Mar 31, 2010 at 4:27 PM, Steven Devijver <[email protected]> wrote:
> Hey Hans,
>
> Thanks for your help. I've added @jar but the behavior is still the same.
> I'm using 0.8, I'll try with 0.9 preview 1 as soon as I get a chance.
>
You are right. The above approach does not prevent Ivy from parsing the pom.
Unfortunately I don't see a way from preventing the Ivy Maven resolver not
to parse the pom. You can only specify that a pom is not required. But if it
is there it is used.
What you can do as a work around is to add an UrlResolver (which does not
look for a pom) before the mavenCentral one:
repositories {
add(new org.apache.ivy.plugins.resolver.URLResolver()) {
name = "jarOnlyMavenCentral" // For non standard resolvers the name
is required
m2compatible = true // Tells Ivy to split the organization into
subdirs.
addArtifactPattern("
http://repo2.maven.org/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]
")
}
mavenCentral()
}
This whole area is something we will work on to improve for 1.0.
- Hans
--
Hans Dockter
Founder, Gradle
http://www.gradle.org, http://twitter.com/gradleorg
CEO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz
>
> Steven
>
> ------------------------------
> *De :* Hans Dockter <[email protected]>
> *À :* [email protected]
> *Envoyé le :* Mer 31 mars 2010, 15 h 52 min 45 s
> *Objet :* Re: [gradle-user] How to ignore missing pom parent?
>
> Hi Steven,
>
> On Wed, Mar 31, 2010 at 3:29 PM, Steven Devijver <[email protected]>wrote:
>
>> Hey,
>>
>> I've configured this dependency:
>>
>> dependencies {
>> dbmaintain "org.dbmaintain:dbmaintain:1.0.2"
>> }
>>
>
> You can do:
>
> dbmaintain "org.dbmaintain:dbmaintain:1....@jar"
>
> That should ignore the pom.
>
> - Hans
>
> --
> Hans Dockter
> Founder, Gradle
> http://www.gradle.org, http://twitter.com/gradleorg
> CEO, Gradle Inc. - Gradle Training, Support, Consulting
> http://www.gradle.biz
>
>
>
>> However, I get this exception:
>>
>> ..
>> :: problems summary ::
>> :::: WARNINGS
>> io problem while parsing ivy file:
>> http://repo1.maven.org/maven2/org/dbm
>> aintain/dbmaintain/1.0.2/dbmaintain-1.0.2.pom: Impossible to load parent
>> for fil
>>
>> e:/C:/Documents%20and%20Settings/stdevijv/.gradle/cache/org.dbmaintain/dbmaintai
>> n/ivy-1.0.2.xml.original. Parent=org.dbmaintain#dbmaintain-parent;1.0.2
>>
>> module not found: org.dbmaintain#dbmaintain;1.0.2
>>
>> Problem is that the pom.xml has a parent, dbmaintain-parent, and that this
>> parent is not available on mavenCentral().
>>
>> Is there a way to avoid this failure and just download the jar file?
>>
>> Thanks
>>
>> Steven
>>
>>
>
>