Merge "Issue #2756 reworked collaboration dataserver build" into development
Former-commit-id:68f8cd5ebe
[formerly911253bf25
[formerly bf17d41836aa6444a0efec811fbbb9786c0e36a1]] Former-commit-id:911253bf25
Former-commit-id:5bc5c7cbc7
This commit is contained in:
commit
ff4e5b8c01
7 changed files with 226 additions and 116 deletions
|
@ -74,4 +74,42 @@
|
||||||
install-size="0"
|
install-size="0"
|
||||||
version="0.0.0"/>
|
version="0.0.0"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="com.raytheon.uf.common.status"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.slf4j"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="ch.qos.logback"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.apache.commons.lang"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.apache.commons.beanutils"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.apache.commons.io"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"/>
|
||||||
|
|
||||||
</feature>
|
</feature>
|
||||||
|
|
|
@ -10,4 +10,6 @@ Require-Bundle: org.eclipse.jetty,
|
||||||
com.raytheon.uf.common.http,
|
com.raytheon.uf.common.http,
|
||||||
com.raytheon.uf.common.xmpp,
|
com.raytheon.uf.common.xmpp,
|
||||||
org.apache.http,
|
org.apache.http,
|
||||||
org.apache.commons.collections
|
org.apache.commons.collections,
|
||||||
|
org.slf4j,
|
||||||
|
ch.qos.logback
|
||||||
|
|
168
javaUtilities/collaboration.dataserver/build.xml
Normal file
168
javaUtilities/collaboration.dataserver/build.xml
Normal file
|
@ -0,0 +1,168 @@
|
||||||
|
<project default="deploy" basedir=".">
|
||||||
|
|
||||||
|
<property name="workspace" value="${basedir}/../.." />
|
||||||
|
<property name="esb.build.directory" value="${workspace}/edexOsgi/build.edex" />
|
||||||
|
<property name="feature.file" value="${basedir}.feature/feature.xml"/>
|
||||||
|
<property name="dataserver.root.directory" value="/awips2/collab-dataserver" />
|
||||||
|
<property name="includegen.filter" value="raytheon|collaboration.dataserver" />
|
||||||
|
<property name="basedirectories" value="${workspace}/edexOsgi;${workspace}/javaUtilities;${workspace}/cots" />
|
||||||
|
|
||||||
|
<property name="tmp.dir" value="${basedir}/tmp" />
|
||||||
|
<property name="includes.directory" value="${tmp.dir}/includes" />
|
||||||
|
<property name="tmp.src.dir" value="${tmp.dir}/src" />
|
||||||
|
<property name="tmp.bin.dir" value="${tmp.dir}/bin" />
|
||||||
|
<property name="tmp.lib.dir" value="${tmp.dir}/lib" />
|
||||||
|
|
||||||
|
<!-- public static final -->
|
||||||
|
<path id="ant.classpath">
|
||||||
|
<fileset dir="${esb.build.directory}/lib/ant">
|
||||||
|
<include name="*.jar" />
|
||||||
|
</fileset>
|
||||||
|
</path>
|
||||||
|
|
||||||
|
<target name="clean" >
|
||||||
|
<!-- cleanup the temporary directories -->
|
||||||
|
<if>
|
||||||
|
<available file="${basedir}/tmp" type="dir" />
|
||||||
|
<then>
|
||||||
|
<delete includeemptydirs="true">
|
||||||
|
<fileset dir="${basedir}"
|
||||||
|
includes="tmp/**" />
|
||||||
|
</delete>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="clean-dest">
|
||||||
|
<!-- clean up the runtime directories -->
|
||||||
|
<if>
|
||||||
|
<available file="${dataserver.root.directory}/lib" />
|
||||||
|
<then>
|
||||||
|
<delete verbose="true" includeemptydirs="true">
|
||||||
|
<fileset dir="${dataserver.root.directory}/lib"
|
||||||
|
includes="*/**"/>
|
||||||
|
</delete>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="deploy" depends="clean-dest,build" >
|
||||||
|
<mkdir dir="${dataserver.root.directory}/lib/uframe"/>
|
||||||
|
<!-- jar up dataserver -->
|
||||||
|
<jar destfile="${dataserver.root.directory}/lib/uframe/collaboration.dataserver.jar" basedir="${tmp.bin.dir}"/>
|
||||||
|
<!-- deploy foss -->
|
||||||
|
<copy todir="${dataserver.root.directory}/lib/foss" overwrite="true" verbose="true">
|
||||||
|
<fileset dir="${tmp.lib.dir}" includes="*.jar"/>
|
||||||
|
</copy>
|
||||||
|
<!-- deploy scripts and config -->
|
||||||
|
<copy todir="${dataserver.root.directory}/config" overwrite="false" verbose="true">
|
||||||
|
<fileset dir="${basedir}/config" />
|
||||||
|
</copy>
|
||||||
|
<copy todir="${dataserver.root.directory}/bin" overwrite="true" verbose="true">
|
||||||
|
<fileset dir="${basedir}/scriptBin" />
|
||||||
|
</copy>
|
||||||
|
<chmod dir="${dataserver.root.directory}/bin" perm="ug+rx" includes="**/*.sh"/>
|
||||||
|
<!-- clean up -->
|
||||||
|
<antcall target="clean"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="build" >
|
||||||
|
<sequential>
|
||||||
|
<!-- prepare to run includegen -->
|
||||||
|
<if>
|
||||||
|
<available file="${includes.directory}" type="dir" />
|
||||||
|
<then>
|
||||||
|
<delete verbose="true" includeemptydirs="true">
|
||||||
|
<fileset dir="${includes.directory}"
|
||||||
|
includes="*/**" />
|
||||||
|
</delete>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
<mkdir dir="${includes.directory}" />
|
||||||
|
|
||||||
|
<!-- run includegen -->
|
||||||
|
<echo message="Generating deployment list for feature: ${feature}" />
|
||||||
|
|
||||||
|
<includegen providerfilter="${includegen.filter}"
|
||||||
|
basedirectories="${basedirectories}"
|
||||||
|
featurefile="${feature.file}"
|
||||||
|
cotsout="${includes.directory}/cots.includes"
|
||||||
|
plugsout="${includes.directory}/plugins.includes"
|
||||||
|
coreout="${includes.directory}/core.includes" />
|
||||||
|
|
||||||
|
<!-- copy foss jars to tmp lib folder -->
|
||||||
|
<copyToBuild includes.file="${includes.directory}/cots.includes"
|
||||||
|
source.base="${workspace}/cots"
|
||||||
|
source.suffix=""
|
||||||
|
includes.pattern="*.jar"
|
||||||
|
target.dir="${tmp.lib.dir}" />
|
||||||
|
|
||||||
|
<!-- copy all uframe source to tmp src folder -->
|
||||||
|
<copyToBuild includes.file="${includes.directory}/core.includes"
|
||||||
|
source.base="${workspace}/edexOsgi"
|
||||||
|
source.suffix="src"
|
||||||
|
includes.pattern="**/*.java"
|
||||||
|
target.dir="${tmp.src.dir}" />
|
||||||
|
|
||||||
|
<copyToBuild includes.file="${includes.directory}/plugins.includes"
|
||||||
|
source.base="${workspace}/edexOsgi"
|
||||||
|
source.suffix="src"
|
||||||
|
includes.pattern="**/*.java"
|
||||||
|
target.dir="${tmp.src.dir}" />
|
||||||
|
|
||||||
|
<copy todir="${tmp.src.dir}" overwrite="true" verbose="true">
|
||||||
|
<fileset dir="src" includes="**/*.java" />
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<!-- compile all uframe source at once -->
|
||||||
|
<path id="foss.path">
|
||||||
|
<fileset dir="${tmp.lib.dir}">
|
||||||
|
<include name="*.jar"/>
|
||||||
|
</fileset>
|
||||||
|
</path>
|
||||||
|
<mkdir dir="${tmp.bin.dir}" />
|
||||||
|
<javac destdir="${tmp.bin.dir}">
|
||||||
|
<src path="${tmp.src.dir}"/>
|
||||||
|
<classpath refid="foss.path"/>
|
||||||
|
</javac>
|
||||||
|
</sequential>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!-- iterates over includes file and copies files -->
|
||||||
|
<macrodef name="copyToBuild">
|
||||||
|
<attribute name="includes.file"/>
|
||||||
|
<attribute name="source.base" />
|
||||||
|
<attribute name="source.suffix" />
|
||||||
|
<attribute name="includes.pattern" />
|
||||||
|
<attribute name="target.dir"/>
|
||||||
|
|
||||||
|
<sequential>
|
||||||
|
<echo>@{includes.file}</echo>
|
||||||
|
<loadfile property="@{includes.file}.contents"
|
||||||
|
srcfile="@{includes.file}" />
|
||||||
|
<for param="line" list="${@{includes.file}.contents}"
|
||||||
|
delimiter="${line.separator}">
|
||||||
|
<sequential>
|
||||||
|
<if>
|
||||||
|
<available file="@{source.base}/@{line}/@{source.suffix}" type="dir" />
|
||||||
|
<then>
|
||||||
|
<copy todir="@{target.dir}" overwrite="true" verbose="true">
|
||||||
|
<fileset dir="@{source.base}/@{line}/@{source.suffix}" includes="@{includes.pattern}" />
|
||||||
|
</copy>
|
||||||
|
</then>
|
||||||
|
<else>
|
||||||
|
<echo>No files found at @{source.base}/@{line}/@{source.suffix}</echo>
|
||||||
|
</else>
|
||||||
|
</if>
|
||||||
|
</sequential>
|
||||||
|
</for>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
|
<!-- static -->
|
||||||
|
<taskdef name="includegen"
|
||||||
|
classname="com.raytheon.uf.anttasks.includesgen.GenerateIncludesFromFeature"
|
||||||
|
classpathref="ant.classpath" />
|
||||||
|
<taskdef resource="net/sf/antcontrib/antlib.xml"
|
||||||
|
classpath="${esb.build.directory}/lib/ant/ant-contrib-1.0b3.jar" />
|
||||||
|
</project>
|
|
@ -1,99 +0,0 @@
|
||||||
<project default="main" basedir=".">
|
|
||||||
|
|
||||||
<property name="workspace" value="${basedir}/../.." />
|
|
||||||
<property name="esb.build.directory" value="${workspace}/edexOsgi/build.edex" />
|
|
||||||
<property name="feature.file" value="${basedir}.feature/feature.xml"/>
|
|
||||||
<property name="dataserver.root.directory" value="/awips2/collab-dataserver" />
|
|
||||||
<property name="includegen.filter" value="raytheon|collaboration.dataserver" />
|
|
||||||
<property name="basedirectories" value="${workspace}/edexOsgi;${workspace}/javaUtilities;${workspace}/cots" />
|
|
||||||
|
|
||||||
|
|
||||||
<!-- import -->
|
|
||||||
<import file="${esb.build.directory}/deploy-common/plugin-methods.xml" />
|
|
||||||
|
|
||||||
<!-- public static final -->
|
|
||||||
<path id="ant.classpath">
|
|
||||||
<fileset dir="${esb.build.directory}/lib/ant">
|
|
||||||
<include name="*.jar" />
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
|
|
||||||
<target name="main" >
|
|
||||||
<sequential>
|
|
||||||
<!-- prepare to run includegen -->
|
|
||||||
<var name="includes.directory" value="${basedir}/tmp/includes" />
|
|
||||||
<if>
|
|
||||||
<available file="${includes.directory}" type="dir" />
|
|
||||||
<then>
|
|
||||||
<delete verbose="true" includeemptydirs="true">
|
|
||||||
<fileset dir="${includes.directory}"
|
|
||||||
includes="*/**" />
|
|
||||||
</delete>
|
|
||||||
</then>
|
|
||||||
</if>
|
|
||||||
<mkdir dir="${includes.directory}" />
|
|
||||||
|
|
||||||
<!-- run includegen -->
|
|
||||||
<echo message="Generating deployment list for feature: ${feature}" />
|
|
||||||
|
|
||||||
<includegen providerfilter="${includegen.filter}"
|
|
||||||
basedirectories="${basedirectories}"
|
|
||||||
featurefile="${feature.file}"
|
|
||||||
cotsout="${includes.directory}/cots.includes"
|
|
||||||
plugsout="${includes.directory}/plugins.includes"
|
|
||||||
coreout="${includes.directory}/core.includes" />
|
|
||||||
|
|
||||||
<var name="destination.directory"
|
|
||||||
value="${dataserver.root.directory}/lib/plugins" />
|
|
||||||
<mkdir dir="${destination.directory}" />
|
|
||||||
<processPlugins
|
|
||||||
includes.file="${includes.directory}/plugins.includes"
|
|
||||||
plugin.type="plugins"
|
|
||||||
plugin.directories="${basedirectories}"
|
|
||||||
destination.directory="${destination.directory}" />
|
|
||||||
<processPlugins
|
|
||||||
includes.file="${includes.directory}/core.includes"
|
|
||||||
plugin.type="core"
|
|
||||||
plugin.directories="${basedirectories}"
|
|
||||||
destination.directory="${destination.directory}" />
|
|
||||||
|
|
||||||
<var name="destination.directory"
|
|
||||||
value="${dataserver.root.directory}/lib/dependencies" />
|
|
||||||
<mkdir dir="${destination.directory}" />
|
|
||||||
<processPlugins
|
|
||||||
includes.file="${includes.directory}/cots.includes"
|
|
||||||
plugin.type="cots"
|
|
||||||
plugin.directories="${basedirectories}"
|
|
||||||
destination.directory="${destination.directory}" />
|
|
||||||
|
|
||||||
<!-- deploy scripts and config -->
|
|
||||||
<copy todir="${dataserver.root.directory}/config" overwrite="false" verbose="true">
|
|
||||||
<fileset dir="${basedir}/config" />
|
|
||||||
</copy>
|
|
||||||
<copy todir="${dataserver.root.directory}/bin" overwrite="true" verbose="true">
|
|
||||||
<fileset dir="${basedir}/scriptBin" />
|
|
||||||
</copy>
|
|
||||||
<chmod dir="${dataserver.root.directory}/bin" perm="ug+rx" includes="**/*.sh"/>
|
|
||||||
|
|
||||||
<!-- cleanup the temporary directories -->
|
|
||||||
<if>
|
|
||||||
<available file="${basedir}/tmp" type="dir" />
|
|
||||||
<then>
|
|
||||||
<delete includeemptydirs="true">
|
|
||||||
<fileset dir="${basedir}"
|
|
||||||
includes="tmp/**" />
|
|
||||||
</delete>
|
|
||||||
</then>
|
|
||||||
</if>
|
|
||||||
</sequential>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- static -->
|
|
||||||
<taskdef name="includegen"
|
|
||||||
classname="com.raytheon.uf.anttasks.includesgen.GenerateIncludesFromFeature"
|
|
||||||
classpathref="ant.classpath" />
|
|
||||||
<taskdef resource="net/sf/antcontrib/antlib.xml"
|
|
||||||
classpath="${esb.build.directory}/lib/ant/ant-contrib-1.0b3.jar" />
|
|
||||||
</project>
|
|
|
@ -23,29 +23,19 @@
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# Mar 03, 2014 2756 bclement initial creation
|
# Mar 03, 2014 2756 bclement initial creation
|
||||||
|
# Mar 06, 2014 2756 bclement changed classpath to reflect new lib structure
|
||||||
|
# added log level change when debugging
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
function pathgen()
|
|
||||||
{
|
|
||||||
echo -n 'lib/plugins/*'
|
|
||||||
for x in lib/dependencies/*
|
|
||||||
do
|
|
||||||
if [[ $x =~ ^.*\.jar$ ]]
|
|
||||||
then
|
|
||||||
echo -n ":$x"
|
|
||||||
elif [[ -d $x ]]
|
|
||||||
then
|
|
||||||
echo -n ":${x}/*"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ $# > 0 && $1 == '-d' ]]
|
if [[ $# > 0 && $1 == '-d' ]]
|
||||||
then
|
then
|
||||||
dbArg='-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5118'
|
dbArg='-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5118'
|
||||||
|
logLevel='-Ddataserver.logging.level=DEBUG'
|
||||||
else
|
else
|
||||||
|
# defaults
|
||||||
dbArg=''
|
dbArg=''
|
||||||
|
logLevel=''
|
||||||
fi
|
fi
|
||||||
|
|
||||||
(cd $(dirname "$0")/..
|
(cd $(dirname "$0")/..
|
||||||
|
@ -55,7 +45,7 @@ then
|
||||||
echo "PID file already exists at $PIDFILE, exiting"
|
echo "PID file already exists at $PIDFILE, exiting"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
nohup java $dbArg -server -cp $(pathgen) com.raytheon.collaboration.dataserver.DataserverMain &
|
nohup java $dbArg $logLevel -server -cp lib/uframe/*:lib/foss/* com.raytheon.collaboration.dataserver.DataserverMain &
|
||||||
|
|
||||||
echo $! > $PIDFILE
|
echo $! > $PIDFILE
|
||||||
)
|
)
|
||||||
|
|
|
@ -37,6 +37,7 @@ import java.util.Properties;
|
||||||
* Feb 5, 2014 2756 bclement Initial creation
|
* Feb 5, 2014 2756 bclement Initial creation
|
||||||
* Feb 28, 2014 2756 bclement added auth cache size
|
* Feb 28, 2014 2756 bclement added auth cache size
|
||||||
* Mar 04, 2014 2756 bclement added xmpp server retry
|
* Mar 04, 2014 2756 bclement added xmpp server retry
|
||||||
|
* Mar 06, 2014 2756 bclement added logging level
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -98,6 +99,9 @@ public class Config{
|
||||||
public static final Boolean useStdOut = Boolean
|
public static final Boolean useStdOut = Boolean
|
||||||
.getBoolean("collaboration.dataserver.stdout");
|
.getBoolean("collaboration.dataserver.stdout");
|
||||||
|
|
||||||
|
public static final String loggingLevel = System.getProperty(
|
||||||
|
"dataserver.logging.level", "INFO");
|
||||||
|
|
||||||
private static Properties _props = null;
|
private static Properties _props = null;
|
||||||
|
|
||||||
private static Properties _credProps = null;
|
private static Properties _credProps = null;
|
||||||
|
|
|
@ -25,6 +25,10 @@ import java.io.PrintStream;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
import org.eclipse.jetty.util.RolloverFileOutputStream;
|
import org.eclipse.jetty.util.RolloverFileOutputStream;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import ch.qos.logback.classic.Level;
|
||||||
|
import ch.qos.logback.classic.Logger;
|
||||||
|
|
||||||
import com.raytheon.collaboration.dataserver.auth.ServerAuthManager;
|
import com.raytheon.collaboration.dataserver.auth.ServerAuthManager;
|
||||||
|
|
||||||
|
@ -39,6 +43,7 @@ import com.raytheon.collaboration.dataserver.auth.ServerAuthManager;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Feb 5, 2014 2756 bclement Initial creation
|
* Feb 5, 2014 2756 bclement Initial creation
|
||||||
* Feb 28, 2014 2756 bclement added authManager
|
* Feb 28, 2014 2756 bclement added authManager
|
||||||
|
* Mar 06, 2014 2756 bclement added logging level config
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -108,6 +113,8 @@ public class DataserverMain {
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
private static void configureLogging() throws IOException {
|
private static void configureLogging() throws IOException {
|
||||||
|
Logger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
|
||||||
|
root.setLevel(Level.valueOf(Config.loggingLevel));
|
||||||
if (Config.useStdOut){
|
if (Config.useStdOut){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue