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 <[email protected]> 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