We do this with PC specific code like: <!-- NOTE: Begin NT specific behavior. --> <!-- Start the Windows command interpreter, run the specified command, exit --> <exec dir="." executable="cmd.exe"> <arg value="/C"/> <!-- Carries out the command specified by string and then terminates --> <arg value="copy"/> <!-- The command to be executed --> <arg value="resource1.properties+"/> <arg value="resource2.properties"/> <arg value="mergedresources.properties"/> </exec>
HTH, Pete Levi Cook wrote: > Probably a good question for the ant-user list, I'd check their archives > out at: > http://www.mail-archive.com/ant-user@jakarta.apache.org/ > > Offhand, I'm not aware of an ant task that performs the merging you ask > for. If you're not super worried about platform independent builds you > could apply the exec task on something like this: > > (winnt/win2k) > type 1st.properties >> all.properties && type 2nd.properties >> > all.properties > > Or > > (*nix) > cat 1st.properties >> all.properties && cat 2nd.properties >> > all.properties > > Regards, > Levi Cook > > -----Original Message----- > From: DEHAMER,BRIAN (HP-MountainView,ex1) [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 02, 2001 3:48 PM > To: '[EMAIL PROTECTED]' > Subject: RE: multiple resource files in ActionServlet? > > Is there anyway to have Ant merge multipe message resource files > together at build time? > > Brian DeHamer > [EMAIL PROTECTED] > > -----Original Message----- > From: Peter Alfors [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 02, 2001 1:31 PM > To: [EMAIL PROTECTED] > Subject: Re: multiple resource files in ActionServlet? > > I don't believe that you can do this. > However, there are a couple of options available to you... > 1. Make multiple files and merge them when you build your project. > 2. Extend ActionServlet and allow multiple resource bundles to be read > in. > I believe there was some mention a while back about automatically > merging multiple bundles specified in the web.xml file. > However, Im not sure if anything came about. > Check the archives... > HTH, > Pete > > Matteo Di Giovinazzo wrote: > In the web.xml webapp descriptor file it's possible to add in the > ActionServlet declaration multiple Resource files? Can I Write this? > <web-app> > .... > <!-- Action Servlet Configuration --> > <servlet> > <servlet-name>action</servlet-name> > <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> > <init-param> > <param-name>application</param-name> > <param-value>guestbook.GuestbookResources</param-value> > </init-param> > <init-param> > <param-name>application</param-name> > <param-value>todolist.MessagesResource</param-value> > </init-param> > <init-param> > <param-name>config</param-name> > <param-value>/WEB-INF/struts-config.xml</param-value> > </init-param> > <init-param> > <param-name>debug</param-name> > <param-value>2</param-value> > </init-param> > .... > > </servlet> > .... > </web-app> > > Thanks in advance to all! Matteo Di Giovinazzo