o more javadoc
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@628965 13f79535-47bb-0310-9956-ffa450edef68master
parent
39524c627f
commit
9130de2b14
|
|
@ -21,16 +21,26 @@ package org.apache.maven.plugin.tools.model;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* Exception when plugin metadata parsing occurred.
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
public class PluginMetadataParseException
|
||||
extends Exception
|
||||
{
|
||||
|
||||
static final long serialVersionUID = 1;
|
||||
/** serialVersionUID */
|
||||
static final long serialVersionUID = 4022348153707995574L;
|
||||
|
||||
private final File metadataFile;
|
||||
|
||||
private final String originalMessage;
|
||||
|
||||
/**
|
||||
* @param metadataFile
|
||||
* @param message
|
||||
* @param cause
|
||||
*/
|
||||
public PluginMetadataParseException( File metadataFile, String message, Throwable cause )
|
||||
{
|
||||
super( "Error parsing file: " + metadataFile + ". Reason: " + message, cause );
|
||||
|
|
@ -39,6 +49,10 @@ public class PluginMetadataParseException
|
|||
this.originalMessage = message;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param metadataFile
|
||||
* @param message
|
||||
*/
|
||||
public PluginMetadataParseException( File metadataFile, String message )
|
||||
{
|
||||
super( "Error parsing file: " + metadataFile + ". Reason: " + message );
|
||||
|
|
@ -47,14 +61,19 @@ public class PluginMetadataParseException
|
|||
this.originalMessage = message;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the metadata file
|
||||
*/
|
||||
public File getMetadataFile()
|
||||
{
|
||||
return metadataFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the original message
|
||||
*/
|
||||
public String getOriginalMessage()
|
||||
{
|
||||
return originalMessage;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,10 +37,20 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Parser for plugin metadata.
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
public class PluginMetadataParser
|
||||
{
|
||||
public static final String IMPL_BASE_PLACEHOLDER = "<REPLACE-WITH-MOJO-PATH>";
|
||||
|
||||
/**
|
||||
* @param metadataFile the metadata file to be parse
|
||||
* @return a set of <code>MojoDescriptor</code>
|
||||
* @throws PluginMetadataParseException if any
|
||||
*/
|
||||
public Set parseMojoDescriptors( File metadataFile )
|
||||
throws PluginMetadataParseException
|
||||
{
|
||||
|
|
@ -179,5 +189,4 @@ public class PluginMetadataParser
|
|||
|
||||
return descriptor;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue