ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From todd lee <Todd_...@amis.com>
Subject Re: Ivy Publish module with no dependencies
Date Thu, 03 May 2007 14:48:06 GMT



Xavier Hanin wrote:
> 
> Publish is the right way to go, the only problem is that publish
> automatically calls deliver if you don't provide the ivy.xml to
> publish, which in turns calls resolve. But if you really provide the
> ivy file (using srcivypattern), publish shouldn't try to call a
> resolve. If you still do not succeed, please send us more details
> about your task call and your build environment.
> 

Thanks Xavier - but looks like I'm still running into a problem. It's
complaining that ivy.organisation is not set...
Here's the highlevel project setup:

four files sitting in basedir: build.xml, ivy.xml, component.properties,
artifact.bin
build.xml loads component.properties
build.xml has 'publish' target which depends on 'configure' and performs an
ivy:publish.

Here's some code snippets for more detail:

<snip build.xml>
...
    <!-- ==================================================== 
         Ivy specific common properties: 
         ==================================================== -->
        <property name="ivy.resolver" value="local-repository" />
        
        <property name="ivy.conf.dir" value="C:/autobuild_root/ivy" />
        <property name="ivy.repo.dir"
value="${ivy.conf.dir}/local-repository" />

        <property name="ivy.project.dir" value="${basedir}" />
        <property name="ivy.overwrite.repo" value="false" />
...

    <!-- ================================= 
          target: init_publish      
         ================================= -->
    <target name="init_publish" description="--> initializing the autobuild
script" >
        <!-- read in component properties for ivy modules if they exist-->
        <property file="${ivy.project.dir}/component.properties" />
    </target>

    <!-- ================================= 
          target: configure              
         ================================= -->
    <target name="configure" depends="init_publish" description="-->
configure Ivy for use">
        <ivy:configure file="${ivy.conf.dir}/ivyconf.xml"/>

    </target>
    
    <!-- ================================= 
          target: publish        
         ================================= -->   
    <target name="publish" depends="configure" description="--> publication
of the project artifats">  
        <ivy:publish
                resolver="${ivy.resolver}"
                srcivypattern="${ivy.project.dir}/ivy.xml" >
                <artifacts pattern="${ivy.project.dir}/[artifact].[ext]" />
        </ivy:publish>
    </target>
...

</snip build.xml>

<snip component.properties>
 component.organisation=myOrg
 component.module=myMod
 component.artifact=artifact
 component.type=bin
 component.ext=bin
</snip component.properties>

<snip ivy.xml>
... 
    <info organisation="${component.organisation}"
module="${component.module}" />
    <publications>
       <artifact name="${component.artifact}" type="${component.type}"
ext="${component.ext}"/>
    </publications>

    <dependencies/>

    <conflicts>
            <manager name="latest-revision"/>
    </conflicts
...
</snip ivy.xml>

So as I understand it, ivy should use the local ivy.xml with the properties
substituted in ivy.xml to publish the local artifact - right? I'm not sure
why it's complaining about organisation not being set etc... help is much
appreciated.

Todd
-- 
View this message in context: http://www.nabble.com/Ivy-Publish-module-with-no-dependencies-tf3676987.html#a10305527
Sent from the ivy-user mailing list archive at Nabble.com.


Mime
View raw message