You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Nestor Dutko <ne...@gmail.com> on 2009/07/22 15:33:09 UTC
Overriding previous definition of reference to ...
I have a project that contains a number of subprojects.
To prevent duplication and potential skew, common properties and
declarations are placed into a separate XML file (common.xml) that is
re-used by the subprojects when they are build.
common.xml looks like:
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Cross BUILD file constant properties -->
<property environment="env" />
<property name="emll.base" value="${env.VIEWROOT}/emll"/>
<!-- Define the macro's required for all -->
<import file="${emll.base}/ant-imports/ccr_macros.xml"/>
<!-- Property used to determine inclusion - and prevent inclusion more
than once. -->
<if>
<not><isset property="_include.emll.common"/></not>
<then>
<property name="_include.emll.common" value="included"/>
<path id="ocm.jsse.classpath">
<fileset dir="${ocm.dependencies.root}/ocm_common">
<include name="jsse.jar"/>
</fileset>
</path>
</then>
</if>
This file (common.xml) is then included using the following constructs in
the subprojects
<!DOCTYPE project [
<!ENTITY common SYSTEM "file:./common.xml">
] >
&common;
Our main build (that compiles all subprojects) is used to drive the overall
product build. I find that we see msgs of the form:
Overriding previous definition of reference to ocm.jsse.classpath when a
target nests (antcalls') out to another subtarget and the subtarget is in
one of these subprojects.
I understand that <path id=...> structures are not interpretted at runtime
but are parsed and this is where the message is coming from. Is there a way
to prevent this from occurring and yet retain the centralized definition of
constants such that they can be used from within subprojects when they are
built or the overall project build is invoked?
I should mention that I am using Ant 1.6.2 and have to for a number of
reasons.
Thanks
Nestor
Re: Overriding previous definition of reference to ...
Posted by Stefan Bodewig <bo...@apache.org>.
On 2009-07-22, Nestor Dutko <ne...@gmail.com> wrote:
> I understand that <path id=...> structures are not interpretted at runtime
> but are parsed
[in 1.6.x, this has changed in 1.7.x]
> and this is where the message is coming from. Is there a way to
> prevent this from occurring and yet retain the centralized
> definition of constants such that they can be used from within
> subprojects when they are built or the overall project build is
> invoked?
No, in particular not with
> I should mention that I am using Ant 1.6.2 and have to for a number of
> reasons.
8-)
Later versions should detect that the two path instances are actually
the same - and Ant 1.7.0 would at least move the warning message to
the -verbose level.
The warning itself is harmless in your case, but there is no way to
avoid it.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org