ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Manifests, copy task
Date Fri, 16 Nov 2001 11:59:20 GMT
On Fri, 16 Nov 2001, brian ewins <brian.ewins@btinternet.com> wrote:

> Also, is what Conor's saying right?

If Conor says, it is possible, it is 8-).  He has written the code.

> I have the 1.4 code in front of me and I can't see anything in the
> jar task or 'manifest' code that would allow this?

I only have the 1.5alpha code on my machine ATM, here <jar> supports a
nested <manifest> element, which in turn supports nested <section> and
<attribute> children.

<attribute> has name and value attributes - if you convert your <path>
to a <property> (using <property>'s refid attribute), you can get its
value into a Manifest file attribute via the value attribute and ${}
expansion of your property.

> On an unrelated note... does anyone else find it odd that the 'copy'
> task can add a fileset but not a path?

Just today somebody has asked the same question, but honestly, I've
never thought about using a path in copy before.  I think one of the
main problems is that <fileset> doesn't support absolute paths on
filesystems with multiple roots like Windows, otherwise you could get
away without duplication by something like

<path id="for.compiles">
  <fileset id="for.copy" dir="/">
    <include name="${some.jar}" />
    <include name="${some-other.jar}" />
  </fileset>
</path>

and use a reference to for.compiles in javac, rmic, javadoc whatever
and a reference to for.copy in copy, war or similar.

Main drawback, this won't work on non-Unix systems.

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message