org.freehep.maven.nar
Class NarUtil
java.lang.Object
org.freehep.maven.nar.NarUtil
public class NarUtil
- extends Object
- Version:
- $Id: NarUtil.java 13135 2007-07-25 22:22:37Z duns $
- 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 String |
getAOL(String architecture,
String os,
Linker linker,
String aol)
|
static String |
getAOLKey(String aol)
|
static String |
getAOLKey(String architecture,
String os,
Linker linker)
|
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 Properties |
getDefaults()
|
static String |
getEnv(String envKey,
String alternateSystemProperty,
String defaultValue)
|
static String |
getHeaderName(String base,
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)
|
static String |
getLinkerName(String architecture,
String os,
Linker linker)
|
static String |
getOS(String os)
|
static void |
makeExecutable(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,
String[] env,
org.apache.maven.plugin.logging.Log log)
|
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
NarUtil
public NarUtil()
getDefaults
public static Properties getDefaults()
throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
getOS
public static String getOS(String os)
getArchitecture
public static String getArchitecture(String architecture)
getLinker
public static Linker getLinker(Linker linker)
getLinkerName
public static String getLinkerName(String architecture,
String os,
Linker linker)
throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
getAOL
public static String getAOL(String architecture,
String os,
Linker linker,
String aol)
throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
getAOLKey
public static String getAOLKey(String architecture,
String os,
Linker linker)
throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
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
getBcelClass
public static final org.apache.bcel.classfile.JavaClass getBcelClass(String filename)
throws IOException,
org.apache.bcel.classfile.ClassFormatException
- 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,
- ClassFormatException
IOException
org.apache.bcel.classfile.ClassFormatException
getHeaderName
public static final String getHeaderName(String base,
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,
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
Copyright © 2000-2007 FreeHEP. All Rights Reserved.