manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1631727 [6/8] - in /manifoldcf/branches/dev_1x: ./ connectors/alfresco/ connectors/cmis/ connectors/cmis/test-materials/ connectors/documentum/registry-scripts/ connectors/documentum/server-scripts/ connectors/elasticsearch/ connectors/ela...
Date Tue, 14 Oct 2014 12:09:07 GMT
Modified: manifoldcf/branches/dev_1x/framework/combined-service/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/combined-service/src/main/webapp/WEB-INF/web.xml?rev=1631727&r1=1631726&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/combined-service/src/main/webapp/WEB-INF/web.xml
(original)
+++ manifoldcf/branches/dev_1x/framework/combined-service/src/main/webapp/WEB-INF/web.xml
Tue Oct 14 12:09:05 2014
@@ -1,9 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 
-<!DOCTYPE web-app
-    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
-    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
-
 <!-- Licensed to the Apache Software Foundation (ASF) under one or more
      contributor license agreements. See the NOTICE file distributed with
      this work for additional information regarding copyright ownership.

Modified: manifoldcf/branches/dev_1x/framework/core/pom.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/core/pom.xml?rev=1631727&r1=1631726&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/core/pom.xml (original)
+++ manifoldcf/branches/dev_1x/framework/core/pom.xml Tue Oct 14 12:09:05 2014
@@ -170,6 +170,10 @@
           <groupId>jakarta-regexp</groupId>
           <artifactId>jakarta-regexp</artifactId>
         </exclusion>
+        <exclusion>
+          <groupId>javax.servlet</groupId>
+          <artifactId>servlet-api</artifactId>
+        </exclusion>
       </exclusions>
     </dependency>
     <dependency>
@@ -228,9 +232,8 @@
 
     <dependency>
       <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
+      <artifactId>javax.servlet-api</artifactId>
       <version>${servlet-api.version}</version>
-      <scope>provided</scope>
     </dependency>
 
     <dependency>

Modified: manifoldcf/branches/dev_1x/framework/crawler-ui/pom.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/crawler-ui/pom.xml?rev=1631727&r1=1631726&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/crawler-ui/pom.xml (original)
+++ manifoldcf/branches/dev_1x/framework/crawler-ui/pom.xml Tue Oct 14 12:09:05 2014
@@ -54,7 +54,7 @@
     <!-- web dependencies -->
     <dependency>
       <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
+      <artifactId>javax.servlet-api</artifactId>
       <version>${servlet-api.version}</version>
       <scope>provided</scope>
     </dependency>
@@ -217,4 +217,4 @@
 
   </dependencies>
 
-</project>
\ No newline at end of file
+</project>

Modified: manifoldcf/branches/dev_1x/framework/example-multiprocess-file-proprietary/properties.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/example-multiprocess-file-proprietary/properties.xml?rev=1631727&r1=1631726&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/example-multiprocess-file-proprietary/properties.xml
(original)
+++ manifoldcf/branches/dev_1x/framework/example-multiprocess-file-proprietary/properties.xml
Tue Oct 14 12:09:05 2014
@@ -22,7 +22,7 @@
   <property name="org.apache.manifoldcf.authorityservicewarpath" value="../web-proprietary/war/mcf-authority-service.war"/>
   <property name="org.apache.manifoldcf.apiservicewarpath" value="../web-proprietary/war/mcf-api-service.war"/>
   <property name="org.apache.manifoldcf.usejettyparentclassloader" value="false"/>
-  <property name="org.apache.manifoldcf.jettyport" value="8345"/>
+  <property name="org.apache.manifoldcf.jettyconfigfile" value="./jetty.xml"/>
   <!-- Point to the synchronization area -->
   <property name="org.apache.manifoldcf.synchdirectory" value="./syncharea"/>
   <!-- Select HSQLDB as the database implementation, and specify multiprocess access -->

