SAGARFIVE

Tutorials

3.9 Build

  • build This element handles things like declaring your project’s directory structure and managing plugins.
  • Here we plugin information

<build>   
<pluginManagement>     
<plugins>       
<plugin>         
<artifactId>maven-clean-plugin</artifactId>         
<version>3.1.0</version>       
</plugin>     
</plugins>   
</pluginManagement> 
</build>
  • A Maven plugin is a group of goals; however, these goals aren’t necessarily all bound to the same phase.
 <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.1</version>
            <executions>
               <execution>
                  <id>id.pre-site</id>
                  <phase>pre-site</phase>
                  <goals>
                     <goal>run</goal>
                  </goals>
                  <configuration>
                     <tasks>
                        <echo>pre-site phase</echo>
                     </tasks>
                  </configuration>
  </plugin>