ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Archie Cobbs <arc...@dellroad.org>
Subject Re: Beginner question
Date Sun, 29 Aug 2010 14:08:16 GMT
First set up a resolver that points to the place you want to publish, e.g.
/usr/local/repo. Then use ivy:publish to put your artifacts (and ivy.xml
metadata) in there.

FWIW here are a couple of ant macros that I use for this...

    <!-- SVN revision -->
    <macrodef uri="urn:org.dellroad.ant" name="svnrevision">
        <attribute name="property" description="Name of property to set"/>
        <attribute name="dir" default="${basedir}"
          description="Target checked-out SVN directory"/>
        <sequential>
            <exec outputproperty="@{property}" executable="svnversion"
              logError="true" failonerror="true">
                <arg value="-n"/>
                <arg value="@{dir}"/>
            </exec>
        </sequential>
    </macrodef>

    <!-- Ivy module build -->
    <macrodef uri="urn:org.dellroad.ant" name="ivydist">
        <attribute name="version" description="Ivy module version"/>
        <attribute name="resolver" default="local-user"
          description="Name of ivy resolver with which to publish"/>
        <attribute name="ivyfile" default="${basedir}/src/ivy/ivy.xml"
          description="Ivy file to publish"/>
        <element name="module-preparation" implicit="true"/>
        <sequential>
            <dellroad:svnrevision property="svn_revision"/>
            <delete dir="${basedir}/build/ivy"/>
            <mkdir dir="${basedir}/build/ivy"/>
            <copy file="@{ivyfile}" toFile="${basedir}/build/ivy/ivy.xml"/>
            <module-preparation/>
            <ivy:resolve settingsRef="build-macros-ivy-settings"
              file="${basedir}/build/ivy/ivy.xml"/>
            <ivy:publish settingsRef="build-macros-ivy-settings"
forcedeliver="true"
              validate="true" overwrite="true" resolver="@{resolver}"
              srcivypattern="${basedir}/build/ivy/ivy.xml"
              pubrevision="@{version}-${svn_revision}">
                <artifacts pattern="${basedir}/build/ivy/[artifact].[ext]"/>
            </ivy:publish>
        </sequential>
    </macrodef>

-Archie

On Sat, Aug 28, 2010 at 11:59 PM, Mark <static.void.dev@gmail.com> wrote:

>  How can I publish know jars.. ie ones that we already have that arent
> available on public repos to our private repo.. we dont have one yet :)
>
> Are there any tutorials out there that someone can recommended thats not
> the wiki. Unfortunately the wiki is kind of confusing. Thanks
>


-- 
Archie L. Cobbs

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message