Having problems publishing my war to the repository:
Here are all components:
1) build.xml of the project di (which is a war project)
<project name="di" basedir="." default="retrieve"
xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
<!-- proprietes qui indiquent des repertoires -->
<property name="src" location="Java Source"/>
<property name="build" location="Web Content/WEB-INF/classes"/>
<property name="lib" location="Web Content/WEB-INF/lib"/>
<property name="projectType" value="war"/>
<!-- nom de la version du projet quand on le publie dans le cellier
-->
<property name="revision" value="prod"/>
<!-- patterns pour selectionner le contenu du jar publie -->
<patternset id="jar.content.id">
<include name="**/*.class"/>
<include name="**/*.properties"/>
</patternset>
<!-- fichier qui contient les targets executees par ant -->
<import file="../OFACDependencies/common.xml"/>
</project>
2) common.xml which contains the target:
<target name="publish-war" depends="compile,retrieve" description="-> publish
this project's war in the ivy repository">
<delete>
<fileset dir="${jar}" includes="**"/>
</delete>
<mkdir dir="${jar}"/>
<!-- creer le war a publier -->
<war destfile="${jar}/${ant.project.name}.war"
manifest="${webcontent}/META-INF/MANIFEST.MF"
webxml="${webcontent}/WEB-INF/web.xml">
<fileset dir="${webcontent}" includes="**"
excludes="WEB-INF/web.xml"/>
</war>
<ivy:publish resolver="shared"
artifactspattern="${cellier}/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
pubrevision="${revision}" />
</target>
3) ivy conf file:
<ivyconf>
<conf defaultResolver="shared"/>
<!-- on utilise un seul repertoire comme cellier -->
<property name="cellier" value="I:/shared" />
<resolvers>
<filesystem name="shared">
<ivy
pattern="${cellier}/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
/>
<artifact
pattern="${cellier}/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
/>
</filesystem>
</resolvers>
<classpath file
="I:/shared/ofac/OFACDependencies/HEAD/jars/OFACDependencies.jar"/>
<!-- strategie qui considere que CURRENT est plus recent que HEAD qui est
plus recent que prod etc...
OfacLatestStrategyTest donne une bonne idee de son comportement. -->
<typedef name="ofac-latest-strategy" classname =
"ch.ofac.ivy.latest.OfacLatestStrategy"/>
<latest-strategies>
<ofac-latest-strategy name="ofac-latest" />
</latest-strategies>
<!-- Conflict manager qui utilise la strategie definie plus haut -->
<conflict-managers>
<latest-cm name="ofac-cm" latest="ofac-latest"/>
<latest-revision name="latest-revision"/>
</conflict-managers>
</ivyconf>
4) ivy.xml of the project:
<ivy-module version="1.0">
<info organisation="ofac" module="di" revision="prod" />
<publications>
<artifact name="di" type="war">
<conf name="*"/>
</artifact>
</publications>
<dependencies>
<dependency org="ofac" name="OFACDI" rev="prod" changing="true"/>
<dependency org="ofac" name="OFACWeb" rev="prod" changing="true"/>
<dependency org="ofac" name="OFACUtil" rev="prod" changing="true"/>
<dependency org="ofac" name="OFACPage" rev="prod" changing="true"/>
<dependency org="ofac" name="OFACPool" rev="prod" changing="true"/>
<dependency org="ofac" name="OFACFramework" rev="prod" changing="true"/>
<dependency org="ofac" name="OFACRM" rev="prod" changing="true"/>
<dependency org="ofac" name="OFACCommon" rev="prod" changing="true"/>
</dependencies>
<conflicts>
<manager name="ofac-cm" org="ofac"/>
<manager name="latest-revision" org="(?!ofac).*"/>
</conflicts>
</ivy-module>
5) Repository path where to find the war:
I:\shared\ofac\di\prod\wars\di.war
6) Error message when trying to publish:
[ivy:retrieve] :: retrieving :: [ ofac | di ]
[ivy:retrieve] confs: [war]
BUILD FAILED
C:\RAD7\workspace\OFACDependencies\common.xml:77: impossible to ivy retrieve:
java.lang.RuntimeException: problem during retrieve of [ ofac | di ]:
java.lang.IllegalStateException: no report file found for [ ofac | di ] war in
C:\Documents and Settings\bhatia\.ivy\cache: ivy was looking for C:\Documents
and Settings\bhatia\.ivy\cache\ofac-di-war.xml
Total time: 3 seconds
Any help will be appreciated. I seem to be having problems with war files.
thanks
-----Message d'origine-----
De : Gilles Scokart [mailto:[EMAIL PROTECTED]
Envoyé : mardi, 12. juin 2007 10:44
À : [email protected]
Objet : RE: ivy resolves only jar(s) type
That's the right approach.
Gilles
> -----Original Message-----
> From: Bhatia Saurabh [mailto:[EMAIL PROTECTED]
> Sent: mardi 12 juin 2007 10:33
> To: [email protected]
> Subject: TR: ivy resolves only jar(s) type
>
> It seems I need to add the following in each of my war modules' ivy.xml:
>
> <publications>
>
> <artifact name="ph" type="war"></artifact>
>
> </publications>
>
>
>
> ________________________________
>
> De : Bhatia Saurabh
> Envoyé : mardi, 12. juin 2007 10:03
> À : '[email protected]'
> Objet : TR: ivy resolves only jar(s) type
>
>
>
> I found on the "document" section, some guidelines to add the <artefact>
> sub-element
>
> Under the <dependency> element.
>
>
>
> So I did this:
>
>
>
> <dependency org="ofac" name="fa" rev="prod" changing="true">
>
> <artifact name="fa" type="war"/>
>
> </dependency>
>
>
>
> Now I get the message following error message: "a required artifact is not
> listed by module descriptor"
>
>
>
> Trying to figure out...
>
>
>
> thanks
>
> ________________________________
>
> De : Bhatia Saurabh
> Envoyé : mardi, 12. juin 2007 09:01
> À : [email protected]
> Objet : ivy resolves only jar(s) type
>
>
>
> Hello,
>
>
>
> When I do a resolve, ivy always looks in /jars and my resolve fails. Is
> there a way to specify the type of a module/dependency ? Specifying
> type="" is illegal in the <dependency> element.
>
>
>
> My ivy conf is :
>
> <ivyconf>
>
> <conf defaultResolver="shared"/>
>
> <!-- on utilise un seul repertoire comme cellier -->
>
> <property name="cellier" value="I:/shared" />
>
> <resolvers>
>
> <filesystem name="shared">
>
> <ivy
> pattern="${cellier}/[organisation]/[module]/[revision]/[type]s/[artifact].
> [ext]" />
>
> <artifact
> pattern="${cellier}/[organisation]/[module]/[revision]/[type]s/[artifact].
> [ext]" />
>
> </filesystem>
>
> </resolvers>
>
>
>
> <classpath file
> ="I:/shared/ofac/OFACDependencies/HEAD/jars/OFACDependencies.jar"/>
>
>
>
> <!-- strategie qui considere que CURRENT est plus recent que HEAD qui
> est plus recent que prod etc...
>
> OfacLatestStrategyTest donne une bonne idee de son comportement.
> -->
>
> <typedef name="ofac-latest-strategy" classname =
> "ch.ofac.ivy.latest.OfacLatestStrategy"/>
>
> <latest-strategies>
>
> <ofac-latest-strategy name="ofac-latest" />
>
> </latest-strategies>
>
>
>
> <!-- Conflict manager qui utilise la strategie definie plus haut -->
>
> <conflict-managers>
>
> <latest-cm name="ofac-cm" latest="ofac-latest"/>
>
> <latest-revision name="latest-revision"/>
>
> </conflict-managers>
>
>
>
> </ivyconf>
>
>
>
> For example, in the following ivy file, I want that for lowercase names,
> it should search the repository for /wars and for uppercase names /jars.
> How can I point ivy to the right directory in the repository ?
>
>
>
> <ivy-module version="1.0">
>
> <info organisation="ofac" module="nr" />
>
> <dependencies>
>
> <dependency org="ofac" name="OFACDI" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACNR" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="fa" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="ph" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACFC" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACPool" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACFA" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACRM" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACTO" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACNF" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACCZ" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACCS" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACPage" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="ad" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACCL" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACIM" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACAD" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACWeb" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACMN" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACWW" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACCA" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACGD" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACOF" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACFramework" rev="prod"
> changing="true"/>
>
> <dependency org="ofac" name="OFACDO" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACCommon" rev="prod" changing="true"/>
>
> <dependency org="ofac" name="OFACDL" rev="prod" changing="true"/>
>
> </dependencies>
>
> <conflicts>
>
> <manager name="ofac-cm" org="ofac"/>
>
> <manager name="latest-revision" org="(?!ofac).*"/>
>
> </conflicts>
>
> </ivy-module>
>
>
>
> Thanks
>
>