|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.mojo.javascript.titanium.TitaniumBuilder
public class TitaniumBuilder
Helper class to issue titanium builder calls.
Constructor Summary | |
---|---|
TitaniumBuilder(java.io.File androidBuilder,
java.io.File iosBuilder,
java.io.File androidSdk)
Create a new TitaniumBuilder instance. |
Method Summary | |
---|---|
java.lang.ProcessBuilder |
createAndroidBuilderProcess(java.lang.String command,
java.lang.String projectName,
java.lang.String tiProjectDirectory,
java.lang.String appId,
java.lang.String androidAPI,
java.lang.String skin)
Create an android ProcessBuilder. |
java.lang.ProcessBuilder |
createAndroidDistributeBuilderProcess(java.io.File outputDirectory,
java.lang.String projectName,
java.lang.String tiProjectDirectory,
java.lang.String appId,
java.lang.String keystore,
java.lang.String keystorePassword,
java.lang.String keystoreAlias,
java.lang.String androidAPI,
java.lang.String skin)
Create an android distribute ProcessBuilder. |
static boolean |
isProcessRunning(java.lang.Process p)
Check if a process is running. |
void |
launchIphoneDevice(java.lang.String iosVersion,
java.io.File tiProjectDirectory,
java.lang.String appId,
java.lang.String projectName,
java.lang.String appuuid,
java.lang.String distName,
java.lang.String family,
org.apache.maven.plugin.logging.Log log)
Launch the specified titanium project on an iOs device. |
void |
launchIphoneDistribute(java.lang.String iosVersion,
java.io.File tiProjectDirectory,
java.lang.String appId,
java.lang.String projectName,
java.lang.String appuuid,
java.lang.String distName,
java.io.File targetDir,
java.lang.String family,
org.apache.maven.plugin.logging.Log log)
Launch the titanium ios builder distribute command and log its output. |
void |
launchIphoneEmulator(java.lang.String iosVersion,
java.lang.String tiProjectDirectory,
java.lang.String projectName,
java.lang.String family,
java.lang.String simulatorFamily,
org.apache.maven.plugin.logging.Log log)
Launch a titanium project on an iOs simulator. |
void |
launchOnAndroidEmulator(java.lang.String projectName,
java.io.File tiProjectDirectory,
java.lang.String appId,
java.lang.String androidAPI,
java.lang.String androidDeviceAPI,
java.lang.String androidDeviceSkin,
java.lang.Long androidDeviceWait,
org.apache.maven.plugin.logging.Log log)
Launch the android emulator and start the simulator after. |
static void |
logProcess(java.lang.Process p,
org.apache.maven.plugin.logging.Log log)
Log the process output and error stream to the specified logger. |
static void |
logProcess(java.lang.Process p,
org.apache.maven.plugin.logging.Log log,
java.lang.StringBuilder builder,
boolean skipErrStream)
Log the process to the specified logger. |
static void |
logProcessLine(org.apache.maven.plugin.logging.Log log,
java.io.BufferedReader reader)
Read a line from the reader and log it to the specified logger. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TitaniumBuilder(java.io.File androidBuilder, java.io.File iosBuilder, java.io.File androidSdk)
androidBuilder
- The location of the android builder file.iosBuilder
- The location of the iphone/ipad builder file.androidSdk
- The location of the android SDK home folder.Method Detail |
---|
public void launchOnAndroidEmulator(java.lang.String projectName, java.io.File tiProjectDirectory, java.lang.String appId, java.lang.String androidAPI, java.lang.String androidDeviceAPI, java.lang.String androidDeviceSkin, java.lang.Long androidDeviceWait, org.apache.maven.plugin.logging.Log log) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException, java.io.IOException, java.lang.InterruptedException
projectName
- The project name.tiProjectDirectory
- The directory containing the titanium project files.appId
- The Titanium application id.
Must use the com.company.name
format and not containing -.
androidAPI
- The API to use to build the application.androidDeviceAPI
- The API the android emulator should use.androidDeviceSkin
- The skin of the android emulator to use.androidDeviceWait
- The interval between the emulator launch and the simulator launch.
In milliseconds.log
- The Maven logger
org.apache.maven.plugin.MojoFailureException
- When the builder process return an error.
org.apache.maven.plugin.MojoExecutionException
- When an error occurs during the call.
java.io.IOException
- When an error occurs during the call.
java.lang.InterruptedException
- When an error occurs during the call.public java.lang.ProcessBuilder createAndroidBuilderProcess(java.lang.String command, java.lang.String projectName, java.lang.String tiProjectDirectory, java.lang.String appId, java.lang.String androidAPI, java.lang.String skin) throws org.apache.maven.plugin.MojoExecutionException
command
- The builder command.projectName
- The name of the projecttiProjectDirectory
- The titanium project directory.appId
- The titanium application id.androidAPI
- The android API.skin
- The skin.
org.apache.maven.plugin.MojoExecutionException
- When an error occured during the processbuilder creation.public java.lang.ProcessBuilder createAndroidDistributeBuilderProcess(java.io.File outputDirectory, java.lang.String projectName, java.lang.String tiProjectDirectory, java.lang.String appId, java.lang.String keystore, java.lang.String keystorePassword, java.lang.String keystoreAlias, java.lang.String androidAPI, java.lang.String skin) throws org.apache.maven.plugin.MojoExecutionException
outputDirectory
- The outputDirectory location.projectName
- The name of the project.tiProjectDirectory
- The titanium project directory.appId
- The titanium application id.keystore
- The keystore.keystorePassword
- The keystore passwordkeystoreAlias
- The keystore alias.androidAPI
- The android APIskin
- The skin
org.apache.maven.plugin.MojoExecutionException
- When an error occured during the processbuilder creation.public void launchIphoneDevice(java.lang.String iosVersion, java.io.File tiProjectDirectory, java.lang.String appId, java.lang.String projectName, java.lang.String appuuid, java.lang.String distName, java.lang.String family, org.apache.maven.plugin.logging.Log log) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
iosVersion
- The iOS version to use to build the application.tiProjectDirectory
- The titanium project directory.appId
- The titanium application identifier.projectName
- The project name.appuuid
- The project uuiddistName
- The project dist name.family
- The family to use when building the project.log
- The Maven logger.
org.apache.maven.plugin.MojoFailureException
- When the builder process return an error.
org.apache.maven.plugin.MojoExecutionException
- When an error occured while launching on the device.public void launchIphoneEmulator(java.lang.String iosVersion, java.lang.String tiProjectDirectory, java.lang.String projectName, java.lang.String family, java.lang.String simulatorFamily, org.apache.maven.plugin.logging.Log log) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
iosVersion
- The ios version to use to build the application.tiProjectDirectory
- The titanium project directory.projectName
- The name of the project.family
- The family to use to build the application.simulatorFamily
- family The family of the simulator ("universal" translates to "iphone").log
- The maven logger.
org.apache.maven.plugin.MojoFailureException
- When the builder process return an error.
org.apache.maven.plugin.MojoExecutionException
- When an error occurs during the simulator process.public void launchIphoneDistribute(java.lang.String iosVersion, java.io.File tiProjectDirectory, java.lang.String appId, java.lang.String projectName, java.lang.String appuuid, java.lang.String distName, java.io.File targetDir, java.lang.String family, org.apache.maven.plugin.logging.Log log) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
iosVersion
- The ios version.tiProjectDirectory
- The titanium project directory.appId
- The application identifier.projectName
- The project name.appuuid
- The application uuid.distName
- The distribution name.targetDir
- The folder where the resulting file will be created.family
- The device family.log
- The maven logger.
org.apache.maven.plugin.MojoFailureException
- When the builder process return an error.
org.apache.maven.plugin.MojoExecutionException
- When an error occurs while creating the distribution.public static void logProcessLine(org.apache.maven.plugin.logging.Log log, java.io.BufferedReader reader)
Read a line from the reader and log it to the specified logger.
This method doesn't block while no data is available. If no data is present when the method is called, nothing is outputed to the log
log
- The logger to use to log the message.reader
- The reader from which a line should be read.public static void logProcess(java.lang.Process p, org.apache.maven.plugin.logging.Log log)
Log the process output and error stream to the specified logger.
This method will start by read and log lines from the output and error stream while the process is running.
p
- The process to log.log
- The logger where the messages should be outputted.public static void logProcess(java.lang.Process p, org.apache.maven.plugin.logging.Log log, java.lang.StringBuilder builder, boolean skipErrStream)
Log the process to the specified logger.
p
- The process to log.log
- The logger where the message should be outputted.builder
- A StringBuilder where each line will be appended.
May be null.skipErrStream
- true if the error stream should not be logged.public static boolean isProcessRunning(java.lang.Process p)
p
- The process to check.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |