ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject RE: Is there a way to update the Class-Path in a manifest?
Date Fri, 14 May 2004 19:41:32 GMT
If you look at the <replaceregexp> documentation you
will see the example that uses an expression that
contains a parenthetically-delimited pattern and does
the replace using \1 as part of the replace
expression, meaning whatever was matched by the 1st
parenthetically-delimited pattern.  If \1 is
available, \0 (all matched text) should be as well...

-Matt

--- "Settle, William" <William.Settle@fnf.com> wrote:
> 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:gudnabrsam@yahoo.com]
> 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" <William.Settle@fnf.com>
> 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:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/

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


Mime
View raw message