You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Settle, William" <Wi...@fnf.com> on 2004/05/13 17:35:56 UTC
Is there a way to update the Class-Path in a manifest?
Does anyone know how to update the Class-Path in an existing JAR or Manifest file where I can add a JAR file to the existing Class-Path attribute?
Lets assume the existing Class-Path attribute looks like this:
Class-Path: mystuff.jar otherstuff.jar
And I want to add a new jar called new.jar. I want the attribute to be updated to look like:
Class-Path: mystuff.jar otherstuff.jar new.jar
I don't care about order so it can be first, last or somewhere in between.
I have tried:
<ear destfile="${my.ear}" update="true">
<manifest>
<attribute name="Class-Path" value="new.jar"/>
</manifest>
</ear>
But this just replaces the Class-Path attribute where I want to append "new.jar" to the existing attribute.
I have tried:
<manifest file="MANIFEST.MF" mode="update">
<attribute name="Class-Path" value="new.jar"/>
</manifest>
And of course it just replaces the Class-Path as well.
Any ideas? I would appreciate any help.
Thanks,
Bill