You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by mb...@apache.org on 2007/04/19 16:27:46 UTC
svn commit: r530421 -
/incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/pear/tools/PackageCreator.java
Author: mbaessler
Date: Thu Apr 19 07:27:39 2007
New Revision: 530421
URL: http://svn.apache.org/viewvc?view=rev&rev=530421
Log:
UIMA-377
minor updates to the PackageCreator to be able to accept packages without setting the classpath
JIRA ticket https://issues.apache.org/jira/browse/UIMA-377
Modified:
incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/pear/tools/PackageCreator.java
Modified: incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/pear/tools/PackageCreator.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/pear/tools/PackageCreator.java?view=diff&rev=530421&r1=530420&r2=530421
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/pear/tools/PackageCreator.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/pear/tools/PackageCreator.java Thu Apr 19 07:27:39 2007
@@ -139,24 +139,26 @@
.getProperty("java.version"));
// add classpath setting to the installation descriptor
- InstallationDescriptor.ActionInfo actionInfo = new InstallationDescriptor.ActionInfo(
- InstallationDescriptor.ActionInfo.SET_ENV_VARIABLE_ACT);
- actionInfo.params.put(InstallationDescriptorHandler.VAR_NAME_TAG,
- InstallationController.CLASSPATH_VAR);
- actionInfo.params.put(InstallationDescriptorHandler.VAR_VALUE_TAG, classpath);
- String commentMessage = I18nUtil.localizeMessage(PEAR_MESSAGE_RESOURCE_BUNDLE,
- "package_creator_env_setting", new Object[] { InstallationController.CLASSPATH_VAR });
- actionInfo.params.put(InstallationDescriptorHandler.COMMENTS_TAG, commentMessage);
- insd.addInstallationAction(actionInfo);
-
+ if (classpath != null) {
+ InstallationDescriptor.ActionInfo actionInfo = new InstallationDescriptor.ActionInfo(
+ InstallationDescriptor.ActionInfo.SET_ENV_VARIABLE_ACT);
+ actionInfo.params.put(InstallationDescriptorHandler.VAR_NAME_TAG,
+ InstallationController.CLASSPATH_VAR);
+ actionInfo.params.put(InstallationDescriptorHandler.VAR_VALUE_TAG, classpath);
+ String commentMessage = I18nUtil.localizeMessage(PEAR_MESSAGE_RESOURCE_BUNDLE,
+ "package_creator_env_setting", new Object[] { InstallationController.CLASSPATH_VAR });
+ actionInfo.params.put(InstallationDescriptorHandler.COMMENTS_TAG, commentMessage);
+ insd.addInstallationAction(actionInfo);
+ }
+
// add datapath settings to the installation descriptor
if (datapath != null) {
- actionInfo = new InstallationDescriptor.ActionInfo(
+ InstallationDescriptor.ActionInfo actionInfo = new InstallationDescriptor.ActionInfo(
InstallationDescriptor.ActionInfo.SET_ENV_VARIABLE_ACT);
actionInfo.params.put(InstallationDescriptorHandler.VAR_NAME_TAG,
RelativePathResolver.UIMA_DATAPATH_PROP);
actionInfo.params.put(InstallationDescriptorHandler.VAR_VALUE_TAG, datapath);
- commentMessage = I18nUtil.localizeMessage(PEAR_MESSAGE_RESOURCE_BUNDLE,
+ String commentMessage = I18nUtil.localizeMessage(PEAR_MESSAGE_RESOURCE_BUNDLE,
"package_creator_env_setting",
new Object[] { RelativePathResolver.UIMA_DATAPATH_PROP });
actionInfo.params.put(InstallationDescriptorHandler.COMMENTS_TAG, commentMessage);
@@ -167,13 +169,13 @@
if (envVars != null) {
Enumeration keys = envVars.keys();
while (keys.hasMoreElements()) {
- actionInfo = new InstallationDescriptor.ActionInfo(
+ InstallationDescriptor.ActionInfo actionInfo = new InstallationDescriptor.ActionInfo(
InstallationDescriptor.ActionInfo.SET_ENV_VARIABLE_ACT);
String key = (String) keys.nextElement();
actionInfo.params.put(InstallationDescriptorHandler.VAR_NAME_TAG, key);
actionInfo.params
.put(InstallationDescriptorHandler.VAR_VALUE_TAG, envVars.getProperty(key));
- commentMessage = I18nUtil.localizeMessage(PEAR_MESSAGE_RESOURCE_BUNDLE,
+ String commentMessage = I18nUtil.localizeMessage(PEAR_MESSAGE_RESOURCE_BUNDLE,
"package_creator_env_setting", new Object[] { key });
actionInfo.params.put(InstallationDescriptorHandler.COMMENTS_TAG, commentMessage);
insd.addInstallationAction(actionInfo);