alma::acs::eclipse::utils::pluginbuilder::PluginBuilder Class Reference

Collaboration diagram for alma::acs::eclipse::utils::pluginbuilder::PluginBuilder:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PluginBuilder (String pluginName, String target, Boolean wrap, String[] jars) throws Exception
void build () throws Exception

Static Public Member Functions

static void main (String[] args)
static void printUsage (OutputStream stream)

Public Attributes

final String jacorbFolderPropertyName = "acs.system.classpath.jacorb.jardirs"

Private Member Functions

void initdFolders () throws Exception
void initPluginFolders ()
void addPluginXML () throws IOException
void addManifest () throws Exception
void addJars () throws Exception

Private Attributes

String jacorbFileOfJars
final String target
final String name
String[] jarDirs
final boolean wrapJars
File pluginRootFolder = null
File metaFolder = null
final String[] jars

Static Private Attributes

static final Logger logger = Logger.getLogger(PluginBuilder.class.getName())
static final LogHandler logHandler = new LogHandler()

Detailed Description

Build an eclipse plugin from one or more jar files.

The required ACS jars are read from $INTROOT, $ACSROOT and so on.
The purpose of PluginBuilder is to build an eclipse plugin to import ACS jars while developing RCP applications for ACS. The computation requires:

The structure of a plugin is: plugin_folder META-INF MANIFEST.MF plugin.xml jarFile1.jar jarFile2.jar ... jarFile3.jar

Author:
acaproni
Since:
ACS-8.0.1

Constructor & Destructor Documentation

alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::PluginBuilder ( String  pluginName,
String  target,
Boolean  wrap,
String[]  jars 
) throws Exception [inline]

Constructor

Parameters:
pluginName the name of the generated plugin
target the folder to install the created plugin into
wrap true if the jars must be copied in the destination plugin; false if the jars are linked into the plugin folder
jars The jars to wrap in the plugin (For example lc.jar)

References initdFolders(), jars, logger, name, target, and wrapJars.

Referenced by main().


Member Function Documentation

void alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::addJars (  )  throws Exception [inline, private]

Add (or link) the jars into the plugin folder.

jar files are found following ACS rules (i.e. first ../lib, then $INTROOT/lib and so on).

Exceptions:
Exception in case of error

References alma::acs::eclipse::utils::jar::AcsFolders::getJar(), jarDirs, jars, logger, metaFolder, pluginRootFolder, and wrapJars.

Referenced by build().

void alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::addManifest (  )  throws Exception [inline, private]

Add the MANIFEST.MF to the META-INF folder.

Exceptions:
Exception In case of error writing the manifest.

References logger, metaFolder, pluginRootFolder, and alma::acs::eclipse::utils::pluginbuilder::ManifestWriter::write().

Referenced by build().

void alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::addPluginXML (  )  throws IOException [inline, private]

Add the plugin.xml

Exceptions:
IOException In case of erro writing the file
See also:
PluginXmlWriter

References pluginRootFolder, and alma::acs::eclipse::utils::pluginbuilder::PluginXmlWriter::write().

Referenced by build().

void alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::build (  )  throws Exception [inline]

Build the plugin

Exceptions:
Exception In case of error building the plugin

References addJars(), addManifest(), addPluginXML(), initPluginFolders(), and logger.

Referenced by main().

void alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::initdFolders (  )  throws Exception [inline, private]

Get the folder to look for jars to wrap in the plugin

Exceptions:
Exception If at least one of the folder is not valid

References jacorbFileOfJars, jacorbFolderPropertyName, jarDirs, and logger.

Referenced by PluginBuilder().

void alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::initPluginFolders (  )  [inline, private]

Create the folder structure of the plugin

References logger, metaFolder, name, pluginRootFolder, and target.

Referenced by build().

static void alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::main ( String[]  args  )  [inline, static]

The main

Parameters:
args 

References build(), jars, logger, logHandler, name, PluginBuilder(), printUsage(), and target.

static void alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::printUsage ( OutputStream  stream  )  [inline, static]

Print the usage string in the passed stream

Parameters:
stream The stream to print the string

Referenced by main().


Member Data Documentation

The folder where JacORB stores the jar files

Referenced by initdFolders().

final String alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::jacorbFolderPropertyName = "acs.system.classpath.jacorb.jardirs"

The jacorb folder of jar files.

It comes from the $JAVA_HOME environment variable.

Referenced by initdFolders().

The folders to look for jars

Referenced by addJars(), and initdFolders().

The jars to include in the created plugin.

Referenced by addJars(), main(), and PluginBuilder().

final Logger alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::logger = Logger.getLogger(PluginBuilder.class.getName()) [static, private]

The logger to print info and debug messages

Referenced by addJars(), addManifest(), build(), initdFolders(), initPluginFolders(), main(), and PluginBuilder().

The handler getting logs

Referenced by main().

The META-INF folder inside the plugin root folder

Referenced by addJars(), addManifest(), and initPluginFolders().

The name of the plugin

Referenced by initPluginFolders(), main(), and PluginBuilder().

The folder of the plugin where the jars are copied

It is the main folder of the plugin and its name usually has a form like alma.acs.eclipse.test_3.0.2.

Referenced by addJars(), addManifest(), addPluginXML(), and initPluginFolders().

The location in the file system where the generated plugin will be created.

target is a writable folder for example could be the target platform like ~/eclipse_target/eclipse/plugins/.

Referenced by initPluginFolders(), main(), and PluginBuilder().

If true the jars are included in the plugin folder (i.e. they are copied fomr the ACS INTROOT, or ACSROOT into the plugin folder). If wrapJars is true the process bundles by wrapping.

If it is false, a link to the jars is created into the plugin folder. If wrapJars is false the process bundles by reference.

Referenced by addJars(), and PluginBuilder().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2