If you have no interest in using Maven for project management, then you probably don’t need to touch your Maven project settings, which are stored in a file called pom.xml (Maven’s Project Object Model).
Most of the defaults are fine, but there are few key elements some folks may want to update.
Starting at the fifth line of pom.xml, you’ll see:
<groupId>php-quickstart</groupId> <artifactId>php-quickstart</artifactId> <packaging>pom</packaging> <name>PHP Quickstart</name> <version>1.0-SNAPSHOT</version>
The groupId is an identifier that’s typically unique within your organization, and usually follows a Java package structure. All official Clickframes components use the groupId org.clickframes. If your company has its website at mycompany.com, your groupId could be com.mycompany.
The artifactId is the unique identifier for your project, within the context of the above groupId. It has no spaces, and words are usually separated by hyphens. An issue tracker application might have an artifactId of issue-tracker.
The packaging element specifies what Maven should generate when you build your project. For our purposes, pom is just right.
The name element is a descriptive, properly spaced and capitalized name for your project, e.g. Crazy Al's Discount Issue Tracker.
Finally, the version element indicates the current version of your project. Maven traditionally uses the SNAPSHOT designation to indicate versions that are under development. For example, you might start your project as 1.0-SNAPSHOT When you’re ready to release, you’d change it to 1.0 and check it in to your source control with a special “version 1.0″ tag. Then, you’d change the version to 1.1-SNAPSHOT to work on the next minor release, or to 2.0-SNAPSHOT if for a more major release. Maven can automate this process for you using the release plugin.
No comments yet.