com.github.maven_nar
Class NarUtil
java.lang.Object
com.github.maven_nar.NarUtil
public final class NarUtil
- extends Object
- Author:
- Mark Donszelmann
|
Method Summary |
static String |
addLibraryPathToEnv(String path,
Map environment,
String os)
|
static int |
copyDirectoryStructure(File sourceDirectory,
File destinationDirectory,
String includes,
String excludes)
|
static AOL |
getAOL(org.apache.maven.project.MavenProject project,
String architecture,
String os,
Linker linker,
String aol,
org.apache.maven.plugin.logging.Log log)
|
static String |
getAOLKey(String aol)
|
static String |
getArchitecture(String architecture)
|
static org.apache.bcel.classfile.JavaClass |
getBcelClass(String filename)
Returns the Bcel Class corresponding to the given class filename |
static String |
getEnv(String envKey,
String alternateSystemProperty,
String defaultValue)
|
static String |
getHeaderName(String basename,
String filename)
Returns the header file name (javah) corresponding to the given class file name |
static File |
getJavaHome(File javaHome,
String os)
|
static Linker |
getLinker(Linker linker,
org.apache.maven.plugin.logging.Log log)
|
static String |
getLinkerName(org.apache.maven.project.MavenProject project,
String architecture,
String os,
Linker linker,
org.apache.maven.plugin.logging.Log log)
|
static String |
getOS(String defaultOs)
|
static void |
makeExecutable(File file,
org.apache.maven.plugin.logging.Log log)
|
static void |
makeLink(File file,
org.apache.maven.plugin.logging.Log log)
|
static String |
replace(CharSequence target,
CharSequence replacement,
String string)
Replaces target with replacement in string. |
static int |
runCommand(String cmd,
String[] args,
File workingDirectory,
String[] env,
org.apache.maven.plugin.logging.Log log)
|
static int |
runCommand(String cmd,
String[] args,
File workingDirectory,
String[] env,
TextStream out,
TextStream err,
TextStream dbg,
org.apache.maven.plugin.logging.Log log)
|
static int |
runCommand(String cmd,
String[] args,
File workingDirectory,
String[] env,
TextStream out,
TextStream err,
TextStream dbg,
org.apache.maven.plugin.logging.Log log,
boolean expectFailure)
|
static void |
runRanlib(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 |
DEFAULT_EXCLUDES
public static final String DEFAULT_EXCLUDES
- See Also:
- Constant Field Values
getOS
public static String getOS(String defaultOs)
getArchitecture
public static String getArchitecture(String architecture)
getLinker
public static Linker getLinker(Linker linker,
org.apache.maven.plugin.logging.Log log)
getLinkerName
public static String getLinkerName(org.apache.maven.project.MavenProject project,
String architecture,
String os,
Linker linker,
org.apache.maven.plugin.logging.Log log)
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,
String architecture,
String os,
Linker linker,
String aol,
org.apache.maven.plugin.logging.Log log)
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 String getAOLKey(String aol)
getJavaHome
public static File getJavaHome(File javaHome,
String os)
makeExecutable
public static void makeExecutable(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(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(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(String filename)
throws 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:
IOException
getHeaderName
public static String getHeaderName(String basename,
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 String replace(CharSequence target,
CharSequence replacement,
String string)
- Replaces target with replacement in string. For jdk 1.4 compatiblity.
- Parameters:
target - replacement - string -
- Returns:
copyDirectoryStructure
public static int copyDirectoryStructure(File sourceDirectory,
File destinationDirectory,
String includes,
String excludes)
throws IOException
- Throws:
IOException
getEnv
public static String getEnv(String envKey,
String alternateSystemProperty,
String defaultValue)
addLibraryPathToEnv
public static String addLibraryPathToEnv(String path,
Map environment,
String os)
runCommand
public static int runCommand(String cmd,
String[] args,
File workingDirectory,
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(String cmd,
String[] args,
File workingDirectory,
String[] env,
TextStream out,
TextStream err,
TextStream dbg,
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(String cmd,
String[] args,
File workingDirectory,
String[] env,
TextStream out,
TextStream err,
TextStream dbg,
org.apache.maven.plugin.logging.Log log,
boolean expectFailure)
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.