Commit 0bbde691 authored by Yann Mombrun's avatar Yann Mombrun

WEBLAB-1559 - Fixing windows configuration and starting of zookeeper + solr on Windows.

Update headers to 2017

git-svn-id: svn://svn.forge.objectweb.org/svnroot/weblab/trunk/WebLabApplications/bundle@4526 a803c184-d8de-4a0e-a52b-d3eef88212b6
parent c8d305aa
......@@ -95,10 +95,16 @@
<outputDirectory>${activemq.path}/conf/</outputDirectory>
</file>
<!-- copy zookeeper conf file -->
<file>
<source>../conf/zookeeper/zoo_alone.cfg</source>
<outputDirectory>${zookeeper.path}/conf/</outputDirectory>
</file>
<file>
<source>../conf/zookeeper/zoo_alone.cfg</source>
<outputDirectory>${zookeeper.path}/conf/</outputDirectory>
</file>
<!-- copy zookeeper env file for windows -->
<file>
<source>../conf/zookeeper/zkEnv.cmd</source>
<outputDirectory>${zookeeper.path}/bin/</outputDirectory>
<fileMode>0755</fileMode>
</file>
<file>
<!-- Add third party license descriptors -->
<source>target/site/dependencies.html</source>
......@@ -267,6 +273,24 @@
</dependencySet>
<!-- Extract zookeeper server -->
<dependencySet>
<includes>
<include>org.apache.zookeeper:zookeeper:tar.gz</include>
</includes>
<outputFileNameMapping>${artifact.artifactId}</outputFileNameMapping>
<unpack>true</unpack>
<unpackOptions>
<excludes>
<!-- Disable default configuration that will be overriden -->
<exclude>${zookeper.path}/bin/zkEnv.cmd</exclude>
<exclude>${zookeper.path}/conf/zoo*.cmd</exclude>
</excludes>
</unpackOptions>
<fileMode>0755</fileMode>
</dependencySet>
<!-- Put WebLab Portlet in Liferay server -->
<dependencySet>
<useStrictFiltering>true</useStrictFiltering>
......@@ -281,7 +305,7 @@
<!-- Put WebLab Services in Tomcat server -->
<dependencySet>
<!-- <useStrictFiltering>true</useStrictFiltering> -->
<!-- <useStrictFiltering>true</useStrictFiltering> -->
<includes>
<include>org.ow2.weblab.webservices:*:war:*</include>
</includes>
......@@ -315,16 +339,6 @@
<fileMode>0755</fileMode>
</dependencySet>
<!-- Extract zookeeper server -->
<dependencySet>
<includes>
<include>org.apache.zookeeper:zookeeper:tar.gz</include>
</includes>
<outputFileNameMapping>${artifact.artifactId}</outputFileNameMapping>
<unpack>true</unpack>
<fileMode>0755</fileMode>
</dependencySet>
</dependencySets>
......
......@@ -205,11 +205,14 @@
<bean id="ZooKeeperServerStandAlone" class="org.ow2.weblab.bundle.server.ZooKeeperServer">
<property name="name" value="zookeeper" />
<property name="enabled" value="true" />
<property name="mandatory" value="true" />
<property name="home" value="${weblab.home}${zookeeper.path}" />
<property name="binDirectory" value="${weblab.home}${zookeeper.path}/bin" />
<!-- WARN this value is only set to check zookeeper is correctly running. Changing this value will not change port on which zookeeper is running -->
<!-- to edit zookeeper configuration see bundle/conf/zookeeper/zoo.cfg file -->
<!-- Also used on Windows to stop zookeeper -->
<!-- to edit zookeeper configuration see bundle/conf/zookeeper/zoo_alone.cfg file -->
<property name="port" value="${zookeeper1.port}" />
<!-- WARN confFile property is only sued for Linus starting script -->
<property name="confFile" value="zoo_alone.cfg" />
<property name="env" >
<bean class="org.ow2.weblab.bundle.utils.ProcessUtils.Env">
......
@echo off
REM Licensed to the Apache Software Foundation (ASF) under one or more
REM contributor license agreements. See the NOTICE file distributed with
REM this work for additional information regarding copyright ownership.
REM The ASF licenses this file to You under the Apache License, Version 2.0
REM (the "License"); you may not use this file except in compliance with
REM the License. You may obtain a copy of the License at
REM
REM http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.
set ZOOCFGDIR=%~dp0%..\conf
set ZOO_LOG_DIR=%~dp0%..
set ZOO_LOG4J_PROP=INFO,CONSOLE
REM for sanity sake assume Java 1.6
REM see: http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html
REM add the zoocfg dir to classpath
set CLASSPATH=%ZOOCFGDIR%
REM make it work in the release
SET CLASSPATH=%~dp0..\*;%~dp0..\lib\*;%CLASSPATH%
REM make it work for developers
SET CLASSPATH=%~dp0..\build\classes;%~dp0..\build\lib\*;%CLASSPATH%
set ZOOCFG=%ZOOCFGDIR%\zoo_alone.cfg
@REM setup java environment variables
if not defined JAVA_HOME (
echo Error: JAVA_HOME is not set.
goto :eof
)
set JAVA_HOME=%JAVA_HOME:"=%
if not exist "%JAVA_HOME%"\bin\java.exe (
echo Error: JAVA_HOME is incorrectly set.
goto :eof
)
set JAVA="%JAVA_HOME%"\bin\java
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
# The number of ticks that the initial synchronisation phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
# The number of ticks that can pass between sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
# do not use /tmp for storage, /tmp here is just example sakes.
dataDir=../../data/zookeeper
# the port at which the clients will connect
clientPort=2181
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......@@ -22,7 +22,6 @@ import java.util.List;
import org.ow2.weblab.bundle.server.ActiveMQServer;
import org.ow2.weblab.bundle.server.Bus;
import org.ow2.weblab.bundle.server.SolrServer;
import org.ow2.weblab.bundle.server.TomcatServer;
import org.ow2.weblab.bundle.server.WebLabServer;
......@@ -125,24 +124,29 @@ public class WebLabBean {
private ActiveMQServer activeMQServer;
private TomcatServer applicationServer;
@Deprecated
public String getDebug() {
return this.debug;
}
@Deprecated
public void setDebug(final String debug) {
this.debug = debug;
}
@Deprecated
public String getHome() {
return this.home;
}
@Deprecated
public void setHome(final String home) {
this.home = home;
}
......@@ -158,11 +162,13 @@ public class WebLabBean {
}
@Deprecated
public boolean isJmxEnabled() {
return this.jmxEnabled;
}
@Deprecated
public void setJmxEnabled(final boolean jmxEnabled) {
this.jmxEnabled = jmxEnabled;
}
......@@ -227,41 +233,50 @@ public class WebLabBean {
this.servicesReconfigure = servicesReconfigure;
}
@Deprecated
public String getSplit() {
return this.split;
}
@Deprecated
public void setSplit(final String split) {
this.split = split;
}
@Deprecated
public long getTimeout() {
return this.timeout;
}
@Deprecated
public void setTimeout(final long timeout) {
this.timeout = timeout;
}
@Deprecated
public String getToindex() {
return this.toindex;
}
@Deprecated
public void setToindex(final String toindex) {
this.toindex = toindex;
}
@Deprecated
public String getWarcs() {
return this.warcs;
}
@Deprecated
public void setWarcs(final String warcs) {
this.warcs = warcs;
}
......@@ -340,11 +355,13 @@ public class WebLabBean {
}
@Deprecated
public String getChainManagerService() {
return this.chainManagerService;
}
@Deprecated
public void setChainManagerService(final String chainManagerService) {
this.chainManagerService = chainManagerService;
}
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2013 CASSIDIAN an EADS Company
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with this
* library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
package org.ow2.weblab.bundle.server;
import javax.management.MBeanServerConnection;
import org.ow2.weblab.bundle.utils.PathUtils;
import org.ow2.weblab.bundle.utils.Utils;
/**
* Zookeeper server used by solr cloud instances
* @author lmartin
*
*/
public class ZooKeeperServer extends AbstractApplicationServer {
private String confFile;
public ZooKeeperServer() {
}
@Override
protected String[] getStartScript() {
return new String[]{PathUtils.createPath(this.getHome(), "bin") + "zkServer.sh",START,confFile};
}
@Override
protected String[] getStopScript() {
return new String[]{PathUtils.createPath(this.getHome(), "bin") + "zkServer.sh",STOP,confFile};
}
@Override
public MBeanServerConnection getMBeanServerConnection() {
// TODO Auto-generated method stub
return null;
}
@Override
public String getProcessIdentificationClue() {
return this.confFile;
}
@Override
public boolean isServerFullyStarted(final boolean showDetails) {
return !Utils.isPortAvailable(this.logger, this.getPort());
//return State.STARTED.equals(status());
}
/**
* @return the confFile
*/
public String getConfFile() {
return confFile;
}
/**
* @param confFile the confFile to set
*/
public void setConfFile(String confFile) {
this.confFile = confFile;
}
}
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with this
* library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
package org.ow2.weblab.bundle.server;
import javax.management.MBeanServerConnection;
import org.ow2.weblab.bundle.utils.PathUtils;
import org.ow2.weblab.bundle.utils.Utils;
/**
* Zookeeper server used by solr cloud instances
*
* @author lmartin
*/
public class ZooKeeperServer extends AbstractApplicationServer {
private String confFile;
public ZooKeeperServer() {
}
@Override
protected String[] getStartScript() {
// ZOOKEEPER-1122, no start/stop command on windows...
if (System.getProperty("os.name").contains("Windows")) {
return new String[] { PathUtils.createPath(this.getHome(), "bin") + "zkServer.cmd"};
}
return new String[] { PathUtils.createPath(this.getHome(), "bin") + "zkServer.sh", WebLabServer.START, this.confFile };
}
@Override
protected String[] getStopScript() {
// ZOOKEEPER-1122, no start/stop command on windows...
if (System.getProperty("os.name").contains("Windows")) {
return new String[] { PathUtils.createPath(this.getHome(), "bin") + "zkServer.cmd"};
}
return new String[] { PathUtils.createPath(this.getHome(), "bin") + "zkServer.sh", WebLabServer.START, this.confFile };
}
@Override
public MBeanServerConnection getMBeanServerConnection() {
// TODO Auto-generated method stub
return null;
}
@Override
public String getProcessIdentificationClue() {
return this.confFile;
}
@Override
public boolean isServerFullyStarted(final boolean showDetails) {
return !Utils.isPortAvailable(this.logger, this.getPort());
}
/**
* @return the confFile
*/
public String getConfFile() {
return this.confFile;
}
/**
* @param confFile
* the confFile to set
*/
public void setConfFile(final String confFile) {
this.confFile = confFile;
}
}
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2016 Airbus Defence and Space
* Copyright (C) 2004 - 2017 Airbus Defence and Space
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......