Lifecycle, phases and goals

Figure 656. Phases Slide presentation

Figure 657. Maven lifecyles and phases Slide presentation
Phases:

clean, compile, test, package, deploy, ...

Lifecycle

Sequence of named phases

Example: mvn clean (Lifecycle)
  • pre-clean

  • clean (Phase)

  • post-clean

See Default Lifecycle.


Figure 658. hooking into phase Slide presentation
<plugin>
  <groupId>com.mysema.maven</groupId>
  <artifactId>apt-maven-plugin</artifactId>
  <version>1.1.3</version>
  <executions>
    <execution>
      <id>process</id>
      <goals>
        <goal>process</goal>
      </goals>
      <phase>generate-sources</phase>
      <configuration>
        <outputDirectory>${project.build.directory}/metamodel</outputDirectory>
        <processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
      </configuration>
      ...