Table of Contents

Maven - Plugin (Mojo)

About

A plugin (in Maven 2.0) groups together goals by code. It's an independent unit of code for Maven.

It look like a dependency.

In Maven, there are:

Example

Configure the Java compiler to allow JDK 5.0 sources.

The below compiler plugin is already used as part of the build process and this just changes the configuration.

<build>
	<plugins>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-compiler-plugin</artifactId>
			<version>2.5.1</version>
			<configuration>
				<source>1.5</source>
				<target>1.5</target>
			</configuration>
			<executions>
				<execution>
					<phase>package</phase>
					<!-- bind to the packaging phase -->
					<goals>
						<goal>compile</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
	</plugins>
</build>

where:

Management

List

See the Plugins List

Configuration

To find out

Development