The Assembly plugin can have multiple assemblies defined. We produce one distribution with ALL configs in it though. ________________________________
Curt Yanko | Continuous Integration Services | UnitedHealth Group IT Making IT Happen, one build at a time, 600 times a day > -----Original Message----- > From: [email protected] [mailto:[email protected]] > Sent: Monday, November 22, 2010 6:19 PM > To: [email protected] > Subject: RE: Multiple packages with different configuration files > > Eric, > > Let me elaborate on the issue. I cannot use profiles as it > will create only one distribution for me. I need to have the > same compiled cod bundled with different config files for > DEV/QA/PROD. Is there are any easy way to create 3 TAR files > from one jar or war and include different sets of config > files within each of them? How can I implement it with Assembly mojo? > > > Thanks > > Ilya Mayzel > Distributed Change Management > UBS Financial Services Inc. > 1000 Harbor Boulevard, 4th Floor > Weehawken, NJ-07086 > Phone: 201-352-7976 > Email : [email protected] > > -----Original Message----- > From: Haszlakiewicz, Eric [mailto:[email protected]] > Sent: Monday, November 22, 2010 3:38 PM > To: Maven Users List > Subject: RE: Multiple packages with different configuration files > > > Well those are some rather useless answers. > JNDI will only "do the job" if you configure it that way. You need to > get that configuration *into* tomcat somehow in the first place, > regardless of whether you use JNDI or a properties file. > > To suggest some options for the original poster: > There are several different options to choose which > configuration gets > used or included in a application package. One way, which I > have used a > fair amount, is to include all configurations, and have an environment > variable that you set when you run that app that causes it to > choose the > right file. The exact method of doing this depends on > exactly how your > configuration is stored, but it might consist of things like having > property references in spring config files, tomcat setenv.sh scripts > that pass appropriate java options, or custom java code > within your app > that looks for the variable settings. > > On the other hand, if you want actual, separate application packages, > each that only contains a single set of configuration > options, well then > you're back in the realm of how to get maven to do that for you. What > I've done for this is use profiles with embedded ant tasks > that copy the > appropriate files into place. Then to build a dev > environment you might > do something like "mvn -P dev package". Of course, you can use any > other plugin config within a profile other than the ant > plugin, such as > having separate assembler plugin configs and include different > configuration files that way. > There's lots of way to do it; I'm not sure what the best one is. > > eric > > >-----Original Message----- > >From: Ron Wheeler [mailto:[email protected]] > >Sent: Monday, November 22, 2010 1:03 PM > >To: [email protected] > >Subject: Re: Multiple packages with different configuration files > > > > > >JNDI will do the job on Tomcat. > > > >Ron > > > > > >On 22/11/2010 1:47 PM, Antonio Petrelli wrote: > >> 2010/11/22<[email protected]>: > >>> This app need to be packaged with different configuration files > >>> (server names/IP addresses) for Dev/QA/Prod environments. > >> This kind of info are better put in the server. For example, for > >> JBoss, you can create a .properties file and put it inside: > >> <jboss>/server/<yourserver/conf > >> Everything in the conf directory is available in your classpath. > >> > >> Antonio > >> > >> > --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [email protected] > >> For additional commands, e-mail: [email protected] > >> > >> > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [email protected] > >For additional commands, e-mail: [email protected] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > Please visit our website at > http://financialservicesinc.ubs.com/wealth/E-maildisclaimer.html > for important disclosures and information about our e-mail > policies. For your protection, please do not transmit orders > or instructions by e-mail or include account numbers, Social > Security numbers, credit card numbers, passwords, or other > personal information. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
