Maven: run a build for multiple profiles in Eclipse

Viewed 1249

Let's suppose we have a Maven project in Eclipse. The pom.xml has two profiles.

The question is: how can I run maven in Eclipse in order to execute every goals for each profile?

I tried to:

  • setting active maven profiles in Properties/Maven -> didn't work
  • run maven with: clean install -Pprofile1 -Pprofile2 -> didn't work
  • run maven with: clean install -P profile1,profile2 -> didn't work
  • run maven setting "Profiles" under "Goals" ( profile1,profile2) -> didn't work

I want that maven will run for both profiles, executing all tasks in the pom.xml

Thanks.

1 Answers
Related