Modified: manifoldcf/branches/dev_1x/framework/example-multiprocess-file/properties.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/example-multiprocess-file/properties.xml?rev=1631727&r1=1631726&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/example-multiprocess-file/properties.xml (original)
+++ manifoldcf/branches/dev_1x/framework/example-multiprocess-file/properties.xml Tue Oct
14 12:09:05 2014
@@ -22,7 +22,7 @@
   <property name="org.apache.manifoldcf.authorityservicewarpath" value="../web/war/mcf-authority-service.war"/>
   <property name="org.apache.manifoldcf.apiservicewarpath" value="../web/war/mcf-api-service.war"/>
   <property name="org.apache.manifoldcf.usejettyparentclassloader" value="false"/>
-  <property name="org.apache.manifoldcf.jettyport" value="8345"/>
+  <property name="org.apache.manifoldcf.jettyconfigfile" value="./jetty.xml"/>
   <!-- Point to the synchronization area -->
   <property name="org.apache.manifoldcf.synchdirectory" value="./syncharea"/>
   <!-- Select HSQLDB as the database implementation, and specify multiprocess access -->

Modified: manifoldcf/branches/dev_1x/framework/example-multiprocess-zk-proprietary/properties.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/example-multiprocess-zk-proprietary/properties.xml?rev=1631727&r1=1631726&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/example-multiprocess-zk-proprietary/properties.xml
(original)
+++ manifoldcf/branches/dev_1x/framework/example-multiprocess-zk-proprietary/properties.xml
Tue Oct 14 12:09:05 2014
@@ -24,7 +24,7 @@
   <property name="org.apache.manifoldcf.authorityservicewarpath" value="../web-proprietary/war/mcf-authority-service.war"/>
   <property name="org.apache.manifoldcf.apiservicewarpath" value="../web-proprietary/war/mcf-api-service.war"/>
   <property name="org.apache.manifoldcf.usejettyparentclassloader" value="false"/>
-  <property name="org.apache.manifoldcf.jettyport" value="8345"/>
+  <property name="org.apache.manifoldcf.jettyconfigfile" value="./jetty.xml"/>
   <!-- ZooKeeper lock manager configuration -->
   <property name="org.apache.manifoldcf.lockmanagerclass" value="org.apache.manifoldcf.core.lockmanager.ZooKeeperLockManager"/>
   <property name="org.apache.manifoldcf.zookeeper.connectstring" value="localhost:8349"/>

Modified: manifoldcf/branches/dev_1x/framework/example-multiprocess-zk/properties.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/example-multiprocess-zk/properties.xml?rev=1631727&r1=1631726&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/example-multiprocess-zk/properties.xml (original)
+++ manifoldcf/branches/dev_1x/framework/example-multiprocess-zk/properties.xml Tue Oct 14
12:09:05 2014
@@ -24,7 +24,7 @@
   <property name="org.apache.manifoldcf.authorityservicewarpath" value="../web/war/mcf-authority-service.war"/>
   <property name="org.apache.manifoldcf.apiservicewarpath" value="../web/war/mcf-api-service.war"/>
   <property name="org.apache.manifoldcf.usejettyparentclassloader" value="false"/>
-  <property name="org.apache.manifoldcf.jettyport" value="8345"/>
+  <property name="org.apache.manifoldcf.jettyconfigfile" value="./jetty.xml"/>
   <!-- ZooKeeper lock manager configuration -->
   <property name="org.apache.manifoldcf.lockmanagerclass" value="org.apache.manifoldcf.core.lockmanager.ZooKeeperLockManager"/>
   <property name="org.apache.manifoldcf.zookeeper.connectstring" value="localhost:8349"/>

Modified: manifoldcf/branches/dev_1x/framework/example-singleprocess-proprietary/properties.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/example-singleprocess-proprietary/properties.xml?rev=1631727&r1=1631726&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/example-singleprocess-proprietary/properties.xml
(original)
+++ manifoldcf/branches/dev_1x/framework/example-singleprocess-proprietary/properties.xml
Tue Oct 14 12:09:05 2014
@@ -22,7 +22,7 @@
   <property name="org.apache.manifoldcf.authorityservicewarpath" value="../web-proprietary/war/mcf-authority-service.war"/>
   <property name="org.apache.manifoldcf.apiservicewarpath" value="../web-proprietary/war/mcf-api-service.war"/>
   <property name="org.apache.manifoldcf.usejettyparentclassloader" value="true"/>
