org.apache.maven.plugin.nar
Class NarUtil

java.lang.Object
  extended by org.apache.maven.plugin.nar.NarUtil

public final class NarUtil
extends java.lang.Object

Author:
Mark Donszelmann

Field Summary
static java.lang.String DEFAULT_EXCLUDES
           
 
Method Summary
static java.lang.String addLibraryPathToEnv(java.lang.String path, java.util.Map environment, java.lang.String os)
           
static int copyDirectoryStructure(java.io.File sourceDirectory, java.io.File destinationDirectory, java.lang.String includes, java.lang.String excludes)
           
static AOL getAOL(org.apache.maven.project.MavenProject project, java.lang.String architecture, java.lang.String os, Linker linker, java.lang.String aol)
           
static java.lang.String getAOLKey(java.lang.String aol)
           
static java.lang.String getArchitecture(java.lang.String architecture)
           
static org.apache.bcel.classfile.JavaClass getBcelClass(java.lang.String filename)
          Returns the Bcel Class corresponding to the given class filename
static java.lang.String getEnv(java.lang.String envKey, java.lang.String alternateSystemProperty, java.lang.String defaultValue)
           
static java.lang.String getHeaderName(java.lang.String basename, java.lang.String filename)
          Returns the header file name (javah) corresponding to the given class file name
static java.io.File getJavaHome(java.io.File javaHome, java.lang.String os)
           
static Linker getLinker(Linker linker)
           
static java.lang.String getLinkerName(org.apache.maven.project.MavenProject project, java.lang.String architecture, java.lang.String os, Linker linker)
           
static java.lang.String getOS(java.lang.String defaultOs)
           
static void makeExecutable(java.io.File file, org.apache.maven.plugin.logging.Log log)
           
static void makeLink(java.io.File file, org.apache.maven.plugin.logging.Log log)
           
static java.lang.String replace(java.lang.CharSequence target, java.lang.CharSequence replacement, java.lang.String string)
          Replaces target with replacement in string.
static int runCommand(java.lang.String cmd, java.lang.String[] args, java.io.File workingDirectory, java.lang.String[] env, org.apache.maven.plugin.logging.Log log)
           
static int runCommand(java.lang.String cmd, java.lang.String[] args, java.io.File workingDirectory, java.lang.String[] env, TextStream out, TextStream err, TextStream dbg)
           
static void runRanlib(java.io.File file, org.apache.maven.plugin.logging.Log log)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_EXCLUDES

public static final java.lang.String DEFAULT_EXCLUDES
See Also:
Constant Field Values
Method Detail

getOS

public static java.lang.String getOS(java.lang.String defaultOs)

getArchitecture

public static java.lang.String getArchitecture(java.lang.String architecture)

getLinker

public static Linker getLinker(Linker linker)

getLinkerName

public static java.lang.String getLinkerName(org.apache.maven.project.MavenProject project,
                                             java.lang.String architecture,
                                             java.lang.String os,
                                             Linker linker)
                                      throws org.apache.maven.plugin.MojoFailureException,
                                             org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException

getAOL

public static AOL getAOL(org.apache.maven.project.MavenProject project,
                         java.lang.String architecture,
                         java.lang.String os,
                         Linker linker,
                         java.lang.String aol)
                  throws org.apache.maven.plugin.MojoFailureException,
                         org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException

getAOLKey

public static java.lang.String getAOLKey(java.lang.String aol)

getJavaHome

public static java.io.File getJavaHome(java.io.File javaHome,
                                       java.lang.String os)

makeExecutable

public static void makeExecutable(java.io.File file,
                                  org.apache.maven.plugin.logging.Log log)
                           throws org.apache.maven.plugin.MojoExecutionException,
                                  org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

runRanlib

public static void runRanlib(java.io.File file,
                             org.apache.maven.plugin.logging.Log log)
                      throws org.apache.maven.plugin.MojoExecutionException,
                             org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

makeLink

public static void makeLink(java.io.File file,
                            org.apache.maven.plugin.logging.Log log)
                     throws org.apache.maven.plugin.MojoExecutionException,
                            org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

getBcelClass

public static org.apache.bcel.classfile.JavaClass getBcelClass(java.lang.String filename)
                                                        throws java.io.IOException
Returns the Bcel Class corresponding to the given class filename

Parameters:
filename - the absolute file name of the class
Returns:
the Bcel Class.
Throws:
java.io.IOException

getHeaderName

public static java.lang.String getHeaderName(java.lang.String basename,
                                             java.lang.String filename)
Returns the header file name (javah) corresponding to the given class file name

Parameters:
filename - the absolute file name of the class
Returns:
the header file name.

replace

public static java.lang.String replace(java.lang.CharSequence target,
                                       java.lang.CharSequence replacement,
                                       java.lang.String string)
Replaces target with replacement in string. For jdk 1.4 compatiblity.

Parameters:
target -
replacement -
string -
Returns:

copyDirectoryStructure

public static int copyDirectoryStructure(java.io.File sourceDirectory,
                                         java.io.File destinationDirectory,
                                         java.lang.String includes,
                                         java.lang.String excludes)
                                  throws java.io.IOException
Throws:
java.io.IOException

getEnv

public static java.lang.String getEnv(java.lang.String envKey,
                                      java.lang.String alternateSystemProperty,
                                      java.lang.String defaultValue)

addLibraryPathToEnv

public static java.lang.String addLibraryPathToEnv(java.lang.String path,
                                                   java.util.Map environment,
                                                   java.lang.String os)

runCommand

public static int runCommand(java.lang.String cmd,
                             java.lang.String[] args,
                             java.io.File workingDirectory,
                             java.lang.String[] env,
                             org.apache.maven.plugin.logging.Log log)
                      throws org.apache.maven.plugin.MojoExecutionException,
                             org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

runCommand

public static int runCommand(java.lang.String cmd,
                             java.lang.String[] args,
                             java.io.File workingDirectory,
                             java.lang.String[] env,
                             TextStream out,
                             TextStream err,
                             TextStream dbg)
                      throws org.apache.maven.plugin.MojoExecutionException,
                             org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.