http://haroon.sis.utoronto.ca/zarar/properties-maven-plugin/index.html
Martin ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Wed, 18 May 2011 09:14:19 -0700 > From: [email protected] > To: [email protected] > Subject: How do I add filtered properties to my pom.xml? > > I use the following setup to have maven inject filtered property values into > my application configuration files, such as the Spring > applicationContext.xml: > > File System: > src/main/filters/filter-test.properties > src/main/filters/filter-live.properties > src/main/resources/applicationContext.xml > > and in my pom.xml I do this: > > // use profiles to setup env property value as either test or live > ... > <build> > <filters> > <filter>${basedir}/src/main/filters/filter-${env}.properties</filter> > </filters> > <resources> > <resource> > <directory>src/main/resources</directory> > <filtering>true</filtering> > </resource> > </build> > > Now this works fine, but I would like to have my filter property files also > have properties entered into my pom.xml itself. > > For example, later in my pom.xml I use a weblogic deployment plugin which > deploys my war to the server. This of course requires properties which are > environment specific. I wish I could have these properties in my separate > filter-<env>.properties files as well, because right now the only thing I > seem to get working is if I set these properties within my profiles setup. I > dont want it in the pom.xml though, I want maven to load them from my > environment specific property file. > > Is there any way I can do this? > > So that when I configure my weblogic plugin with for example: > <adminServerHostName>${weblogic.host.name}</adminServerHostName> > > And I ran the pom.xml with my "test" profile activated, then maven should > pull the value of that property from my filter-test.properties file: > weblogic.host.name=testserver > > or whatever. > > -- > View this message in context: > http://maven.40175.n5.nabble.com/How-do-I-add-filtered-properties-to-my-pom-xml-tp4406945p4406945.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >
