You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Jefferson Magno Solfarello <jm...@gmail.com> on 2011/05/30 21:48:15 UTC
Problems with dependencies
Hi everybody,
I have a web application called brokerinformation, this application depends
on 5 modules at compile time, according to the ivy.xml bellow.
I need to to get the dependencies and put them into my lib directory.
Having the dependencies, I can generate the war.
I will still need to publish the war file on the same repository.
My ivy.xml file is the following:
<ivy-module version="1.0">
<info organisation="rigpa" module="brokerinformation" revision="1.1"/>
<dependencies>
<dependency name="bp.commons" rev="latest.integration"
ext="jar"/>
<dependency name="bp.dao.bluequote" rev="latest.integration"
ext="jar"/>
<dependency name="bp.dao.brokerreg" rev="latest.integration"
ext="jar"/>
<dependency name="bp.dao.reporting" rev="latest.integration"
ext="jar"/>
<dependency name="bp.ws.commons" rev="latest.integration"
ext="jar"/>
</dependencies>
<publications>
<artifact name="bp.ws.brokerinformation.war" type="war" ext="war"/>
</publications>
</ivy-module>
This is my ivysettings.properties
<ivysettings>
<properties file="${ivy.settings.dir}/ivysettings.properties"/>
<settings
defaultCache="${ivy.settings.dir}/ivy-cache"
defaultResolver="localRepository"
/>
<resolvers>
<filesystem name="localRepository">
<artifact
pattern="${repository.dir}/[module]/[artifact](-[rev]).[ext]" />
</filesystem>
</resolvers>
</ivysettings>
On my build.xml, I have:
<target name="resolve" description="--> resolve and retrieve
dependencies with Ivy">
<ivy:retrieve pattern="${lib.dir}/[artifact].[ext]"/>
</target>
<target name="publish" depends="resolve" description="--> publish
artifacts and descriptors">
<ivy:publish
resolver="localRepository"
artifactspattern="${distrib.dir}/[artifact].[ext]"
forcedeliver="true"
overwrite="true"
/>
</target>
When I call ant revolve target (<ivy:retrieve>), I get the following:
BUILD FAILED
/home/rigpa/IBM/rationalsdp/workspace/bp.ws.brokerinformation.war/build.xml:302:
syntax errors in ivy file: java.text.ParseException: [xml parsing:
ivy.xml:30:19: cvc-complex-type.2.4.a: Invalid content was found starting
with element 'publications'. One of '{conflicts}' is expected. in
file:/home/rigpa/IBM/rationalsdp/workspace/bp.ws.brokerinformation.war/ivy.xml
]
at
org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.checkErrors(AbstractModuleDescriptorParser.java:89)
Am I missing something?
Thanks for any help
Jefferson
Re: Problems with dependencies
Posted by Jefferson Magno Solfarello <jm...@gmail.com>.
Hi Maarten,
It's working now!
Thanks a lot,
Jefferson
2011/5/30 Maarten Coene <ma...@yahoo.com>
> Put the <publications> element before the <dependencies> element in your
> ivy.xml
>
> Maarten
>
>
>
> ----- Original Message -----
> From: Jefferson Magno Solfarello <jm...@gmail.com>
> To: ivy-user@ant.apache.org
> Cc:
> Sent: Monday, May 30, 2011 9:48 PM
> Subject: Problems with dependencies
>
> Hi everybody,
>
> I have a web application called brokerinformation, this application depends
> on 5 modules at compile time, according to the ivy.xml bellow.
> I need to to get the dependencies and put them into my lib directory.
> Having the dependencies, I can generate the war.
> I will still need to publish the war file on the same repository.
>
> My ivy.xml file is the following:
>
> <ivy-module version="1.0">
> <info organisation="rigpa" module="brokerinformation" revision="1.1"/>
>
> <dependencies>
> <dependency name="bp.commons" rev="latest.integration"
> ext="jar"/>
> <dependency name="bp.dao.bluequote" rev="latest.integration"
> ext="jar"/>
> <dependency name="bp.dao.brokerreg" rev="latest.integration"
> ext="jar"/>
> <dependency name="bp.dao.reporting" rev="latest.integration"
> ext="jar"/>
> <dependency name="bp.ws.commons" rev="latest.integration"
> ext="jar"/>
> </dependencies>
>
> <publications>
> <artifact name="bp.ws.brokerinformation.war" type="war" ext="war"/>
> </publications>
>
> </ivy-module>
>
>
> This is my ivysettings.properties
>
> <ivysettings>
> <properties file="${ivy.settings.dir}/ivysettings.properties"/>
> <settings
> defaultCache="${ivy.settings.dir}/ivy-cache"
> defaultResolver="localRepository"
> />
> <resolvers>
> <filesystem name="localRepository">
> <artifact
> pattern="${repository.dir}/[module]/[artifact](-[rev]).[ext]" />
> </filesystem>
> </resolvers>
> </ivysettings>
>
>
> On my build.xml, I have:
>
> <target name="resolve" description="--> resolve and retrieve
> dependencies with Ivy">
> <ivy:retrieve pattern="${lib.dir}/[artifact].[ext]"/>
> </target>
>
> <target name="publish" depends="resolve" description="--> publish
> artifacts and descriptors">
> <ivy:publish
> resolver="localRepository"
> artifactspattern="${distrib.dir}/[artifact].[ext]"
> forcedeliver="true"
> overwrite="true"
> />
> </target>
>
> When I call ant revolve target (<ivy:retrieve>), I get the following:
>
> BUILD FAILED
>
> /home/rigpa/IBM/rationalsdp/workspace/bp.ws.brokerinformation.war/build.xml:302:
> syntax errors in ivy file: java.text.ParseException: [xml parsing:
> ivy.xml:30:19: cvc-complex-type.2.4.a: Invalid content was found starting
> with element 'publications'. One of '{conflicts}' is expected. in
>
> file:/home/rigpa/IBM/rationalsdp/workspace/bp.ws.brokerinformation.war/ivy.xml
> ]
> at
>
> org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.checkErrors(AbstractModuleDescriptorParser.java:89)
>
>
> Am I missing something?
>
> Thanks for any help
>
> Jefferson
>
>
Re: Problems with dependencies
Posted by Maarten Coene <ma...@yahoo.com>.
Put the <publications> element before the <dependencies> element in your ivy.xml
Maarten
----- Original Message -----
From: Jefferson Magno Solfarello <jm...@gmail.com>
To: ivy-user@ant.apache.org
Cc:
Sent: Monday, May 30, 2011 9:48 PM
Subject: Problems with dependencies
Hi everybody,
I have a web application called brokerinformation, this application depends
on 5 modules at compile time, according to the ivy.xml bellow.
I need to to get the dependencies and put them into my lib directory.
Having the dependencies, I can generate the war.
I will still need to publish the war file on the same repository.
My ivy.xml file is the following:
<ivy-module version="1.0">
<info organisation="rigpa" module="brokerinformation" revision="1.1"/>
<dependencies>
<dependency name="bp.commons" rev="latest.integration"
ext="jar"/>
<dependency name="bp.dao.bluequote" rev="latest.integration"
ext="jar"/>
<dependency name="bp.dao.brokerreg" rev="latest.integration"
ext="jar"/>
<dependency name="bp.dao.reporting" rev="latest.integration"
ext="jar"/>
<dependency name="bp.ws.commons" rev="latest.integration"
ext="jar"/>
</dependencies>
<publications>
<artifact name="bp.ws.brokerinformation.war" type="war" ext="war"/>
</publications>
</ivy-module>
This is my ivysettings.properties
<ivysettings>
<properties file="${ivy.settings.dir}/ivysettings.properties"/>
<settings
defaultCache="${ivy.settings.dir}/ivy-cache"
defaultResolver="localRepository"
/>
<resolvers>
<filesystem name="localRepository">
<artifact
pattern="${repository.dir}/[module]/[artifact](-[rev]).[ext]" />
</filesystem>
</resolvers>
</ivysettings>
On my build.xml, I have:
<target name="resolve" description="--> resolve and retrieve
dependencies with Ivy">
<ivy:retrieve pattern="${lib.dir}/[artifact].[ext]"/>
</target>
<target name="publish" depends="resolve" description="--> publish
artifacts and descriptors">
<ivy:publish
resolver="localRepository"
artifactspattern="${distrib.dir}/[artifact].[ext]"
forcedeliver="true"
overwrite="true"
/>
</target>
When I call ant revolve target (<ivy:retrieve>), I get the following:
BUILD FAILED
/home/rigpa/IBM/rationalsdp/workspace/bp.ws.brokerinformation.war/build.xml:302:
syntax errors in ivy file: java.text.ParseException: [xml parsing:
ivy.xml:30:19: cvc-complex-type.2.4.a: Invalid content was found starting
with element 'publications'. One of '{conflicts}' is expected. in
file:/home/rigpa/IBM/rationalsdp/workspace/bp.ws.brokerinformation.war/ivy.xml
]
at
org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.checkErrors(AbstractModuleDescriptorParser.java:89)
Am I missing something?
Thanks for any help
Jefferson