ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bauddhik <bdkan...@gmail.com>
Subject Ivy- Filesystem
Date Mon, 27 Feb 2012 14:15:40 GMT

I am trying to build a project as  
Project folder contains  
ivy-build.xml  
ivysettings.xml  
sub folders----> module1 ,module2

module1 folder will in turn have a ivy.xml and like this module2 folder also
have its separate ivy.xml
Now what i wanted to do is to call these modules ivy.xml from the
ivysettings.xml
        
   **ivy-build.xml**

    <project name="test" default="run" 
    xmlns:ivy="antlib:org.apache.ivy.ant">
    <property name="lib.dir" value="lib"/>
    <property name="build.dir" value="build"/>
    <property name="src.dir" value="src"/>
    <path id="lib.path.id">
    <fileset dir="${lib.dir}" includes="*.jar"/>
    </path>
    <path id="run.path.id">
    <path refid="lib.path.id"/>
    <path location="${build.dir}"/>
    </path>
    <ivy:settings file="ivysettings.xml"/>
    <target name="resolve">
    <ivy:retrieve/>
    </target>
    <target name="report" depends="resolve">
    <ivy:report todir="${build.dir}"/>
    </target>
    <target name="run" depends="resolve">
    </target>
    <target name="clean-cache">
    <ivy:cleancache />
    </target>
    </project>

**ivysettings.xml**
        
    <ivysettings>
    <settings defaultCache="${ivy.settings.dir}/ivy-cache"
defaultResolver="chained"/>
    <resolvers>
    <chain name="chained">
    <filesystem name="module1;">
    <artifact pattern="${repository.dir}/[artifact]-[revision].[ext]" />
    <ivy pattern="${repository.dir}/[module]-[revision]/ivy.xml" />
    </filesystem>
    <filesystem name="module2">
    <artifact
pattern="${repository.dir}/[module]/[artifact]-[revision].[ext]" />
    <ivy pattern="${repository.dir}/[module]/[module]-[revision]/ivy.xml" />
    </filesystem>
    <ibiblio name="libraries" m2compatible="true" usepoms="false" />
    </chain>	
    </resolvers> 
    <modules>
    <module organisation="com.virtusa" name=".*" resolver="chained"/>
    </modules>
    </ivysettings>

**Now i wanted this filesystem tag artifact pattern and ivy patter set as
that it goes inside my module 1 and module2 folder and find the ivy.xml**
        
**I am new to Ivy .read a lot about artifact and ivy pattern but i am still
confused how it will find my ivy.xml inside the module 1 and module 2
folder**
        
**ivy.xml -> inside module 1 folder**
        
    <ivy-module version="1.0">
    <info organisation="com.virtusa" module="depender"/>
    <dependencies>
    <dependency org="org.springframework"  name="spring-core"
rev="3.0.4.RELEASE" />
    <dependency org="org.springframework"  name="spring-aop"
rev="3.0.4.RELEASE" />
    <dependency org="org.springframework"  name="spring-hibernate3"
rev="2.0.8" />
    <dependency org="org.springframework"  name="spring-context"
rev="3.0.4.RELEASE" />
    <dependency org="org.springframework"  name="spring-beans"
rev="3.0.4.RELEASE" />
    <dependency org="org.springframework"  name="spring-web"
rev="3.0.4.RELEASE" />
    <dependency org="org.springframework"  name="spring-webmvc"
rev="3.0.4.RELEASE" />
    </dependencies>
    </ivy-module>
-- 
View this message in context: http://old.nabble.com/Ivy--Filesystem-tp33400003p33400003.html
Sent from the ivy-user mailing list archive at Nabble.com.


Mime
View raw message