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;
|
import java.io.File;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Exception when plugin metadata parsing occurred.
|
||||||
|
*
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
public class PluginMetadataParseException
|
public class PluginMetadataParseException
|
||||||
extends Exception
|
extends Exception
|
||||||
{
|
{
|
||||||
|
/** serialVersionUID */
|
||||||
static final long serialVersionUID = 1;
|
static final long serialVersionUID = 4022348153707995574L;
|
||||||
|
|
||||||
private final File metadataFile;
|
private final File metadataFile;
|
||||||
|
|
||||||
private final String originalMessage;
|
private final String originalMessage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param metadataFile
|
||||||
|
* @param message
|
||||||
|
* @param cause
|
||||||
|
*/
|
||||||
public PluginMetadataParseException( File metadataFile, String message, Throwable cause )
|
public PluginMetadataParseException( File metadataFile, String message, Throwable cause )
|
||||||
{
|
{
|
||||||
super( "Error parsing file: " + metadataFile + ". Reason: " + message, cause );
|
super( "Error parsing file: " + metadataFile + ". Reason: " + message, cause );
|
||||||
|
|
@ -39,6 +49,10 @@ public class PluginMetadataParseException
|
||||||
this.originalMessage = message;
|
this.originalMessage = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param metadataFile
|
||||||
|
* @param message
|
||||||
|
*/
|
||||||
public PluginMetadataParseException( File metadataFile, String message )
|
public PluginMetadataParseException( File metadataFile, String message )
|
||||||
{
|
{
|
||||||
super( "Error parsing file: " + metadataFile + ". Reason: " + message );
|
super( "Error parsing file: " + metadataFile + ". Reason: " + message );
|
||||||
|
|
@ -47,14 +61,19 @@ public class PluginMetadataParseException
|
||||||
this.originalMessage = message;
|
this.originalMessage = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the metadata file
|
||||||
|
*/
|
||||||
public File getMetadataFile()
|
public File getMetadataFile()
|
||||||
{
|
{
|
||||||
return metadataFile;
|
return metadataFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the original message
|
||||||
|
*/
|
||||||
public String getOriginalMessage()
|
public String getOriginalMessage()
|
||||||
{
|
{
|
||||||
return originalMessage;
|
return originalMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,20 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parser for plugin metadata.
|
||||||
|
*
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
public class PluginMetadataParser
|
public class PluginMetadataParser
|
||||||
{
|
{
|
||||||
public static final String IMPL_BASE_PLACEHOLDER = "<REPLACE-WITH-MOJO-PATH>";
|
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 )
|
public Set parseMojoDescriptors( File metadataFile )
|
||||||
throws PluginMetadataParseException
|
throws PluginMetadataParseException
|
||||||
{
|
{
|
||||||
|
|
@ -179,5 +189,4 @@ public class PluginMetadataParser
|
||||||
|
|
||||||
return descriptor;
|
return descriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue