ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Jackson" <>
Subject Odd use case for import...
Date Wed, 21 Feb 2007 10:12:17 GMT
Hi all,

I've just come unstuck with <import>.

I have an archive of a set of files (jars, xml etc) which I've
installed in my maven repo (~/.m2/repository/f.q.d.n.<my archive>)

Inside that archive I have a common.xml file which contains a set of
common ant tasks.  I want to be able to extract the archive from the
maven repo and then import the common tasks and then run said common
tasks.  Problem <import> cannot be nested in a target so I'm stuck
with a broken import as the file hasn't been extracted (yet) and I
cannot setup a dependency to a previous target (extract).

Now a workaround may be to use <ant> to delegate to the file as I can
nest this in a target which will then ensure that my dependencies are
fine, but I'm wondering if anyone has a better suggestion.

build.xml :

<project name="my-mail"> <!-- name changed to protect the innocent :) -->
	<target name="setup" description="Configures properties">
		<property file=""/>
		<property name="mvn.repo" value="${user.home}/.m2/repository"/>
		<property name="src.dir" value="${basedir}/src"/>
		<property name="" value="${src.dir}/tools"/>
		<property name="" value="${}/build"/>
		<property name="ant.common.dir" value="${}/ant"/>
		<!-- used for temporary files generated during installation-->
		<property name="build.dir" value="${basedir}/build"/>
		<mkdir dir="${build.dir}"/>
		<mkdir dir="${}"/>

	<target name="extract-mail-lib" depends="setup" description="Gets the
lib from m2 repo">
		<!-- unzip mvn repo version of james -->

	<import file="${ant.common.dir}/common.xml"/>


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message