O'Reilly logo

Instant Apache Maven Starter by Maurizio Turatti, Maurizio Pillitu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Top 19 features you need to know about

This section will complete the description of built-in Maven features and mechanisms; it will also introduce some widely-used plugins and common scenarios where Maven can be extremely useful.

Profile

A Maven profile is a POM element that contains specific POM configurations for specific cases. A profile can—for example—be used to define environment-specific configurations and build behaviors, as suggested by the following code snippet:

Note

Although profiles may be considered an advanced topic, they are widely used by the Maven community; it is crucial to know at least what they are in order to fully understand a Maven build.

<profiles>
    <profile>
        <id>postgres</id>
        <dependencies>
            <dependency>
              <groupId>${project.groupId} ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required