-  <property name="org.apache.manifoldcf.jettyport" value="8345"/>
+  <property name="org.apache.manifoldcf.jettyconfigfile" value="./jetty.xml"/>
   <!-- Point to the combined war in case we start the single-process example that way
-->
   <property name="org.apache.manifoldcf.combinedwarpath" value="../web-proprietary/war/mcf-combined-service.war"/>
   <!-- Select Derby as the database implementation, and specify where the database will
be stored -->

Modified: manifoldcf/branches/dev_1x/framework/example-singleprocess/properties.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/example-singleprocess/properties.xml?rev=1631727&r1=1631726&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/example-singleprocess/properties.xml (original)
+++ manifoldcf/branches/dev_1x/framework/example-singleprocess/properties.xml Tue Oct 14 12:09:05
2014
@@ -22,7 +22,7 @@
   <property name="org.apache.manifoldcf.authorityservicewarpath" value="../web/war/mcf-authority-service.war"/>
   <property name="org.apache.manifoldcf.apiservicewarpath" value="../web/war/mcf-api-service.war"/>
   <property name="org.apache.manifoldcf.usejettyparentclassloader" value="true"/>
-  <property name="org.apache.manifoldcf.jettyport" value="8345"/>
+  <property name="org.apache.manifoldcf.jettyconfigfile" value="./jetty.xml"/>
   <!-- Point to the combined war in case we start the single-process example that way
-->
   <property name="org.apache.manifoldcf.combinedwarpath" value="../web/war/mcf-combined-service.war"/>
   <!-- Select Derby as the database implementation, and specify where the database will
be stored -->

Modified: manifoldcf/branches/dev_1x/framework/jetty-runner/pom.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/jetty-runner/pom.xml?rev=1631727&r1=1631726&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/jetty-runner/pom.xml (original)
+++ manifoldcf/branches/dev_1x/framework/jetty-runner/pom.xml Tue Oct 14 12:09:05 2014
@@ -136,6 +136,13 @@
       <version>${project.version}</version>
     </dependency>
 
+    <!-- Compile-time dependencies -->
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpclient</artifactId>
+      <version>${httpcomponent.httpclient.version}</version>
+    </dependency>
+
     <!-- output connectors -->
     <dependency>
       <groupId>${project.groupId}</groupId>
@@ -205,7 +212,7 @@
     <!-- web dependencies -->
     <dependency>
       <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
+      <artifactId>javax.servlet-api</artifactId>
       <version>${servlet-api.version}</version>
     </dependency>
     <dependency>
@@ -336,12 +343,6 @@
       </exclusions>
     </dependency>
     <dependency>
-      <groupId>org.apache.httpcomponents</groupId>
-      <artifactId>httpclient</artifactId>
-      <version>${httpcomponent.httpclient.version}</version>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
       <groupId>commons-collections</groupId>
       <artifactId>commons-collections</artifactId>
       <version>${commons-collections.version}</version>
@@ -381,4 +382,4 @@
 		
   </dependencies>
 
-</project>
\ No newline at end of file
+</project>

Modified: manifoldcf/branches/dev_1x/framework/jetty-runner/src/main/java/org/apache/manifoldcf/jettyrunner/ManifoldCFCombinedJettyRunner.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/jetty-runner/src/main/java/org/apache/manifoldcf/jettyrunner/ManifoldCFCombinedJettyRunner.java?rev=1631727&r1=1631726&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/jetty-runner/src/main/java/org/apache/manifoldcf/jettyrunner/ManifoldCFCombinedJettyRunner.java
(original)
+++ manifoldcf/branches/dev_1x/framework/jetty-runner/src/main/java/org/apache/manifoldcf/jettyrunner/ManifoldCFCombinedJettyRunner.java
Tue Oct 14 12:09:05 2014
@@ -18,6 +18,7 @@
 package org.apache.manifoldcf.jettyrunner;
 
 import java.io.*;
+
 import org.apache.manifoldcf.core.interfaces.*;
 import org.apache.manifoldcf.crawler.system.*;
 import org.apache.manifoldcf.crawler.*;
@@ -32,11 +33,16 @@ import javax.servlet.http.HttpServletRes
 
 import org.eclipse.jetty.server.handler.ContextHandlerCollection;
 import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.util.resource.Resource;
+import org.eclipse.jetty.xml.XmlConfiguration;
 import org.eclipse.jetty.webapp.WebAppContext;
 import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.handler.HandlerList;
+import org.eclipse.jetty.server.handler.ShutdownHandler;
+import org.eclipse.jetty.server.Handler;
 
-/**
- * Run ManifoldCF with jetty.
+ /* Run ManifoldCF with jetty.
  * 
  */
 public class ManifoldCFCombinedJettyRunner
@@ -45,23 +51,51 @@ public class ManifoldCFCombinedJettyRunn
   public static final String _rcsid = "@(#)$Id$";
 
   public static final String combinedWarPathProperty = "org.apache.manifoldcf.combinedwarpath";
-  public static final String jettyPortProperty = "org.apache.manifoldcf.jettyport";
+  public static final String jettyConfigFileProperty = "org.apache.manifoldcf.jettyconfigfile";
   
   protected Server server;
   
+
+  public ManifoldCFCombinedJettyRunner( File configFile, String combinedWarPath )
+    throws Exception
+  {
+    Resource fileserverXml = Resource.newResource(configFile.getCanonicalFile());
+    XmlConfiguration configuration = new XmlConfiguration(fileserverXml.getInputStream());
+    server = (Server)configuration.configure();
+    initializeServer( combinedWarPath );
+  }
+
   public ManifoldCFCombinedJettyRunner( int port, String combinedWarPath )
   {
-    server = new Server( port );    
+    server = new Server( port );
+    initializeServer( combinedWarPath );
+  }
+
+  protected void initializeServer( String combinedWarPath )
+  {
     server.setStopAtShutdown( true );
     
     // Initialize the servlets
     ContextHandlerCollection contexts = new ContextHandlerCollection();
-    server.setHandler(contexts);
     WebAppContext mcfCombined = new WebAppContext(combinedWarPath,"/mcf");
     mcfCombined.setParentLoaderPriority(false);
     contexts.addHandler(mcfCombined);
-  }
+    
+    HandlerList handlers = new HandlerList();
+    handlers.addHandler(contexts);
+    
+    // Pick up shutdown token
+    String shutdownToken = System.getProperty("org.apache.manifoldcf.jettyshutdowntoken");
+    if (shutdownToken != null)
+    {
+      ShutdownHandler shutdown = new ShutdownHandler(shutdownToken);
+      shutdown.setExitJvm(true);
 
+      handlers.addHandler(shutdown);
+    }
+    server.setHandler(handlers);
+  }
+  
   public void start()
     throws ManifoldCFException
   {
@@ -109,7 +143,7 @@ public class ManifoldCFCombinedJettyRunn
   public int getLocalPort()
     throws ManifoldCFException
   {
-    Connector[] conns = server.getConnectors();
+    ServerConnector[] conns = (ServerConnector[]) server.getConnectors();
     if (0 == conns.length) {
       throw new ManifoldCFException("Jetty Server has no Connectors");
     }
@@ -138,18 +172,9 @@ public class ManifoldCFCombinedJettyRunn
 
       // Grab the parameters which locate the wars and describe how we work with Jetty
       File combinedWarPath = ManifoldCF.getFileProperty(combinedWarPathProperty);
-      int jettyPort = ManifoldCF.getIntProperty(jettyPortProperty,8347);
-      if (args.length > 0)
-      {
-        try
-        {
-          jettyPort = Integer.parseInt(args[0]);
-        }
-        catch (NumberFormatException e)
-        {
-          throw new ManifoldCFException("Illegal value for jetty port argument: "+e.getMessage(),e);
-        }
-      }
+      File jettyConfigFile = ManifoldCF.getFileProperty(jettyConfigFileProperty);
+      if (jettyConfigFile == null)
+        jettyConfigFile = new File("./jetty.xml");
       if (args.length == 2)
       {
         combinedWarPath = new File(args[1]);
@@ -163,7 +188,7 @@ public class ManifoldCFCombinedJettyRunn
       System.err.println("Starting jetty...");
       
       // Create a jetty instance
-      ManifoldCFCombinedJettyRunner jetty = new ManifoldCFCombinedJettyRunner(jettyPort,combinedWarPath.toString());
+      ManifoldCFCombinedJettyRunner jetty = new ManifoldCFCombinedJettyRunner(jettyConfigFile,combinedWarPath.toString());
       // This will register a shutdown hook as well.
       jetty.start();
 
@@ -183,7 +208,7 @@ public class ManifoldCFCombinedJettyRunn
         }
       }
     }
-    catch (ManifoldCFException e)
+    catch (Exception e)
     {
       if (Logging.root != null)
         Logging.root.error("Exception: "+e.getMessage(),e);

Modified: manifoldcf/branches/dev_1x/framework/jetty-runner/src/main/java/org/apache/manifoldcf/jettyrunner/ManifoldCFJettyRunner.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/jetty-runner/src/main/java/org/apache/manifoldcf/jettyrunner/ManifoldCFJettyRunner.java?rev=1631727&r1=1631726&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/jetty-runner/src/main/java/org/apache/manifoldcf/jettyrunner/ManifoldCFJettyRunner.java
(original)
+++ manifoldcf/branches/dev_1x/framework/jetty-runner/src/main/java/org/apache/manifoldcf/jettyrunner/ManifoldCFJettyRunner.java
Tue Oct 14 12:09:05 2014
@@ -18,6 +18,7 @@
 package org.apache.manifoldcf.jettyrunner;
 
 import java.io.*;
+
 import org.apache.manifoldcf.core.interfaces.*;
 import org.apache.manifoldcf.crawler.system.*;
 import org.apache.manifoldcf.crawler.*;
@@ -33,8 +34,14 @@ import javax.servlet.http.HttpServletRes
 
 import org.eclipse.jetty.server.handler.ContextHandlerCollection;
 import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.util.resource.Resource;
+import org.eclipse.jetty.xml.XmlConfiguration;
 import org.eclipse.jetty.webapp.WebAppContext;
 import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.handler.HandlerList;
+import org.eclipse.jetty.server.handler.ShutdownHandler;
+import org.eclipse.jetty.server.Handler;
 
 /**
  * Run ManifoldCF with jetty.
@@ -49,18 +56,31 @@ public class ManifoldCFJettyRunner
   public static final String authorityServiceWarPathProperty = "org.apache.manifoldcf.authorityservicewarpath";
   public static final String apiServiceWarPathProperty = "org.apache.manifoldcf.apiservicewarpath";
   public static final String useJettyParentClassLoaderProperty = "org.apache.manifoldcf.usejettyparentclassloader";
-  public static final String jettyPortProperty = "org.apache.manifoldcf.jettyport";
+  public static final String jettyConfigFileProperty = "org.apache.manifoldcf.jettyconfigfile";
   
   protected Server server;
   
+  public ManifoldCFJettyRunner( File configFile, String crawlerWarPath, String authorityServiceWarPath,
String apiWarPath, boolean useParentLoader )
+    throws Exception
+  {
+    Resource fileserverXml = Resource.newResource(configFile.getCanonicalFile());
+    XmlConfiguration configuration = new XmlConfiguration(fileserverXml.getInputStream());
+    server = (Server)configuration.configure();
+    initializeServer(crawlerWarPath, authorityServiceWarPath, apiWarPath, useParentLoader);
+  }
+  
   public ManifoldCFJettyRunner( int port, String crawlerWarPath, String authorityServiceWarPath,
String apiWarPath, boolean useParentLoader )
   {
-    server = new Server( port );    
+    Server server = new Server( port );
+    initializeServer(crawlerWarPath, authorityServiceWarPath, apiWarPath, useParentLoader);
+  }
+  
+  protected void initializeServer( String crawlerWarPath, String authorityServiceWarPath,
String apiWarPath, boolean useParentLoader )
+  {
     server.setStopAtShutdown( true );
     
     // Initialize the servlets
     ContextHandlerCollection contexts = new ContextHandlerCollection();
-    server.setHandler(contexts);
     WebAppContext lcfCrawlerUI = new WebAppContext(crawlerWarPath,"/mcf-crawler-ui");
     // This can cause jetty to ignore all of the framework and jdbc jars in the war, which
is what we
     // want in the single-process case.
@@ -76,6 +96,21 @@ public class ManifoldCFJettyRunner
     // want in the single-process case.
     lcfApi.setParentLoaderPriority(useParentLoader);
     contexts.addHandler(lcfApi);
+    
+    HandlerList handlers = new HandlerList();
+    handlers.addHandler(contexts);
+    
+    // Pick up shutdown token
+    String shutdownToken = System.getProperty("org.apache.manifoldcf.jettyshutdowntoken");
+    if (shutdownToken != null)
+    {
+      ShutdownHandler shutdown = new ShutdownHandler(shutdownToken);
+      shutdown.setExitJvm(true);
+
+      handlers.addHandler(shutdown);
+    }
+    server.setHandler(handlers);
+
   }
 
   public void start()
@@ -125,7 +160,7 @@ public class ManifoldCFJettyRunner
   public int getLocalPort()
     throws ManifoldCFException
   {
-    Connector[] conns = server.getConnectors();
+    ServerConnector[] conns = (ServerConnector[]) server.getConnectors();
     if (0 == conns.length) {
       throw new ManifoldCFException("Jetty Server has no Connectors");
     }
@@ -151,7 +186,7 @@ public class ManifoldCFJettyRunner
   {
     if (args.length != 4 && args.length != 1 && args.length != 0)
     {
-      System.err.println("Usage: ManifoldCFJettyRunner [<port> [<crawler-war-path>
<authority-service-war-path> <api-war-path>]]");
+      System.err.println("Usage: ManifoldCFJettyRunner [<jetty-config-file> [<crawler-war-path>
<authority-service-war-path> <api-war-path>]]");
       System.exit(1);
     }
 
@@ -169,18 +204,10 @@ public class ManifoldCFJettyRunner
       File authorityserviceWarPath = ManifoldCF.getFileProperty(authorityServiceWarPathProperty);
       File apiWarPath = ManifoldCF.getFileProperty(apiServiceWarPathProperty);
       boolean useParentClassLoader = ManifoldCF.getBooleanProperty(useJettyParentClassLoaderProperty,true);
-      int jettyPort = ManifoldCF.getIntProperty(jettyPortProperty,8345);
-      if (args.length > 0)
-      {
-        try
-        {
-          jettyPort = Integer.parseInt(args[0]);
-        }
-        catch (NumberFormatException e)
-        {
-          throw new ManifoldCFException("Illegal value for jetty port argument: "+e.getMessage(),e);
-        }
-      }
+      File jettyConfigFile = ManifoldCF.getFileProperty(jettyConfigFileProperty);
+
+      if (jettyConfigFile == null)
+        jettyConfigFile = new File("./jetty.xml");
       if (args.length == 4)
       {
         crawlerWarPath = new File(args[1]);
@@ -215,7 +242,7 @@ public class ManifoldCFJettyRunner
       System.err.println("Starting jetty...");
       
       // Create a jetty instance
-      ManifoldCFJettyRunner jetty = new ManifoldCFJettyRunner(jettyPort,crawlerWarPath.toString(),authorityserviceWarPath.toString(),apiWarPath.toString(),useParentClassLoader);
+      ManifoldCFJettyRunner jetty = new ManifoldCFJettyRunner(jettyConfigFile,crawlerWarPath.toString(),authorityserviceWarPath.toString(),apiWarPath.toString(),useParentClassLoader);
       // This will register a shutdown hook as well.
       jetty.start();
 
@@ -244,7 +271,7 @@ public class ManifoldCFJettyRunner
         }
       }
     }
-    catch (ManifoldCFException e)
+    catch (Exception e)
     {
       if (Logging.root != null)
         Logging.root.error("Exception: "+e.getMessage(),e);

Modified: manifoldcf/branches/dev_1x/framework/scripts-combined/combined-options.env.unix
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/scripts-combined/combined-options.env.unix?rev=1631727&r1=1631726&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/scripts-combined/combined-options.env.unix (original)
+++ manifoldcf/branches/dev_1x/framework/scripts-combined/combined-options.env.unix Tue Oct
14 12:09:05 2014
@@ -1,5 +1,6 @@
 -Xms256m
 -Xmx256m
 -Dorg.apache.manifoldcf.configfile=./properties.xml
+-Dorg.apache.manifoldcf.jettyshutdowntoken=secret_token
 -cp
 .:

Modified: manifoldcf/branches/dev_1x/framework/scripts-combined/combined-options.env.win
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/scripts-combined/combined-options.env.win?rev=1631727&r1=1631726&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/scripts-combined/combined-options.env.win (original)
+++ manifoldcf/branches/dev_1x/framework/scripts-combined/combined-options.env.win Tue Oct
14 12:09:05 2014
@@ -1,5 +1,6 @@
 -Xms256m
 -Xmx256m
 -Dorg.apache.manifoldcf.configfile=.\properties.xml
+-Dorg.apache.manifoldcf.jettyshutdowntoken=secret_token
 -cp
 .;

Modified: manifoldcf/branches/dev_1x/framework/scripts-jetty/jetty-options.env.unix
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/scripts-jetty/jetty-options.env.unix?rev=1631727&r1=1631726&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/scripts-jetty/jetty-options.env.unix (original)
+++ manifoldcf/branches/dev_1x/framework/scripts-jetty/jetty-options.env.unix Tue Oct 14 12:09:05
2014
@@ -1,5 +1,6 @@
 -Xms256m
 -Xmx256m
 -Dorg.apache.manifoldcf.configfile=./properties.xml
+-Dorg.apache.manifoldcf.jettyshutdowntoken=secret_token
 -cp
 .:

Modified: manifoldcf/branches/dev_1x/framework/scripts-jetty/jetty-options.env.win
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/scripts-jetty/jetty-options.env.win?rev=1631727&r1=1631726&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/scripts-jetty/jetty-options.env.win (original)
+++ manifoldcf/branches/dev_1x/framework/scripts-jetty/jetty-options.env.win Tue Oct 14 12:09:05
2014
@@ -1,5 +1,6 @@
 -Xms256m
 -Xmx256m
 -Dorg.apache.manifoldcf.configfile=.\properties.xml
+-Dorg.apache.manifoldcf.jettyshutdowntoken=secret_token
 -cp
 .;

Modified: manifoldcf/branches/dev_1x/framework/scripts-start/start-options.env.unix
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/scripts-start/start-options.env.unix?rev=1631727&r1=1628168&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/scripts-start/start-options.env.unix (original)
+++ manifoldcf/branches/dev_1x/framework/scripts-start/start-options.env.unix Tue Oct 14 12:09:05
2014
@@ -1,5 +1,6 @@
 -Xms256m
 -Xmx256m
 -Dorg.apache.manifoldcf.configfile=./properties.xml
+-Dorg.apache.manifoldcf.jettyshutdowntoken=secret_token
 -cp
 .:

Modified: manifoldcf/branches/dev_1x/framework/scripts-start/start-options.env.win
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/scripts-start/start-options.env.win?rev=1631727&r1=1628168&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/scripts-start/start-options.env.win (original)
+++ manifoldcf/branches/dev_1x/framework/scripts-start/start-options.env.win Tue Oct 14 12:09:05
2014
@@ -1,5 +1,6 @@
 -Xms256m
 -Xmx256m
 -Dorg.apache.manifoldcf.configfile=.\properties.xml
+-Dorg.apache.manifoldcf.jettyshutdowntoken=secret_token
 -cp
 .;

Modified: manifoldcf/branches/dev_1x/framework/ui-core/pom.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/framework/ui-core/pom.xml?rev=1631727&r1=1631726&r2=1631727&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/framework/ui-core/pom.xml (original)
+++ manifoldcf/branches/dev_1x/framework/ui-core/pom.xml Tue Oct 14 12:09:05 2014
@@ -68,6 +68,17 @@
       <version>${project.version}</version>
     </dependency>
 
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jsp-api-2.1-glassfish</artifactId>
+      <version>${glassfish.version}</version>
+    </dependency>    
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jsp-2.1-glassfish</artifactId>
+      <version>${glassfish.version}</version>
+    </dependency>
+
     <!-- other dependencies -->
      <dependency>
         <groupId>commons-lang</groupId>
@@ -90,4 +101,4 @@
       <version>${velocity.version}</version>
     </dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>



Mime
View raw message