Every Maven project has a packaging type. One of these default values is the packaging type. As for the example above, its fully qualified artifact name is ":my-app:1".Īlso, as mentioned in the first section, if the configuration details are not specified, Maven will use their defaults. These three values form the project's fully qualified artifact name. version - the version of the artifact under the specified groupĪ POM requires that its groupId, artifactId, and version be configured.artifactId - the id of the artifact (project).groupId - the id of the project's group.The minimum requirement for a POM are the following: You can see the Super POM for Maven 3.6.3 in Maven Core reference documentation. All POMs extend the Super POM unless explicitly set, meaning the configuration specified in the Super POM is inherited by the POMs you created for your projects. Other information such as the project version, description, developers, mailing lists and such can also be specified. Some of the configuration that can be specified in the POM are the project dependencies, the plugins or goals that can be executed, the build profiles, and so on. It reads the POM, gets the needed configuration information, then executes the goal. When executing a task or goal, Maven looks for the POM in the current directory. Examples for this is the build directory, which is target the source directory, which is src/main/java the test source directory, which is src/test/java and so on. It contains default values for most projects. It is an XML file that contains information about the project and configuration details used by Maven to build the project. Project Inheritance vs Project AggregationĪ Project Object Model or POM is the fundamental unit of work in Maven.
0 Comments
Leave a Reply. |