Hi Jörg, > first you should be more precise on what you really want to do, e.g. by making > an example.
I have web project that contains some subprojects. As The super-pom calls the pom.xml from the subprojects and invoke they. Each single project are more or less indiependet from each other and they can be built and installed seaperatly. The system architecture is configured as follows: a local instance on your own computer and another fore instance with different URIs. If you want to install the current version on all servers you have to start the building process more than one times or you do it manually. (of couse you can use the particular commandline option). For more comfort I've got the task to develop a maven script that is able to read the profil properties from settings.xml. So there is only "one mouse click" nessecary to deploy they on all enviroments. Rainer PS: To prevent misunderstanding: The software works in a content management system, that contains its own servlet container. 2013/1/11 "Jörg Hohwiller" <[email protected]>: > Hi everybody, > > first you should be more precise on what you really want to do, e.g. by making > an example. > > I assume that you are talking about environment specific settings. > So e.g. you have different environments like test, stage, live or maybe also > linux, windows, mac. > > The best practice is to keep all environment specific settings out of your > artifacts > so they are portable. Ship them with some reasonable fallbacks. > > On the target environment define the custom settings there in a way that > overrides the defaults. > > E.g. assume you have: > myproject-default.properties > that is deployed inside your jar. > And > myproject-environment.properties > that, if found overrides the defaults. > You can do that with Properties.load or with springframework, etc. > Dig into m-m-m.sf.net if you look for an example. > > If you are reading from classpath and have a webapp you can put > myproject-enviroment.properties > into the lib directory of your catalina-base. > > This approach worked fine for me in many different projects. > Building an artifact differently for different profiles is always causing > pain! > > Cheers > Jörg > > > "Rainer Völschow" <[email protected]> hat am 11. Januar 2013 um 11:39 > geschrieben: >> Hi Patrick, >> >> one part of my question was, how can I pass the profiles to pom.xml >> >> > If what you want is to deploy a war with different servers (possibly with >> > different configurations), you could use profiles. >> >> It seems there is no way that I can use Maven only. So I go into >> myself and try to look for an alternative way. >> >> 2013/1/10 Patrick Turcotte <[email protected]>: >> > Hi, >> > >> > If what you want is to deploy a war with different servers (possibly with >> > different configurations), you could use profiles. >> > >> > And if you want to do it for all of them in one go, you could write a >> > script >> > (bat, bash) that would wrap it. >> > >> > Patrick >> > >> > >> > On 13-01-10 10:43 AM, Rainer Völschow wrote: >> >> >> >> Hello folks, >> >> >> >> at my work I've got the task to develop a maven build script, that is >> >> able to deploy a project to different server enviroments. According my >> >> resaerch in the Internet, it seems that the maven-invoker-plugin is >> >> the only once option for that. I visited the homepage of that plugin >> >> serveral times, but I couldn't get any idea how can I achive this. >> >> Where I'm stuck is, how can I get all defined profiles and pass it to >> >> the invoke-plugin? >> >> >> >> Thanks in Advance >> >> Rainer >> >> >> >> PS: Any alternatives idears to rech the goal are welcome. :-) >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: [email protected] >> >> For additional commands, e-mail: [email protected] >> >> >> > >> > >> > -- >> > Patrick Turcotte >> > Directeur technologique >> > ------------------------------------------------ >> > [email protected] >> > (819) 780-8955, poste 1129 >> > Sans frais 1-800-996-8955, poste 1129 >> > >> > >> > >> > --------------------------------------------------------------------- >> > 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]
