org.apache.maven.plugin.dependency
Class PropertiesMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugin.dependency.PropertiesMojo
All Implemented Interfaces:
ContextEnabled, Mojo

@Mojo(name="properties",
      requiresDependencyResolution=TEST,
      defaultPhase=INITIALIZE)
public class PropertiesMojo
extends AbstractMojo

Goal that sets a property pointing to the artifact file for each project dependency. For each dependency (direct and transitive) a project property will be set which follows the form groupId:artifactId:type:[classifier] and contains the path to the resolved artifact.

Since:
2.2
Version:
$Id: PropertiesMojo.java 1357251 2012-07-04 13:28:33Z olamy $
Author:
Paul Gier

Field Summary
protected  MavenProject project
          The current Maven project
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
PropertiesMojo()
           
 
Method Summary
 void execute()
          Main entry into mojo.
 MavenProject getProject()
           
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

project

@Component
protected MavenProject project
The current Maven project

Constructor Detail

PropertiesMojo

public PropertiesMojo()
Method Detail

execute

public void execute()
             throws MojoExecutionException
Main entry into mojo. Gets the list of dependencies and iterates through setting a property for each artifact.

Throws:
MojoExecutionException - with a message if an error occurs.

getProject

public MavenProject getProject()


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.