maven-plugin-api-2.0

16:39:06.675 INFO  jd.cli.Main - Decompiling maven-plugin-api-2.0.jar
package org.apache.maven.plugin;

import java.util.Map;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.plugin.logging.SystemStreamLog;

public abstract class AbstractMojo
  implements Mojo, ContextEnabled
{
  private Log log;
  private Map pluginContext;
  
  public void setLog(Log log)
  {
    this.log = log;
  }
  
  public Log getLog()
  {
    if (log == null) {
      log = new SystemStreamLog();
    }
    return log;
  }
  
  public Map getPluginContext()
  {
    return pluginContext;
  }
  
  public void setPluginContext(Map pluginContext)
  {
    this.pluginContext = pluginContext;
  }
  
  public abstract void execute()
    throws MojoExecutionException, MojoFailureException;
}

/* Location:
 * Qualified Name:     org.apache.maven.plugin.AbstractMojo
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.apache.maven.plugin;

public abstract class AbstractMojoExecutionException
  extends Exception
{
  protected Object source;
  protected String longMessage;
  
  public AbstractMojoExecutionException(String message)
  {
    super(message);
  }
  
  public AbstractMojoExecutionException(String message, Throwable cause)
  {
    super(message, cause);
  }
  
  public String getLongMessage()
  {
    return longMessage;
  }
  
  public Object getSource()
  {
    return source;
  }
}

/* Location:
 * Qualified Name:     org.apache.maven.plugin.AbstractMojoExecutionException
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.apache.maven.plugin;

import java.util.Map;

public abstract interface ContextEnabled
{
  public abstract void setPluginContext(Map paramMap);
  
  public abstract Map getPluginContext();
}

/* Location:
 * Qualified Name:     org.apache.maven.plugin.ContextEnabled
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.apache.maven.plugin.logging;

public abstract interface Log
{
  public abstract boolean isDebugEnabled();
  
  public abstract void debug(CharSequence paramCharSequence);
  
  public abstract void debug(CharSequence paramCharSequence, Throwable paramThrowable);
  
  public abstract void debug(Throwable paramThrowable);
  
  public abstract boolean isInfoEnabled();
  
  public abstract void info(CharSequence paramCharSequence);
  
  public abstract void info(CharSequence paramCharSequence, Throwable paramThrowable);
  
  public abstract void info(Throwable paramThrowable);
  
  public abstract boolean isWarnEnabled();
  
  public abstract void warn(CharSequence paramCharSequence);
  
  public abstract void warn(CharSequence paramCharSequence, Throwable paramThrowable);
  
  public abstract void warn(Throwable paramThrowable);
  
  public abstract boolean isErrorEnabled();
  
  public abstract void error(CharSequence paramCharSequence);
  
  public abstract void error(CharSequence paramCharSequence, Throwable paramThrowable);
  
  public abstract void error(Throwable paramThrowable);
}

/* Location:
 * Qualified Name:     org.apache.maven.plugin.logging.Log
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.apache.maven.plugin.logging;

import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StringWriter;

public class SystemStreamLog
  implements Log
{
  public void debug(CharSequence content)
  {
    print("debug", content);
  }
  
  public void debug(CharSequence content, Throwable error)
  {
    print("debug", content, error);
  }
  
  public void debug(Throwable error)
  {
    print("debug", error);
  }
  
  public void info(CharSequence content)
  {
    print("info", content);
  }
  
  public void info(CharSequence content, Throwable error)
  {
    print("info", content, error);
  }
  
  public void info(Throwable error)
  {
    print("info", error);
  }
  
  public void warn(CharSequence content)
  {
    print("warn", content);
  }
  
  public void warn(CharSequence content, Throwable error)
  {
    print("warn", content, error);
  }
  
  public void warn(Throwable error)
  {
    print("warn", error);
  }
  
  public void error(CharSequence content)
  {
    System.err.println("[error] " + content.toString());
  }
  
  public void error(CharSequence content, Throwable error)
  {
    StringWriter sWriter = new StringWriter();
    PrintWriter pWriter = new PrintWriter(sWriter);
    
    error.printStackTrace(pWriter);
    
    System.err.println("[error] " + content.toString() + "\n\n" + sWriter.toString());
  }
  
  public void error(Throwable error)
  {
    StringWriter sWriter = new StringWriter();
    PrintWriter pWriter = new PrintWriter(sWriter);
    
    error.printStackTrace(pWriter);
    
    System.err.println("[error] " + sWriter.toString());
  }
  
  private void print(String prefix, CharSequence content)
  {
    System.out.println("[" + prefix + "] " + content.toString());
  }
  
  private void print(String prefix, Throwable error)
  {
    StringWriter sWriter = new StringWriter();
    PrintWriter pWriter = new PrintWriter(sWriter);
    
    error.printStackTrace(pWriter);
    
    System.out.println("[" + prefix + "] " + sWriter.toString());
  }
  
  private void print(String prefix, CharSequence content, Throwable error)
  {
    StringWriter sWriter = new StringWriter();
    PrintWriter pWriter = new PrintWriter(sWriter);
    
    error.printStackTrace(pWriter);
    
    System.out.println("[" + prefix + "] " + content.toString() + "\n\n" + sWriter.toString());
  }
  
  public boolean isDebugEnabled()
  {
    return false;
  }
  
  public boolean isInfoEnabled()
  {
    return true;
  }
  
  public boolean isWarnEnabled()
  {
    return true;
  }
  
  public boolean isErrorEnabled()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     org.apache.maven.plugin.logging.SystemStreamLog
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.apache.maven.plugin;

class Mojo$1
{
  static Class class$org$apache$maven$plugin$Mojo;
  
  static Class class$(String x0)
  {
    try
    {
      return Class.forName(x0);
    }
    catch (ClassNotFoundException x1)
    {
      throw new NoClassDefFoundError(x1.getMessage());
    }
  }
}

/* Location:
 * Qualified Name:     org.apache.maven.plugin.Mojo.1
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.apache.maven.plugin;

import org.apache.maven.plugin.logging.Log;

public abstract interface Mojo
{
  public static final String ROLE = (1.class$org$apache$maven$plugin$Mojo == null ? (1.class$org$apache$maven$plugin$Mojo = 1.class$("org.apache.maven.plugin.Mojo")) : 1.class$org$apache$maven$plugin$Mojo).getName();
  
  public abstract void execute()
    throws MojoExecutionException, MojoFailureException;
  
  public abstract void setLog(Log paramLog);
  
  public abstract Log getLog();
}

/* Location:
 * Qualified Name:     org.apache.maven.plugin.Mojo
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.apache.maven.plugin;

public class MojoExecutionException
  extends AbstractMojoExecutionException
{
  public MojoExecutionException(Object source, String shortMessage, String longMessage)
  {
    super(shortMessage);
    this.source = source;
    this.longMessage = longMessage;
  }
  
  public MojoExecutionException(String message, Exception cause)
  {
    super(message, cause);
  }
  
  public MojoExecutionException(String message, Throwable cause)
  {
    super(message, cause);
  }
  
  public MojoExecutionException(String message)
  {
    super(message);
  }
}

/* Location:
 * Qualified Name:     org.apache.maven.plugin.MojoExecutionException
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.apache.maven.plugin;

public class MojoFailureException
  extends AbstractMojoExecutionException
{
  public MojoFailureException(Object source, String shortMessage, String longMessage)
  {
    super(shortMessage);
    this.source = source;
    this.longMessage = longMessage;
  }
  
  public MojoFailureException(String message)
  {
    super(message);
  }
}

/* Location:
 * Qualified Name:     org.apache.maven.plugin.MojoFailureException
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
1

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd