Tuesday, February 19, 2013

Maven and Profile

How to create a Maven Project in Eclipse:

1. Install Eclipse 4.2.0 (Juno) or latest
2. Add the maven plugin in Eclipse using the following update site URL.
      http://m2eclipse.sonatype.org/sites/m2e
(or)
      http://m2eclipse.sonatype.org/update/ 
(or)
      http://m2eclipse.sonatype.org/update-dev/ 
3. Create Maven Project
















4. Run the Project using Maven.


How to use Profile in maven build?

Create Maven POM and Profile file under the root folder:


  1. Maven pom file is               : pom.xml
  2. Maven profile file name is   : profile.xml








This i how you have to refer the profile file in Maven POM.xml file:

No comments: