You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by al...@apache.org on 2006/12/08 22:47:14 UTC

svn commit: r484803 - in /incubator/uima/uimaj/trunk/uimaj-tools/src/main: java/org/apache/uima/tools/pear/install/InstallPear.java resources/org/apache/uima/tools/pear/install/gladis.properties resources/org/apache/uima/tools/pear/install/pi.properties

Author: alally
Date: Fri Dec  8 13:47:13 2006
New Revision: 484803

URL: http://svn.apache.org/viewvc?view=rev&rev=484803
Log:
Fixed PEAR Installer warning about not finding uima_tools.jar.
Changed PEAR Installer to execute CVD using the same classpath that
PEAR Installer was itself invoked with.
UIMA-101: https://issues.apache.org/jira/browse/UIMA-101

Modified:
    incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/pear/install/InstallPear.java
    incubator/uima/uimaj/trunk/uimaj-tools/src/main/resources/org/apache/uima/tools/pear/install/gladis.properties
    incubator/uima/uimaj/trunk/uimaj-tools/src/main/resources/org/apache/uima/tools/pear/install/pi.properties

Modified: incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/pear/install/InstallPear.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/pear/install/InstallPear.java?view=diff&rev=484803&r1=484802&r2=484803
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/pear/install/InstallPear.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/pear/install/InstallPear.java Fri Dec  8 13:47:13 2006
@@ -215,8 +215,6 @@
 
   private static Properties gladisProperties = null;
 
-  private static boolean gladisExists = true;
-
   private static boolean helpExists = true;
 
   private static String message = null;
@@ -395,7 +393,7 @@
           try {
             String uimaCompCtg = UIMAUtil.identifyUimaComponentCategory(xmlDescFile);
             if (UIMAUtil.ANALYSIS_ENGINE_CTG.equals(uimaCompCtg))
-              runButton.setEnabled(gladisExists);
+              runButton.setEnabled(true);
           } catch (Exception e) {
           }
           errorFlag = false;
@@ -460,30 +458,10 @@
       // load gladis properties
       if (gladisProperties == null)
         gladisProperties = loadProperties("gladis.properties");
-      // get Gladis specific PATH
-      String gladisPath = gladisProperties.getProperty("env.PATH");
-      // substitute '\', ';' and UIMA_HOME
-      if (gladisPath != null && gladisPath.length() > 0) {
-        gladisPath = gladisPath.replace('\\', '/');
-        gladisPath = gladisPath.replace(';', File.pathSeparatorChar);
-        gladisPath = gladisPath.replaceAll("%UIMA_HOME%", System.getProperty("uima.home").replace(
-                '\\', '/'));
-      } else
-        gladisPath = "";
+      
       // get Gladis specific CLASSPATH
-      String gladisClassPath = gladisProperties.getProperty("env.CLASSPATH");
-      // substitute '\', ';' and UIMA_HOME
-      if (gladisClassPath != null && gladisClassPath.length() > 0) {
-        gladisClassPath = gladisClassPath.replace('\\', '/');
-        gladisClassPath = gladisClassPath.replace(';', File.pathSeparatorChar);
-        gladisClassPath = gladisClassPath.replaceAll("%UIMA_HOME%", System.getProperty("uima.home")
-                .replace('\\', '/'));
-      } else
-        gladisClassPath = "";
-      if (System.getProperty("DEBUG") != null) {
-        System.out.println("[DEBUG:runGladis()]:\n\tgladisPath = " + gladisPath
-                + "\n\tgladisClasspath = " + gladisClassPath);
-      }
+      String gladisClassPath = System.getProperty("java.class.path");//gladisProperties.getProperty("env.CLASSPATH");
+
       // get component specific PATH
       String compPath = InstallationController
               .buildComponentPath(mainComponentRootPath, insdObject);
@@ -645,7 +623,7 @@
                   + sysValue;
           classPathAdded = true;
         } else if (sysKey.equalsIgnoreCase("PATH") || sysKey.equalsIgnoreCase("LD_LIBRARY_PATH")) {
-          value = compPath + File.pathSeparator + gladisPath + File.pathSeparator + sysValue;
+          value = compPath + File.pathSeparator + sysValue;
           pathAdded = true;
         }
         // add to the env. array
@@ -657,7 +635,7 @@
         envArrayList.add("CLASSPATH=" + classPath);
       }
       if (!pathAdded) {
-        String path = compPath + File.pathSeparator + gladisPath;
+        String path = compPath;
         envArrayList.add("PATH=" + path);
         envArrayList.add("LD_LIBRARY_PATH=" + path);
       }
@@ -1026,16 +1004,10 @@
       System.setProperty(UIMA_HOME_ENV, UIMA_HOME);
       // load main properties and replace %UIMA_HOME%
       mainProperties = loadProperties("pi.properties");
-      String gladisPath = mainProperties.getProperty("gladis.path");
-      gladisPath = gladisPath.replaceAll("%UIMA_HOME%", UIMA_HOME.replace('\\', '/'));
       String pearHelpPath = mainProperties.getProperty("help.file");
       pearHelpPath = pearHelpPath.replaceAll("%UIMA_HOME%", UIMA_HOME.replace('\\', '/'));
-      File gladisFile = new File(gladisPath);
       File helpFile = new File(pearHelpPath);
-      gladisExists = gladisFile.exists();
       helpExists = helpFile.exists();
-      if (!gladisExists)
-        System.err.println(gladisPath + " not found");
       if (!helpExists)
         System.err.println(pearHelpPath + " not found");
       else

Modified: incubator/uima/uimaj/trunk/uimaj-tools/src/main/resources/org/apache/uima/tools/pear/install/gladis.properties
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/resources/org/apache/uima/tools/pear/install/gladis.properties?view=diff&rev=484803&r1=484802&r2=484803
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/resources/org/apache/uima/tools/pear/install/gladis.properties (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/resources/org/apache/uima/tools/pear/install/gladis.properties Fri Dec  8 13:47:13 2006
@@ -16,9 +16,7 @@
 #	 * specific language governing permissions and limitations
 #	 * under the License.
 #	 ***************************************************************
-
-env.CLASSPATH=%UIMA_HOME%/docs/examples/resources;%UIMA_HOME%/lib/uima_core.jar;%UIMA_HOME%/lib/uima_tools.jar;%UIMA_HOME%/lib/uima_jcas_builtin_types.jar;%UIMA_HOME%/lib/xml.jar;%UIMA_HOME%/lib/vinci/jVinci.jar;%UIMA_HOME%/lib/uima_adapter_vinci.jar;
-jvm.options=-Xmx512M -Duima.home=%UIMA_HOME% -Duima.datapath=%UIMA_HOME%/docs/examples/data
-main.class=org.apache.uima.annot_view.Gladis
+jvm.options=-Xmx512M 
+main.class=org.apache.uima.tools.annot_view.Gladis
 main.class.arg.1.-exec= 
 main.class.arg.2.-desc=%DESCRIPTOR%

Modified: incubator/uima/uimaj/trunk/uimaj-tools/src/main/resources/org/apache/uima/tools/pear/install/pi.properties
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/resources/org/apache/uima/tools/pear/install/pi.properties?view=diff&rev=484803&r1=484802&r2=484803
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/resources/org/apache/uima/tools/pear/install/pi.properties (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/resources/org/apache/uima/tools/pear/install/pi.properties Fri Dec  8 13:47:13 2006
@@ -18,4 +18,3 @@
 #	 ***************************************************************
 
 help.file=%UIMA_HOME%/docs/pear/piHelp.html
-gladis.path=%UIMA_HOME%/lib/uima_tools.jar
\ No newline at end of file