That does get close to what I'm looking for and will certainly do for now while we're still in development. Thank you.
Geoff > -----Original Message----- > From: Lajos Moczar [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 31, 2002 10:33 AM > To: [EMAIL PROTECTED] > Subject: Re: build target with no samples? > > > There is a simple way to build a cocoon.war file without the > samples. We > do it all the time to build our Azure product. First, you > need to have a > minimal sitemap somewhere in the source directory. I call mine > sitemap-min.xmap (it's attached) and I put it in > ./src/webapp. All I did > was take the original sitemap.xmap and edit out all the crap > between the > <map:pipelines> tags. > > Then I added a new target to ./build.xml: > > <target name="strip" depends="webapp" description="* Strips > the samples > out of the war package"> > <copy file="./src/webapp/sitemap-min.xmap" > tofile="./build/cocoon/webapp/sitemap.xmap"/> > <jar jarfile="./build/cocoon/cocoon-min.war" > basedir="./build/cocoon/webapp" > includes="sitemap.xmap,WEB-INF/**"/> > </target> > > Optionally, you can strip out extra jars and the stuff in the classes > directory, if you really wanted to get it lean. > > Regards, > > Lajos > galatea.com > > > Geoff Howard wrote: > > > > >>>Now you are asking a bit much. How is Ant to know what > >>> > >>components you > >> > >>>need. > >>> > >>It already does. > >>If you remove jars from the lib/optional dir it doesn't use > >>those features, > >>and doesn't include them in the config. > >> > > > > Right - I knew this much. I've looked at adding a condition in the > > "excludes" in prepare-src-main that could be controlled from a > > .ant.properties file to keep stuff we don't need out. For instance: > > <exclude name="**/poi/**" unless="poi.present"/> > > <exclude name="**/poi/**" if="poi.ignore"/> > > ... > > > > And set poi.ignore in the .ant.properties file in user.home > so that fresh > > cvs checkouts which put all the jars back in again don't > undo your changes. > > > > Unfortunately, I can't find any Ant documentation which > indicates whether > > you can combine both conditions into one statement ( > unless="poi.present AND > > !poi.ignore" ) which would be more maintainable. This > could also be done if > > the class-exists task would take an unless argument. I've looked at > > ClassAvailableTask and Task but can't quite figure out > whether this is > > already provided for or would need to be coded for explicitly. > > > > What do you think? > > > > The issue of unwanted examples still remains however. I'm > guessing that the > > only thing needed for this would be a build target with > fewer dependencies. > > > > Geoff > > > > > >>What is still lacking is a more user-friendly system and to > >>complete the > >>samples refactoring. > >> > >>Blocks will make all this possible without recompiling, so it > >>will even be > >>better. > >> > >>-- > >>Nicola Ken Barozzi [EMAIL PROTECTED] > >> - verba volant, scripta manent - > >> (discussions get forgotten, just code remains) > >>------------------------------------------------------------ > --------- > >> > >> > >>------------------------------------------------------------ > --------- > >>Please check that your question has not already been answered in the > >>FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> > >> > >>To unsubscribe, e-mail: <[EMAIL PROTECTED]> > >>For additional commands, e-mail: <[EMAIL PROTECTED]> > >> > > > > > --------------------------------------------------------------------- > > Please check that your question has not already been answered in the > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> > > > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > > For additional commands, e-mail: <[EMAIL PROTECTED]> > > > > > > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>