View RSS Feed

My Java Tips

Pom

Rate this Entry
by , 11-07-2011 at 07:01 PM (700 Views)
Maven uses an XML project descriptor to generate the object model for project. This file is POM.XML and should be located at the top level directory of the project.




The XML file contains all the needed information for the project. Apart from core information, it also contains groupid, version, name and all the libraries needed for the project.

<dependency>
<groupid>junit</groupid>
<artifactid>junit</artifactid>
<version>3.8.1</version>
<scope>test</scope>
</dependency>

You may create profiles in POM file as shown below:

<profiles>
<profile>
<id>student</id>
<properties>
<buildkind>work</buildkind>
</properties>
</profile>
<profile>
<id>solutions</id>
<properties>
<buildkind>solutions</buildkind>
</properties>
</profile>
</profiles>

Submit "Pom" to Facebook Submit "Pom" to Digg Submit "Pom" to del.icio.us Submit "Pom" to StumbleUpon Submit "Pom" to Google

Tags: None Add / Edit Tags
Categories
Maven , XML

Comments