
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() |
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
| alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::PluginBuilder | ( | String | pluginName, | |
| String | target, | |||
| Boolean | wrap, | |||
| String[] | jars | |||
| ) | throws Exception [inline] |
Constructor
| 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().
| 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).
| 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.
| 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
| IOException | In case of erro writing the file |
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
| 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
| 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
| 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
| stream | The stream to print the string |
Referenced by main().
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().
String [] alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::jarDirs [private] |
The folders to look for jars
Referenced by addJars(), and initdFolders().
final String [] alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::jars [private] |
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().
final LogHandler alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::logHandler = new LogHandler() [static, private] |
The handler getting logs
Referenced by main().
File alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::metaFolder = null [private] |
The META-INF folder inside the plugin root folder
Referenced by addJars(), addManifest(), and initPluginFolders().
final String alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::name [private] |
The name of the plugin
Referenced by initPluginFolders(), main(), and PluginBuilder().
File alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::pluginRootFolder = null [private] |
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().
final String alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::target [private] |
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().
final boolean alma::acs::eclipse::utils::pluginbuilder::PluginBuilder::wrapJars [private] |
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().
1.6.2