public Plugin getPlugin() { if ( mojoDescriptor != null ) { return mojoDescriptor.getPluginDescriptor().getPlugin(); } return plugin; }
public PluginManagerException( MojoDescriptor mojoDescriptor, MavenProject project, String message, NoSuchRealmException cause ) { super( message, cause ); this.project = project; pluginGroupId = mojoDescriptor.getPluginDescriptor().getGroupId(); pluginArtifactId = mojoDescriptor.getPluginDescriptor().getArtifactId(); pluginVersion = mojoDescriptor.getPluginDescriptor().getVersion(); goal = mojoDescriptor.getGoal(); }
protected PluginManagerException( MojoDescriptor mojoDescriptor, String message, Throwable cause ) { super( message, cause ); pluginGroupId = mojoDescriptor.getPluginDescriptor().getGroupId(); pluginArtifactId = mojoDescriptor.getPluginDescriptor().getArtifactId(); pluginVersion = mojoDescriptor.getPluginDescriptor().getVersion(); goal = mojoDescriptor.getGoal(); }
protected PluginManagerException( MojoDescriptor mojoDescriptor, MavenProject project, String message ) { super( message ); this.project = project; pluginGroupId = mojoDescriptor.getPluginDescriptor().getGroupId(); pluginArtifactId = mojoDescriptor.getPluginDescriptor().getArtifactId(); pluginVersion = mojoDescriptor.getPluginDescriptor().getVersion(); goal = mojoDescriptor.getGoal(); }
protected PluginManagerException( MojoDescriptor mojoDescriptor, MavenProject project, String message, Throwable cause ) { super( message, cause ); this.project = project; pluginGroupId = mojoDescriptor.getPluginDescriptor().getGroupId(); pluginArtifactId = mojoDescriptor.getPluginDescriptor().getArtifactId(); pluginVersion = mojoDescriptor.getPluginDescriptor().getVersion(); goal = mojoDescriptor.getGoal(); }
/** * @return the id of the mojo, based on the goal name */ public String getId() { return getPluginDescriptor().getId() + ":" + getGoal(); }
/** * @return the full goal name * @see PluginDescriptor#getGoalPrefix() * @see #getGoal() */ public String getFullGoalName() { return getPluginDescriptor().getGoalPrefix() + ":" + getGoal(); }
/** {@inheritDoc} */ public int hashCode() { int result = 1; String goal = getGoal(); if ( goal != null ) { result += goal.hashCode(); } PluginDescriptor pd = getPluginDescriptor(); if ( pd != null ) { result -= pd.hashCode(); } return result; }
/** * @return the id of the mojo, based on the goal name */ public String getId() { return getPluginDescriptor().getId() + ":" + getGoal(); }
public String getArtifactId() { if ( mojoDescriptor != null ) { return mojoDescriptor.getPluginDescriptor().getArtifactId(); } return plugin.getArtifactId(); }
public String getVersion() { if ( mojoDescriptor != null ) { return mojoDescriptor.getPluginDescriptor().getVersion(); } return plugin.getVersion(); }
/** * @return the full goal name * @see PluginDescriptor#getGoalPrefix() * @see #getGoal() */ public String getFullGoalName() { return getPluginDescriptor().getGoalPrefix() + ":" + getGoal(); }
public PluginParameterException( MojoDescriptor mojo, List<Parameter> parameters ) { super( mojo.getPluginDescriptor(), "The parameters " + format( parameters ) + " for goal " + mojo.getRoleHint() + " are missing or invalid" ); this.mojo = mojo; this.parameters = parameters; }
public String getGroupId() { if ( mojoDescriptor != null ) { return mojoDescriptor.getPluginDescriptor().getGroupId(); } return plugin.getGroupId(); }
/** {@inheritDoc} */ public boolean equals( Object object ) { if ( this == object ) { return true; } if ( object instanceof MojoDescriptor ) { MojoDescriptor other = (MojoDescriptor) object; if ( !compareObjects( getPluginDescriptor(), other.getPluginDescriptor() ) ) { return false; } return compareObjects( getGoal(), other.getGoal() ); } return false; }
/** {@inheritDoc} */ public int hashCode() { int result = 1; String goal = getGoal(); if ( goal != null ) { result += goal.hashCode(); } PluginDescriptor pd = getPluginDescriptor(); if ( pd != null ) { result -= pd.hashCode(); } return result; }
public String buildDiagnosticMessage() { StringBuilder messageBuffer = new StringBuilder( 256 ); List<Parameter> params = getParameters(); MojoDescriptor mojo = getMojoDescriptor(); messageBuffer.append( "One or more required plugin parameters are invalid/missing for \'" ) .append( mojo.getPluginDescriptor().getGoalPrefix() ).append( ':' ).append( mojo.getGoal() ) .append( "\'\n" ); int idx = 0; for ( Iterator<Parameter> it = params.iterator(); it.hasNext(); idx++ ) { Parameter param = it.next(); messageBuffer.append( "\n[" ).append( idx ).append( "] " ); decomposeParameterIntoUserInstructions( mojo, param, messageBuffer ); messageBuffer.append( '\n' ); } return messageBuffer.toString(); } }
/** {@inheritDoc} */ public boolean equals( Object object ) { if ( this == object ) { return true; } if ( object instanceof MojoDescriptor ) { MojoDescriptor other = (MojoDescriptor) object; if ( !compareObjects( getPluginDescriptor(), other.getPluginDescriptor() ) ) { return false; } return compareObjects( getGoal(), other.getGoal() ); } return false; }
public Plugin getPlugin() { final MojoDescriptor mojoDescriptor = getMojoExecution().getMojoDescriptor(); return mojoDescriptor.getPluginDescriptor().getPlugin(); }
public PluginManagerException( MojoDescriptor mojoDescriptor, String message, MavenProject project, PlexusContainerException cause ) { super( message, cause ); this.project = project; PluginDescriptor pd = mojoDescriptor.getPluginDescriptor(); pluginGroupId = pd.getGroupId(); pluginArtifactId = pd.getArtifactId(); pluginVersion = pd.getVersion(); goal = mojoDescriptor.getGoal(); }