views:

167

answers:

2

Hi,

i have some questions about Maven 2 and i hope somebody can clear things up for me:

  1. made a new thread about that (link: http://stackoverflow.com/questions/540697/maven-2-plugin-build-surfire)

  2. Is it possible to define a profile several times with diffrend values (such as use a diffrend configruation file) and activate those profiles all? I tried that once and it seems that just one profile gets actually executed.

  3. Is this solution common or probably recommendable: I have several projects which have a lot of stuff in their pom twice(meaning project a has some reporting plugins and project b the same), i now make a new project which is packed as pom and do all things in there which my projects have common and let them inherit from this parent pom. I actually think this is good because it makes my pom files thinner but on the other hand i have a parent project which is just a pom file.

  4. Does somebody have expierince with Maven + Selenium ? I've tried mavenium, ant task selenese, and maven plugin to execute my tests .. and quiete frankly eveyone of them gave me trouble. All in all the ant selenese was the one who actually worked .. kinda. I'm feeling like i'm using the wrong jar files or don't know what i really need (i thought it would be ok to get java-client-driver, do i need seleneium-server or rc too?)

I hope it is okay that i make one thread with kinda 4 questions (at least they are all about maven 2). Thanks in advance for your response.

kukudas

+1  A: 

Please ask separate questions next time.

  1. I cannot answer that. I'm not really sure I understand the question.

  2. Different profiles can contain different values for a given plugin. Normally if you activate all of them, only one of them will win.

  3. Pom-only parent poms are recommended. Actually they are the only way to stay sane.

  4. We have plenty of experience with running selenium, but only thorough the surefire-plugin (and with the jetty-plugin), since all of our tests are junit based. It works really well.

krosenvold
Ok sorry about that. Thanks for your respsonse. Some how my first question got messed up i will edit it now.
kukudas
I suggest you just remove Q1 from this question and rephrase a totally new one ;)
krosenvold
Ok i will do that thanks.
kukudas
+1  A: 

Profiles in Maven are additive. From the command line you can make a call like this example to activate two profiles:

mvn package -Pprofile1,profile2
Matthew McCullough
Yep, but the results are merged...thus if you redefine a value in each profile, only the last one will win.
Brian Fox