Jan mentioned the replaceregexp task but from reading the doc, it looks like it allows me to use a regular expression to search for a string but it looks like it still just does a replace on the string it finds. I don't see a way to append to an existing string in a file. Hum... perplexing. I just have to think that ant has something native that will do this.
Just a note about why I'm wanting this. We have yet another services oriented architecture (yasoa) where I create an unconfigured ear file using ant. I want to provide our customers (internal applications) with an ant script that allows them to plop their services jars and dependencies, resource and configuration files in a known directory structure, then script will blow the ear apart as well as the internal ejb jars and wars then repackage specifically for their environment. Everything is easy with ant except for updating the manifest information in the ear, jars and wars. What I am currently doing is writing out the manifest classpath information for each archive to a property file that goes along with the configure/deploy script. The script uses that information and adds the additional customer specific jars and resources to it then updates the manifest for each archive. Not a lot of extra work but it is ugly. It just seems unnecessary if ant provides a mechanism to do it. I don't want the end user (deployer) to have to add custom tasks to his build environment, hence wanting a native ant way to perform the task. Thanks, Bill -----Original Message----- From: Matt Benson [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 12:14 PM To: Ant Users List Subject: RE: Is there a way to update the Class-Path in a manifest? What if you <unjar> and use a replaceregexp and/or other filters to append to the file, then update with the resulting manifest? -Matt --- "Settle, William" <[EMAIL PROTECTED]> wrote: > Jan, > > I appreciate the response but I don't want to > replace, I want to append or prepend depending on > situation which requires reading the manifest > Class-Path and appending to it. Then it could be > replaced. The manifest has to be read first. Your > procedure of unjar, replace, jar does not take into > account what was already in the manifest... it just > overwrites it. > > I'm still looking for a solution unless I'm just too > blind to see ;> > > Thanks, > Bill --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
