Re: Getting profile settings values in a Java class

2012-12-06 Thread Ron Wheeler
Default locale: fr_FR, platform encoding: Cp1252 OS name: "windows xp", version: "5.1", arch: "x86", family: "windows" Regards -- View this message in context: http://maven.40175.n5.nabble.com/Getting-profile-settings-values-in-a-Java-class-tp5722740p5735

RE: Getting profile settings values in a Java class

2012-12-06 Thread Javix
it means true Regards From: Ron Wheeler [via Maven] [ml-node+s40175n5735905...@n5.nabble.com] Sent: 06 December 2012 14:33 To: CAMBOUR Serguei Subject: Re: Getting profile settings values in a Java class Or the error messages. Or what the "it" is in

Re: Getting profile settings values in a Java class

2012-12-06 Thread Ron Wheeler
1252 OS name: "windows xp", version: "5.1", arch: "x86", family: "windows" Regards -- View this message in context: http://maven.40175.n5.nabble.com/Getting-profile-settings-values-in-a-Java-class-tp5722740p5735884.ht

Re: Getting profile settings values in a Java class

2012-12-06 Thread Anders Hammar
;windows" > > Regards > > > > -- > View this message in context: > http://maven.40175.n5.nabble.com/Getting-profile-settings-values-in-a-Java-class-tp5722740p5735884.html > Sent from the Maven - Users mailing list archive at Nabble.com. > >

Re: Getting profile settings values in a Java class

2012-12-06 Thread Javix
uot;, arch: "x86", family: "windows" Regards -- View this message in context: http://maven.40175.n5.nabble.com/Getting-profile-settings-values-in-a-Java-class-tp5722740p5735884.html Sent from the Maven - Users mailing list archive at Nabble.com. ---

Re: Getting profile settings values in a Java class

2012-12-05 Thread Anders Hammar
1.1 > > test > > > > > > info.cukes > > cucumber-junit > > 1.1.1 > > test > > > >

Re: Getting profile settings values in a Java class

2012-12-05 Thread Lyons, Roy
1.1.1 > test > > > junit > junit > 4.10 > test > > > > > >Executing > >mvn test > >w

Re: Getting profile settings values in a Java class

2012-12-05 Thread Javix
the 'vm' prifile. Using the same but in a different project runs only the activated profile, no matter if I pass -P option. Any idea? Thanks -- View this message in context: http://maven.40175.n5.nabble.com/Getting-profile-settings-values-in-a-Java-class-tp5722740p5735821.htm

Re: Getting profile settings values in a Java class

2012-09-21 Thread Zak Mc Kracken
Hi Javix, yes, this is what I mean. You may want to consider what emerged in this thread about the goodness of this practice. Cheers, M. On 21/09/2012 10:55, Javix wrote: Finally, I achived (I hope so, tell me if I'm wrong by pointing at some pitfalls). Here is the updated version of the PO

Re: Getting profile settings values in a Java class

2012-09-21 Thread Zak Mc Kracken
Hi Roy, that's a useful addition. Indeed I do something similar with with some command-line tools. I ship them as a zip which contains: a .jar a .sh/.bat invoking commands and a default .properties file. For the latter, I want different defaults depending on the environment where I deploy fin

Re: Getting profile settings values in a Java class

2012-09-21 Thread Javix
ources with the following content: host=${host} And it worked for me. Thank you all. Regards -- View this message in context: http://maven.40175.n5.nabble.com/Getting-profile-settings-values-in-a-Java-class-tp5722740p5722849.html

Re: Getting profile settings values in a Java class

2012-09-21 Thread Javix
in a Java class Thanks in advance. -- View this message in context: http://maven.40175.n5.nabble.com/Getting-profile-settings-values-in-a-Java-class-tp5722740p5722845.html Sent from the Maven - Users mailing list archive at Nabble.com. -

Re: Getting profile settings values in a Java class

2012-09-20 Thread Lyons, Roy
I would like to say that there is definitely a better way. You *could* continue to use maven for filtering your properties, but I wouldn't use it as part of the build of the application. If you are simply using scp or other similarly crude method of deployment (meaning you are just deploying as

Re: Getting profile settings values in a Java class

2012-09-20 Thread Zak Mc Kracken
OK, I understand that in general it should be considered an anti-pattern. Despite that, in my organisation we deploy a number of internal tools on a couple of servers and with different configurations (dev, test, production). To achieve this we do what it was originally asked in this thread.

Re: Getting profile settings values in a Java class

2012-09-20 Thread Wayne Fay
> System.out.println("## in the Person constructor"); > System.out.println("Got system properties: " + > System.getProperty("host")); Maven wasn't really built for this purpose/use case so I doubt you will be overly happy with how it is handled in Maven. Instead I think

Re: Getting profile settings values in a Java class

2012-09-20 Thread Ron Wheeler
); } ... } I got always NULL as property value. Regards -- View this message in context: http://maven.40175.n5.nabble.com/Getting-profile-settings-values-in-a-Java-class-tp5722740p5722744.html Sent from the Maven - Users mailing list archive at Nabble.com.

Re: Getting profile settings values in a Java class

2012-09-20 Thread Javix
} ... } I got always NULL as property value. Regards -- View this message in context: http://maven.40175.n5.nabble.com/Getting-profile-settings-values-in-a-Java-class-tp5722740p5722744.html Sent from the Maven - Users mailing list archive at Nabble.com. -

Re: Getting profile settings values in a Java class

2012-09-20 Thread Wayne Fay
> I defined several profiles in the POM file. Each profile should have its own > properties defined for host name, DB config values , etc. - to use them > later in the Java code. How is it possible (I hope it is) to define that in > the POM file? What are you trying to achieve? What have you alrea

Getting profile settings values in a Java class

2012-09-20 Thread Javix
.40175.n5.nabble.com/Getting-profile-settings-values-in-a-Java-class-tp5722740.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands