org.apache.myfaces.buildtools.maven2.plugin.builder
Class BuildMetaDataMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.myfaces.buildtools.maven2.plugin.builder.BuildMetaDataMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class BuildMetaDataMojo
extends org.apache.maven.plugin.AbstractMojo

Maven goal which runs one or more ModelBuilder objects to gather metadata about JSF artifacts into a Model object, then save that model object as an xml file for use by other goals of this plugin.

By default, the generated file is named "META-INF/myfaces-metadata.xml". This file will be included in the final artifact for this project. Having that metadata file embedded in the generated jarfile is useful for two purposes:

Note that the generated file contains all the metadata needed by this project, including a copy of all the metadata from other projects that this one depends on. All other goals of this plugin can execute with just the generated metadata as input, without needing to load other projects. Each entry in the metadata is labelled with a "modelId" property that indicates where it originally came from.


Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
BuildMetaDataMojo()
           
 
Method Summary
protected  void addResourceRoot(org.apache.maven.project.MavenProject project, String resourceRoot)
           
 void execute()
          Create a metadata file containing information imported from other projects plus data extracted from annotated classes in this project.
 
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
 

Constructor Detail

BuildMetaDataMojo

public BuildMetaDataMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Create a metadata file containing information imported from other projects plus data extracted from annotated classes in this project.

Throws:
org.apache.maven.plugin.MojoExecutionException

addResourceRoot

protected void addResourceRoot(org.apache.maven.project.MavenProject project,
                               String resourceRoot)


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.