Maven Concepts: Difference between revisions
No edit summary |
|||
Line 9: | Line 9: | ||
==Group ID== | ==Group ID== | ||
The group ID is an unique identifier (ideally, globally) for a project. | The group ID is an unique identifier (ideally, globally) for a project. It is specified as [[Maven_pom.xml#.3CgroupId.3E|<groupId>]] at the top of the POM file. | ||
Conventionally uses a dot notation, but it does not have to. When it does use the dot notation, the groupId does NOT have to correspond to the package structure of the project it designates; it is, though, a good practice to follow. When stored within a repository, the dots are replaced by OS specific directory separators, which becomes a relative directory structure from the base repository. | Conventionally uses a dot notation, but it does not have to. When it does use the dot notation, the groupId does NOT have to correspond to the package structure of the project it designates; it is, though, a good practice to follow. When stored within a repository, the dots are replaced by OS specific directory separators, which becomes a relative directory structure from the base repository. | ||
Line 15: | Line 15: | ||
==Artifact ID== | ==Artifact ID== | ||
The artifact ID is generally the name that the project is known by. It is specified as [[Maven_pom.xml#.3CartifactId.3E|< artifactId>]] at the top of the POM file. The artifact ID, along with the group ID, create a key that ideally separates this project from every other project in the world. | |||
The | |||
==Version== | ==Version== |
Revision as of 16:39, 4 November 2016
Internal
Maven Coordinates
groupId:artifactId:version is the minimum amount of information to fully and unequivocally identify an artifact, and constitute an address and a timestamp. This information is referred to as maven coordinates. More details about each component below.
Group ID
The group ID is an unique identifier (ideally, globally) for a project. It is specified as <groupId> at the top of the POM file.
Conventionally uses a dot notation, but it does not have to. When it does use the dot notation, the groupId does NOT have to correspond to the package structure of the project it designates; it is, though, a good practice to follow. When stored within a repository, the dots are replaced by OS specific directory separators, which becomes a relative directory structure from the base repository.
Artifact ID
The artifact ID is generally the name that the project is known by. It is specified as < artifactId> at the top of the POM file. The artifact ID, along with the group ID, create a key that ideally separates this project from every other project in the world.
Version
Packaging
Classifier
POM
Profile
Lifecycle
System Properties
System properties can be declared and exposed to the build in the <properties> section of pom.xml. See: