Issue #18 - rename jetty.port to web.port; the default for web.port is now 8080. The wes2bridge utilities are now built from source.

Former-commit-id: 476ad5de1f [formerly f49aadd9c8] [formerly 1afa927c33] [formerly 476ad5de1f [formerly f49aadd9c8] [formerly 1afa927c33] [formerly 839d7c886f [formerly 1afa927c33 [formerly f11953c494fac20b2ad53b41069cfcb24281eb4a]]]]
Former-commit-id: 839d7c886f
Former-commit-id: 438e88cc58 [formerly ab70749ea4] [formerly 52c4e4a8f476851151cdf69f82896ccf0b965430 [formerly 24148c19a9]]
Former-commit-id: 8311d4eb699b277f616ec522a0769d665dba89b5 [formerly adaa011b1f]
Former-commit-id: 6f9a0e45cb
This commit is contained in:
Bryan Kowal 2012-04-09 09:32:45 -05:00
parent db5981d4cd
commit d484d46519
51 changed files with 1615 additions and 11 deletions

View file

@ -118,7 +118,7 @@ wrapper.java.additional.39=-DHighMem=%HIGH_MEM_FLAG%
wrapper.java.additional.40=-Dmanagement.port=%MGMT_PORT%
wrapper.java.additional.41=-Dqpid.dest_syntax=BURL
wrapper.java.additional.42=-Djetty.port=8081
wrapper.java.additional.42=-Dweb.port=8080
wrapper.java.additional.43=-Dconfidential.port=8443
wrapper.java.additional.44=-Dhttp.port=%HTTP_PORT%

View file

@ -22,7 +22,7 @@
<property name="connectors">
<list>
<bean id="Connector" class="org.eclipse.jetty.server.nio.SelectChannelConnector">
<property name="port" value="${jetty.port}"/>
<property name="port" value="${web.port}"/>
<property name="maxIdleTime" value="30000"/>
<property name="acceptors" value="2"/>
<property name="confidentialPort" value="${confidential.port}"/>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>build.wes2bridge.utility</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>

View file

@ -0,0 +1,32 @@
<project basedir=".">
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpath="${basedir}/../build.wes2bridge.utility/lib/ant/ant-contrib-1.0b3.jar" />
<!-- The directory that the jar file will be placed in when it is finished. -->
<property name="destination.directory"
value="" />
<!-- The location of uframe-eclipse. -->
<property name="eclipse.directory" value="/opt/uframe-eclipse" />
<!-- Used to indicate if this is part of an rpm build. -->
<property name="rpm.build" value="false" />
<!-- Verify the a destination directory has been provided. -->
<if>
<equals arg1="${destination.directory}" arg2="" />
<then>
<fail message="Error: a destination directory has not been specified." />
</then>
</if>
<if>
<equals arg1="${rpm.build}" arg2="true" />
<then>
<var name="baseline.directory" value="${basedir}/../build.wes2bridge.utility/wes2bridge/tmp/plugins" />
<var name="bin.dir" value="@dot" />
</then>
<else>
<var name="baseline.directory" value="${basedir}/../" />
<var name="bin.dir" value="bin" />
</else>
</if>
</project>

View file

@ -0,0 +1,60 @@
<project default="build" basedir=".">
<property name="eclipse.dir"
value="/opt/uframe-eclipse" />
<target name="init">
<antcall target="clean" />
<exec executable="/usr/bin/find"
outputproperty="launcher.jar">
<arg value="${eclipse.dir}/plugins" />
<arg value="-name" />
<arg value="org.eclipse.equinox.launcher_*.jar" />
</exec>
<exec executable="/usr/bin/find"
outputproperty="pde.dir">
<arg value="${eclipse.dir}/plugins" />
<arg value="-name" />
<arg value="org.eclipse.pde.build_*" />
</exec>
</target>
<target name="clean">
<if>
<available file="${basedir}/wes2bridge/tmp"
type="dir" />
<then>
<delete includeemptydirs="true">
<fileset dir="${basedir}/wes2bridge/tmp" />
</delete>
</then>
</if>
</target>
<target name="build" depends="init">
<java
classname="org.eclipse.core.launcher.Main"
fork="true"
failonerror="true">
<arg value="-application" />
<arg value="org.eclipse.ant.core.antRunner" />
<arg value="-buildfile" />
<arg value="${pde.dir}/scripts/productBuild/productBuild.xml" />
<arg value="-DbaseLocation=${eclipse.dir}" />
<arg value="-Dbuilder=${basedir}/wes2bridge" />
<arg value="-DbuildDirectory=${basedir}/wes2bridge/tmp" />
<arg value="-Dbase=${basedir}/wes2bridge" />
<arg value="-Dconfigs=linux,gtk,x86" />
<classpath>
<pathelement
location="${launcher.jar}" />
</classpath>
</java>
</target>
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpath="${basedir}/lib/ant/ant-contrib-1.0b3.jar" />
</project>

View file

@ -0,0 +1,28 @@
# Wes2Bridge Utility pde build properties.
product=/com.raytheon.wes2bridge.utility.product/wes2bridge.utility.product
topLevelElementType=feature
buildType=I
buildId=Wes2Bridge
buildLabel=${buildType}.${buildId}
timestamp=007
archivePrefix=wes2bridge
archivesFormat=linux, gtk, x86 - folder
collectingFolder=${archivePrefix}
runPackager=false
skipBase=true
skipFetch=true
skipMaps=true
baseos=linux
basews=gtk
basearch=x86
logExtension=.log
javacDebugInfo=false
javacFailOnError=true
javacVerbose=true
javacSource=1.6
javacTarget=1.6
compilerArg=-g:lines,source

View file

@ -0,0 +1,191 @@
<project name="Build specific targets and properties" default="noDefault">
<!-- ===================================================================== -->
<!-- Run a given ${target} on all elements being built -->
<!-- Add on <ant> task for each top level element being built. -->
<!-- ===================================================================== -->
<property name="allElementsFile" value="${builder}/allElements.xml"/>
<import file="${allElementsFile}" />
<target name="allElements">
<antcall target="allElementsDelegator" />
</target>
<!-- ===================================================================== -->
<!-- ===================================================================== -->
<target name="getBaseComponents" depends="checkLocalBase" unless="skipBase">
<get src="${eclipseBaseURL}" dest="${buildDirectory}/../temp-base.zip" />
<unzip dest="${base}" overwrite="true" src="${buildDirectory}/../temp-base.zip" />
</target>
<target name="checkLocalBase">
<available file="${base}" property="skipBase" />
</target>
<!-- ===================================================================== -->
<!-- Check out map files from correct repository -->
<!-- Replace values for mapsCheckoutTag as desired. -->
<!-- ===================================================================== -->
<target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps">
</target>
<target name="checkLocalMaps">
</target>
<target name="tagMapFiles" if="tagMaps">
</target>
<!-- ===================================================================== -->
<target name="clean" unless="noclean">
<antcall target="allElements">
<param name="target" value="cleanElement" />
</antcall>
</target>
<target name="gatherLogs">
<mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
<antcall target="allElements">
<param name="target" value="gatherLogs" />
</antcall>
<unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
<fileset dir="${buildDirectory}/features">
<include name="**/*.log.zip" />
</fileset>
</unzip>
</target>
<!-- ===================================================================== -->
<!-- Steps to do before setup -->
<!-- ===================================================================== -->
<target name="preSetup">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after setup but before starting the build proper -->
<!-- ===================================================================== -->
<target name="postSetup">
<echo message="${buildDirectory}"/>
<mkdir dir="${buildDirectory}/plugins"/>
<echo message="com.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="com.*/**"/>
</copy>
<echo message="org.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="org.*/**"/>
</copy>
<echo message="javax.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="javax.*/**"/>
</copy>
<echo message="features.*/**"/>
<copy todir="${buildDirectory}/features">
<fileset dir="${buildDirectory}/../../../" includes="*.feature*/**"/>
</copy>
<antcall target="getBaseComponents" />
</target>
<!-- ===================================================================== -->
<!-- Steps to do before fetching the build elements -->
<!-- ===================================================================== -->
<target name="preFetch">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after fetching the build elements -->
<!-- ===================================================================== -->
<target name="postFetch">
</target>
<!-- ===================================================================== -->
<!-- Steps to do before generating the build scripts. -->
<!-- ===================================================================== -->
<target name="preGenerate">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after generating the build scripts. -->
<!-- ===================================================================== -->
<target name="postGenerate">
<antcall target="clean" />
</target>
<!-- ===================================================================== -->
<!-- Steps to do before running the build.xmls for the elements being built. -->
<!-- ===================================================================== -->
<target name="preProcess">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after running the build.xmls for the elements being built. -->
<!-- ===================================================================== -->
<target name="postProcess">
</target>
<!-- ===================================================================== -->
<!-- Steps to do before running assemble. -->
<!-- ===================================================================== -->
<target name="preAssemble">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after running assemble. -->
<!-- ===================================================================== -->
<target name="postAssemble">
</target>
<!-- ===================================================================== -->
<!-- Steps to do before running package. -->
<!-- ===================================================================== -->
<target name="prePackage">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after running package. -->
<!-- ===================================================================== -->
<target name="postPackage">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after the build is done. -->
<!-- ===================================================================== -->
<target name="postBuild">
</target>
<!-- ===================================================================== -->
<!-- Steps to do to test the build results -->
<!-- ===================================================================== -->
<target name="test">
<ant antfile="${builder}/test.xml" />
</target>
<target name="checkJUnitTestResults">
<taskdef name="checkJUnitReports" classname="sample.tools.TestResultCheck" classpath="${builder}/bin;${builder}/extraTools/sampletools.jar" />
<checkJUnitReports dir="${buildDirectory}/${buildLabel}/testresults" output="${buildDirectory}/junitresults.txt" />
</target>
<!-- ===================================================================== -->
<!-- Steps to do to publish the build results -->
<!-- ===================================================================== -->
<target name="publish">
</target>
<!-- ===================================================================== -->
<!-- Default target -->
<!-- ===================================================================== -->
<target name="noDefault">
<echo message="You must specify a target when invoking this file" />
</target>
</project>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.wes2bridge.common</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,8 @@
#Thu Jan 12 13:45:52 CST 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -0,0 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Wes2Bridge Utility Common
Bundle-SymbolicName: com.raytheon.wes2bridge.common
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.apache.commons.configuration;bundle-version="1.6.0",
org.apache.commons.lang;bundle-version="2.3.0"
Export-Package: com.raytheon.wes2bridge.common.configuration

View file

@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.

View file

@ -0,0 +1,158 @@
/**
*
*/
package com.raytheon.wes2bridge.common.configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.XMLConfiguration;
/**
* @author bkowal
*
*/
/*
* Example:
* <Wes2BridgeCase>
* <name>String</name>
* <dataArchiveRoot>String</dataArchiveRoot>
* <databasePort>int</databasePort>
* <edexHttpPort>int</edexHttpPort>
* <jmsPort>int</jmsPort>
* <jettyPort>int</jettyPort>
* <confidentialPort></confidentialPort>
* </Wes2BridgeCase>
*/
public class Wes2BridgeConfiguration
{
private String configurationFile = null;
private String testCaseName = null;
private String dataArchiveRoot = null;
private int databasePort = -1;
private int edexHttpPort = -1;
private int jmsPort = -1;
private int jettyPort = -1;
private int confidentialPort = -1;
/**
*
*/
public Wes2BridgeConfiguration(String configurationFile)
{
this.configurationFile = configurationFile;
this.testCaseName = null;
this.dataArchiveRoot = null;
this.databasePort = -1;
this.edexHttpPort = -1;
this.jmsPort = -1;
this.jettyPort = -1;
this.confidentialPort = -1;
}
public void init()
throws ConfigurationException
{
XMLConfiguration xmlConfiguration =
new XMLConfiguration(this.configurationFile);
this.testCaseName =
xmlConfiguration.getString("name");
/*
* Currently spaces are not allowed in the
* name of a test case.
*/
if (this.testCaseName.contains(" "))
{
ConfigurationException exception =
new ConfigurationException(
"The Wes2Bridge name cannot contain spaces.");
exception.fillInStackTrace();
throw exception;
}
this.dataArchiveRoot =
xmlConfiguration.getString("dataArchiveRoot");
this.databasePort =
xmlConfiguration.getInt("databasePort");
this.edexHttpPort =
xmlConfiguration.getInt("edexHttpPort");
this.jmsPort =
xmlConfiguration.getInt("jmsPort");
this.jettyPort =
xmlConfiguration.getInt("jettyPort");
this.confidentialPort =
xmlConfiguration.getInt("confidentialPort");
}
public String getTestCaseName()
{
return testCaseName;
}
public void setTestCaseName(String testCaseName)
{
this.testCaseName = testCaseName;
}
public String getDataArchiveRoot()
{
return dataArchiveRoot;
}
public void setDataArchiveRoot(String dataArchiveRoot)
{
this.dataArchiveRoot = dataArchiveRoot;
}
public int getDatabasePort()
{
return databasePort;
}
public void setDatabasePort(int databasePort)
{
this.databasePort = databasePort;
}
public int getEdexHttpPort()
{
return edexHttpPort;
}
public void setEdexHttpPort(int edexHttpPort)
{
this.edexHttpPort = edexHttpPort;
}
public int getJmsPort()
{
return jmsPort;
}
public void setJmsPort(int jmsPort)
{
this.jmsPort = jmsPort;
}
public int getJettyPort()
{
return jettyPort;
}
public void setJettyPort(int jettyPort)
{
this.jettyPort = jettyPort;
}
public int getConfidentialPort()
{
return confidentialPort;
}
public void setConfidentialPort(int confidentialPort)
{
this.confidentialPort = confidentialPort;
}
}

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.wes2bridge.configuration</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,8 @@
#Thu Jan 12 14:09:44 CST 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -0,0 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Wes2Bridge Configuration Utility
Bundle-SymbolicName: com.raytheon.wes2bridge.configuration
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.apache.commons.configuration;bundle-version="1.6.0",
org.apache.commons.lang;bundle-version="2.3.0",
com.raytheon.wes2bridge.common;bundle-version="1.0.0"

View file

@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.

View file

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_run_jar"
name="Create Runnable Jar for Project com.raytheon.wes2bridge.configuration with Jar-in-Jar Loader"
basedir=".">
<import file="${basedir}/../build.wes2bridge.utility/ant/setup.xml" />
<target name="create_run_jar">
<jar destfile="${destination.directory}/ConfigurationUtility.jar">
<manifest>
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
<attribute name="Rsrc-Main-Class" value="com.raytheon.wes2bridge.configuration.ConfigurationUtility"/>
<attribute name="Class-Path" value="."/>
<attribute name="Rsrc-Class-Path" value="./ commons-collections-3.2.jar commons-logging-1.1.1.jar geronimo-jms_1.1_spec-1.1.1.jar org.eclipse.ui_3.6.1.M20100826-1330.jar org.eclipse.swt_3.6.1.v3655c.jar org.eclipse.swt.gtk.linux.x86_3.6.1.v3655c.jar org.eclipse.jface_3.6.1.M20100825-0800.jar org.eclipse.core.commands_3.6.0.I20100512-1500.jar org.eclipse.ui.workbench_3.6.1.M20100826-1330.jar org.eclipse.core.runtime_3.6.0.v20100505.jar org.eclipse.osgi_3.6.1.R36x_v20100806.jar org.eclipse.equinox.common_3.6.0.v20100503.jar org.eclipse.core.jobs_3.5.1.R36x_v20100824.jar runtime_registry_compatibility.jar org.eclipse.equinox.registry_3.5.0.v20100503.jar org.eclipse.equinox.preferences_3.3.0.v20100503.jar org.eclipse.core.contenttype_3.4.100.v20100505-1235.jar org.eclipse.equinox.app_1.3.1.R36x_v20100803.jar log4j-1.2.16.jar log4j.extras-1.0.jar commons-beanutils-1.8.3.jar commons-digester-1.8.1.jar commons-lang-2.3.jar commons-configuration-1.6.jar"/>
</manifest>
<zipfileset src="${basedir}/../build.wes2bridge.utility/lib/jar-in-jar-loader.zip"/>
<zipfileset dir="${baseline.directory}/org.apache.commons.collections" includes="commons-collections-3.2.jar"/>
<zipfileset dir="${baseline.directory}/org.apache.commons.logging" includes="commons-logging-1.1.1.jar"/>
<zipfileset dir="${baseline.directory}/javax.jms" includes="geronimo-jms_1.1_spec-1.1.1.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.ui_3.6.1.M20100826-1330.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.swt_3.6.1.v3655c.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.swt.gtk.linux.x86_3.6.1.v3655c.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.jface_3.6.1.M20100825-0800.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.core.commands_3.6.0.I20100512-1500.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.ui.workbench_3.6.1.M20100826-1330.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.core.runtime_3.6.0.v20100505.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.osgi_3.6.1.R36x_v20100806.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.equinox.common_3.6.0.v20100503.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.core.jobs_3.5.1.R36x_v20100824.jar"/>
<zipfileset dir="${eclipse.directory}/plugins/org.eclipse.core.runtime.compatibility.registry_3.3.0.v20100520" includes="runtime_registry_compatibility.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.equinox.registry_3.5.0.v20100503.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.equinox.preferences_3.3.0.v20100503.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.core.contenttype_3.4.100.v20100505-1235.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.equinox.app_1.3.1.R36x_v20100803.jar"/>
<zipfileset dir="${baseline.directory}/org.apache.log4j" includes="log4j-1.2.16.jar"/>
<zipfileset dir="${baseline.directory}/org.apache.log4j" includes="log4j.extras-1.0.jar"/>
<zipfileset dir="${baseline.directory}/org.apache.commons.beanutils" includes="commons-beanutils-1.8.3.jar"/>
<zipfileset dir="${baseline.directory}/org.apache.commons.digester" includes="commons-digester-1.8.1.jar"/>
<zipfileset dir="${baseline.directory}/org.apache.commons.lang" includes="commons-lang-2.3.jar"/>
<zipfileset dir="${baseline.directory}/org.apache.commons.configuration" includes="commons-configuration-1.6.jar"/>
<fileset dir="${baseline.directory}/com.raytheon.wes2bridge.common/${bin.dir}"/>
<fileset dir="${baseline.directory}/com.raytheon.wes2bridge.configuration/${bin.dir}"/>
</jar>
</target>
</project>

View file

@ -0,0 +1,80 @@
/**
*
*/
package com.raytheon.wes2bridge.configuration;
import org.apache.commons.configuration.ConfigurationException;
import com.raytheon.wes2bridge.common.configuration.Wes2BridgeConfiguration;
/**
* @author bkowal
*
*/
public class ConfigurationUtility
{
private static final String FIELD_NAME = "-name";
private static final String FIELD_ARCHIVE = "-archiveRoot";
private static final String FIELD_DBPORT = "-databasePort";
private static final String FIELD_HTTPPORT = "-httpPort";
private static final String FIELD_JMSPORT = "-jmsPort";
private static final String FIELD_JETTYPORT =
"-jettyPort";
private static final String FIELD_CONFPORT =
"-confidentialPort";
/**
* @param args
*/
public static void main(String[] args)
{
if (args.length != 2)
{
System.out.println("Error: both a configuration file and a field must be specified.");
System.exit(-1);
}
Wes2BridgeConfiguration configuration =
new Wes2BridgeConfiguration(args[0]);
try
{
configuration.init();
}
catch (ConfigurationException e1)
{
e1.printStackTrace();
System.exit(-1);
}
final String field = args[1];
if (field.equals(FIELD_NAME))
{
System.out.print(configuration.getTestCaseName());
}
else if (field.equals(FIELD_ARCHIVE))
{
System.out.print(configuration.getDataArchiveRoot());
}
else if (field.equals(FIELD_DBPORT))
{
System.out.print(configuration.getDatabasePort());
}
else if (field.equals(FIELD_HTTPPORT))
{
System.out.print(configuration.getEdexHttpPort());
}
else if (field.equals(FIELD_JMSPORT))
{
System.out.print(configuration.getJmsPort());
}
else if (field.equals(FIELD_JETTYPORT))
{
System.out.println(configuration.getJettyPort());
}
else if (field.equals(FIELD_CONFPORT))
{
System.out.println(configuration.getConfidentialPort());
}
System.exit(0);
}
}

View file

@ -0,0 +1,6 @@
log4j.rootLogger=ERROR, CA
log4j.appender.CA=org.apache.log4j.ConsoleAppender
log4j.appender.CA.layout=org.apache.log4j.PatternLayout
log4j.appender.CA.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.wes2bridge.datalink</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,8 @@
#Thu Jan 12 13:58:47 CST 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -0,0 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Wes2Bridge Datalink Utility
Bundle-SymbolicName: com.raytheon.wes2bridge.datalink
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6

View file

@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_run_jar"
name="Create Runnable Jar for Project com.raytheon.wes2bridge.datalink with Jar-in-Jar Loader"
basedir=".">
<import file="${basedir}/../build.wes2bridge.utility/ant/setup.xml" />
<target name="create_run_jar">
<jar destfile="${destination.directory}/DataLinkUtility.jar">
<manifest>
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
<attribute name="Rsrc-Main-Class" value="com.raytheon.wes2bridge.datalink.DataLinkUtility"/>
<attribute name="Class-Path" value="."/>
<attribute name="Rsrc-Class-Path" value="./"/>
</manifest>
<zipfileset src="${basedir}/../build.wes2bridge.utility/lib/jar-in-jar-loader.zip"/>
<fileset dir="${baseline.directory}/com.raytheon.wes2bridge.datalink/${bin.dir}"/>
</jar>
</target>
</project>

View file

@ -0,0 +1,34 @@
/**
*
*/
package com.raytheon.wes2bridge.datalink;
/**
* @author bkowal
*
* This is an extremely simple utility. This program
* expects on argument: a postgresql database directory.
* This utility will then extract the "/awips2/data" and
* return only the name of the database directory.
*/
public class DataLinkUtility
{
private static final String AWIPSII_DATA = "/awips2/data/";
/**
* @param args
*/
public static void main(String[] args)
{
if (args.length != 1)
{
System.out.print("Error: The name of the data directory must be specified.");
System.exit(-1);
}
String dataDirectory = args[0];
System.out.print(dataDirectory.replace(AWIPSII_DATA, ""));
System.exit(0);
}
}

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.wes2bridge.manager</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,8 @@
#Wed Jan 11 13:37:48 CST 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -0,0 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Wes2Bridge Manager
Bundle-SymbolicName: com.raytheon.wes2bridge.manager
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: com.raytheon.wes2bridge.common;bundle-version="1.0.0",
org.apache.commons.configuration;bundle-version="1.6.0",
org.apache.commons.lang;bundle-version="2.3.0"

View file

@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.

View file

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_run_jar"
name="Create Runnable Jar for Project com.raytheon.wes2bridge.manager with Jar-in-Jar Loader"
basedir=".">
<import file="${basedir}/../build.wes2bridge.utility/ant/setup.xml" />
<target name="create_run_jar">
<jar destfile="${destination.directory}/Wes2BridgeManager.jar">
<manifest>
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
<attribute name="Rsrc-Main-Class" value="com.raytheon.wes2bridge.manager.Wes2BridgeManager"/>
<attribute name="Class-Path" value="."/>
<attribute name="Rsrc-Class-Path" value="./ commons-collections-3.2.jar commons-logging-1.1.1.jar geronimo-jms_1.1_spec-1.1.1.jar org.eclipse.ui_3.6.1.M20100826-1330.jar org.eclipse.swt_3.6.1.v3655c.jar org.eclipse.swt.gtk.linux.x86_3.6.1.v3655c.jar org.eclipse.jface_3.6.1.M20100825-0800.jar org.eclipse.core.commands_3.6.0.I20100512-1500.jar org.eclipse.ui.workbench_3.6.1.M20100826-1330.jar org.eclipse.core.runtime_3.6.0.v20100505.jar org.eclipse.osgi_3.6.1.R36x_v20100806.jar org.eclipse.equinox.common_3.6.0.v20100503.jar org.eclipse.core.jobs_3.5.1.R36x_v20100824.jar runtime_registry_compatibility.jar org.eclipse.equinox.registry_3.5.0.v20100503.jar org.eclipse.equinox.preferences_3.3.0.v20100503.jar org.eclipse.core.contenttype_3.4.100.v20100505-1235.jar org.eclipse.equinox.app_1.3.1.R36x_v20100803.jar log4j-1.2.16.jar log4j.extras-1.0.jar commons-beanutils-1.8.3.jar commons-digester-1.8.1.jar commons-lang-2.3.jar commons-configuration-1.6.jar"/>
</manifest>
<zipfileset src="${basedir}/../build.wes2bridge.utility/lib/jar-in-jar-loader.zip"/>
<zipfileset dir="${baseline.directory}/org.apache.commons.collections" includes="commons-collections-3.2.jar"/>
<zipfileset dir="${baseline.directory}/org.apache.commons.logging" includes="commons-logging-1.1.1.jar"/>
<zipfileset dir="${baseline.directory}/javax.jms" includes="geronimo-jms_1.1_spec-1.1.1.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.ui_3.6.1.M20100826-1330.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.swt_3.6.1.v3655c.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.swt.gtk.linux.x86_3.6.1.v3655c.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.jface_3.6.1.M20100825-0800.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.core.commands_3.6.0.I20100512-1500.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.ui.workbench_3.6.1.M20100826-1330.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.core.runtime_3.6.0.v20100505.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.osgi_3.6.1.R36x_v20100806.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.equinox.common_3.6.0.v20100503.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.core.jobs_3.5.1.R36x_v20100824.jar"/>
<zipfileset dir="${eclipse.directory}/plugins/org.eclipse.core.runtime.compatibility.registry_3.3.0.v20100520" includes="runtime_registry_compatibility.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.equinox.registry_3.5.0.v20100503.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.equinox.preferences_3.3.0.v20100503.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.core.contenttype_3.4.100.v20100505-1235.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.equinox.app_1.3.1.R36x_v20100803.jar"/>
<zipfileset dir="${baseline.directory}/org.apache.log4j" includes="log4j-1.2.16.jar"/>
<zipfileset dir="${baseline.directory}/org.apache.log4j" includes="log4j.extras-1.0.jar"/>
<zipfileset dir="${baseline.directory}/org.apache.commons.beanutils" includes="commons-beanutils-1.8.3.jar"/>
<zipfileset dir="${baseline.directory}/org.apache.commons.digester" includes="commons-digester-1.8.1.jar"/>
<zipfileset dir="${baseline.directory}/org.apache.commons.lang" includes="commons-lang-2.3.jar"/>
<zipfileset dir="${baseline.directory}/org.apache.commons.configuration" includes="commons-configuration-1.6.jar"/>
<fileset dir="${baseline.directory}/com.raytheon.wes2bridge.common/${bin.dir}"/>
<fileset dir="${baseline.directory}/com.raytheon.wes2bridge.manager/${bin.dir}"/>
</jar>
</target>
</project>

View file

@ -0,0 +1,465 @@
/**
*
*/
package com.raytheon.wes2bridge.manager;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.BufferedReader;
import java.io.FileWriter;
import java.io.BufferedWriter;
import java.io.IOException;
import org.apache.commons.configuration.ConfigurationException;
import com.raytheon.wes2bridge.common.configuration.Wes2BridgeConfiguration;
/**
* @author bkowal
*
* This java-based utility is used to update a wes2bridge environment.
* This utility is invoked by the wes2bridge management script (bash)
* after the management script spawns a new edex, database, qpid.
* Only "base" files are updated based on the configuration file. The
* new wes2bridge environment will still need to be localized.
*/
public class Wes2BridgeManager
{
private static final String AWIPSII =
"/awips2";
private static final String AWIPSII_WES2BRIDGE_SCRIPTS =
AWIPSII + "/wes2bridge/scripts";
private static final String WES2BRIDGE_DIRECTORY =
"/usr/local/wes2bridge";
private Wes2BridgeConfiguration configuration = null;
private String wes2BridgeScripts = null;
/**
*
*/
public Wes2BridgeManager()
{
}
/**
* @param args
*/
public static void main(String[] args)
{
if (args.length != 1)
{
System.out.println("ERROR: The configuration file has not been specified.");
System.exit(-1);
}
Wes2BridgeManager manager = new Wes2BridgeManager();
try
{
manager.init(args[0]);
}
catch (Exception e1)
{
e1.printStackTrace();
System.exit(-1);
}
try
{
manager.reconfigureEdex();
}
catch (Exception e1)
{
e1.printStackTrace();
System.exit(-1);
}
try
{
manager.reconfigurePostgreSQL();
}
catch (Exception e1)
{
e1.printStackTrace();
System.exit(-1);
}
try
{
manager.reconfigureQPID();
}
catch (Exception e1)
{
e1.printStackTrace();
System.exit(-1);
}
System.exit(0);
}
public void init(String arg1)
throws ConfigurationException
{
configuration = new Wes2BridgeConfiguration(arg1);
configuration.init();
this.wes2BridgeScripts = WES2BRIDGE_DIRECTORY + "/" +
configuration.getTestCaseName() + "/" +
"wes2bridge";
}
/*
* Updates setup.env and wrapper.conf.
*/
public void reconfigureEdex()
throws FileNotFoundException, IOException
{
final String srcEdexDirectory =
AWIPSII + "/" +
"edex";
final String edexDirectory =
WES2BRIDGE_DIRECTORY + "/" +
this.configuration.getTestCaseName() + "/" +
"edex";
this.updateEdexSetup(srcEdexDirectory, edexDirectory);
this.updateEdexWrapper(srcEdexDirectory, edexDirectory);
this.updateEdexCamel(edexDirectory);
}
private void updateEdexSetup(String srcEdexDirectory,
String edexDirectory)
throws FileNotFoundException, IOException
{
String srcsetup_env = srcEdexDirectory + "/bin/setup.env";
String setup_env = edexDirectory + "/bin/setup.env";
File srcFile = new File(srcsetup_env);
File destFile = new File(setup_env);
BufferedReader br =
new BufferedReader(new FileReader(srcFile));
BufferedWriter bw =
new BufferedWriter(new FileWriter(destFile));
final String line1 = "export DATA_ARCHIVE_ROOT=";
final String line2 = "export DB_PORT=";
final String line3 = "export BROKER_ADDR=";
final String line4 = "export HTTP_PORT=";
final String line5 = "export JMS_SERVER=";
final String line6 = "export SHARE_DIR=";
String line = "";
while ((line = br.readLine()) != null)
{
if (line.startsWith(line1))
{
line = line1 + this.configuration.getDataArchiveRoot();
}
else if (line.startsWith(line2))
{
line = line2 + this.configuration.getDatabasePort();
}
else if (line.startsWith(line3))
{
line = line3 + "localhost:" +
this.configuration.getJmsPort();
}
else if (line.startsWith(line4))
{
line = line4 + this.configuration.getEdexHttpPort();
}
else if (line.startsWith(line5))
{
line = line5 + "tcp://localhost:" +
this.configuration.getJmsPort();
}
else if (line.startsWith(line6))
{
line = line6 + edexDirectory + "/data/share";
}
bw.write(line + "\n");
}
br.close();
bw.close();
}
/* Disable JMX. */
private void updateEdexWrapper(String srcEdexDirectory,
String edexDirectory)
throws FileNotFoundException, IOException
{
String srcwrapper_conf = srcEdexDirectory +
"/bin/linux-x86-32/wrapper.conf";
String wrapper_conf = edexDirectory +
"/bin/linux-x86-32/wrapper.conf";
File srcFile = new File(srcwrapper_conf);
File destFile = new File(wrapper_conf);
BufferedReader br =
new BufferedReader(new FileReader(srcFile));
BufferedWriter bw =
new BufferedWriter(new FileWriter(destFile));
final String line1 = "wrapper.java.additional.5=";
final String line2 = "wrapper.java.additional.23=";
final String line3 = "wrapper.java.additional.24=";
final String line4 = "wrapper.java.additional.25=";
final String line5 = "wrapper.java.additional.42=";
final String line6 = "wrapper.java.additional.43=";
String line = "";
while ((line = br.readLine()) != null)
{
if (line.startsWith(line1))
{
line = line1;
}
else if (line.startsWith(line2))
{
line = line2 + "-Dwes2bridge.instance=" +
this.configuration.getTestCaseName();
}
else if (line.startsWith(line3))
{
line = line3;
}
else if (line.startsWith(line4))
{
line = line4;
}
else if (line.startsWith(line5))
{
line = line5 + "-Dweb.port=" +
this.configuration.getJettyPort();
}
else if (line.startsWith(line6))
{
line = line6 + "-Dconfidential.port=" +
this.configuration.getConfidentialPort();
}
bw.write(line + "\n");
}
br.close();
bw.close();
}
private void updateEdexCamel(String edexDirectory)
throws FileNotFoundException, IOException
{
final String srcedex_camel = AWIPSII_WES2BRIDGE_SCRIPTS + "/" +
"edex_camel";
final String edex_camel = this.wes2BridgeScripts + "/edex_camel";
File srcFile = new File(srcedex_camel);
File destFile = new File(edex_camel);
BufferedReader br =
new BufferedReader(new FileReader(srcFile));
BufferedWriter bw =
new BufferedWriter(new FileWriter(destFile));
final String line1 = "EDEX_INSTALL=";
final String line2 = "export DATA_ARCHIVE_ROOT=";
final String line3 =
"CAMELPROCESS=`ps -ef | grep \"edex.dev.mode\"|grep -c \"edex.run.mode=${1} \" `";
String line = "";
while ((line = br.readLine()) != null)
{
if (line.trim().startsWith(line1))
{
line = line1 + edexDirectory;
}
else if (line.trim().startsWith(line2))
{
line = line2 +
this.configuration.getDataArchiveRoot();
}
else if (line.trim().startsWith(line3))
{
line = "CAMELPROCESS=`ps -ef | " +
"grep \"wes2bridge.instance=" +
this.configuration.getTestCaseName() + "\" | " +
"grep -c \"edex.run.mode=${1} \" `";
}
bw.write(line + "\n");
}
br.close();
bw.close();
}
public void reconfigurePostgreSQL()
throws FileNotFoundException, IOException
{
final String postgresqlRootDirectory =
WES2BRIDGE_DIRECTORY + "/" +
this.configuration.getTestCaseName();
this.updateEdexPostgres(postgresqlRootDirectory);
}
private void updateEdexPostgres(String postgresqlRootDirectory)
throws FileNotFoundException, IOException
{
final String srcedex_postgres = AWIPSII_WES2BRIDGE_SCRIPTS + "/" +
"edex_postgres";
final String edex_postgres = this.wes2BridgeScripts +
"/edex_postgres";
File srcFile = new File(srcedex_postgres);
File destFile = new File(edex_postgres);
BufferedReader br =
new BufferedReader(new FileReader(srcFile));
BufferedWriter bw =
new BufferedWriter(new FileWriter(destFile));
final String line1 = "POSTGRESQL_INSTALL_ROOT=";
final String line2 = "PGPORT=";
String line = "";
while ((line = br.readLine()) != null)
{
if (line.startsWith(line1))
{
line = line1 + postgresqlRootDirectory;
}
else if (line.startsWith(line2))
{
line = line2 +
this.configuration.getDatabasePort();
}
bw.write(line + "\n");
}
br.close();
bw.close();
}
public void reconfigureQPID()
throws FileNotFoundException, IOException
{
final String srcQpidDirectory =
AWIPSII + "/" +
"qpid";
final String qpidDirectory =
WES2BRIDGE_DIRECTORY + "/" +
this.configuration.getTestCaseName() + "/" +
"qpid";
this.updateQpidConf(srcQpidDirectory, qpidDirectory);
this.updateQPIDD(qpidDirectory);
this.updateQueueCreatorSH(qpidDirectory);
}
/* Updates qpidd.conf */
private void updateQpidConf(String srcQpidDirectory,
String qpidDirectory)
throws FileNotFoundException, IOException
{
String srcqpidd_conf = srcQpidDirectory +
"/etc/qpidd.conf";
String qpidd_conf = qpidDirectory + "/etc/qpidd.conf";
File srcFile = new File(srcqpidd_conf);
File destFile = new File(qpidd_conf);
BufferedReader br =
new BufferedReader(new FileReader(srcFile));
BufferedWriter bw =
new BufferedWriter(new FileWriter(destFile));
final String line1 = "data-dir=";
final String line2 = "store-dir=";
final String line3 = "pid-dir=";
/*
* add the port to qpidd.conf
*/
final String line4 = "auth=no";
String line = "";
while ((line = br.readLine()) != null)
{
if (line.startsWith(line1))
{
line = line1 + qpidDirectory + "/data";
}
else if (line.startsWith(line2))
{
line = line2 + qpidDirectory + "/messageStore";
}
else if (line.startsWith(line3))
{
line = line3 + qpidDirectory + "/var/lock";
}
else if (line.startsWith(line4))
{
line = line4 + "\nport=" +
this.configuration.getJmsPort();
}
bw.write(line + "\n");
}
br.close();
bw.close();
}
private void updateQPIDD(String qpidDirectory)
throws FileNotFoundException, IOException
{
final String srcqpidd = AWIPSII_WES2BRIDGE_SCRIPTS + "/" +
"qpidd";
final String qpidd = this.wes2BridgeScripts + "/qpidd";
File srcFile = new File(srcqpidd);
File destFile = new File(qpidd);
BufferedReader br =
new BufferedReader(new FileReader(srcFile));
BufferedWriter bw =
new BufferedWriter(new FileWriter(destFile));
final String line1 = "QPID_HOME=";
String line = "";
while ((line = br.readLine()) != null)
{
if (line.startsWith(line1))
{
line = line1 + qpidDirectory;
}
bw.write(line + "\n");
}
br.close();
bw.close();
}
private void updateQueueCreatorSH(String qpidDirectory)
throws FileNotFoundException, IOException
{
final String srcqueue = AWIPSII_WES2BRIDGE_SCRIPTS + "/" +
"queueCreator.sh";
final String queue = qpidDirectory + "/sbin/queueCreator.sh";
File srcFile = new File(srcqueue);
File destFile = new File(queue);
BufferedReader br =
new BufferedReader(new FileReader(srcFile));
BufferedWriter bw =
new BufferedWriter(new FileWriter(destFile));
final String line1 = "port=";
String line = "";
while ((line = br.readLine()) != null)
{
if (line.startsWith(line1))
{
line = line1 + this.configuration.getJmsPort();
}
bw.write(line + "\n");
}
br.close();
bw.close();
}
}

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.wes2bridge.utility.feature</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1 @@
bin.includes = feature.xml

View file

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="com.raytheon.wes2bridge.utility.feature"
label="Wes2Bridge Utility Feature"
version="1.0.0.qualifier"
provider-name="RAYTHEON">
<description url="http://www.example.com/description">
[Enter Feature Description here.]
</description>
<copyright url="http://www.example.com/copyright">
[Enter Copyright Description here.]
</copyright>
<license url="http://www.example.com/license">
[Enter License Description here.]
</license>
<plugin
id="com.raytheon.wes2bridge.common"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.wes2bridge.configuration"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.wes2bridge.datalink"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.wes2bridge.manager"
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.collections"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.apache.commons.configuration"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.apache.commons.digester"
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"/>
</feature>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.wes2bridge.utility.product</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,8 @@
#Thu Apr 05 13:05:10 CDT 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -0,0 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Wes2Bridge Utility Product
Bundle-SymbolicName: com.raytheon.wes2bridge.utility.product
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6

View file

@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="AWIPS II Wes2Bridge Utilities" useFeatures="true" includeLaunchers="true">
<configIni use="default">
</configIni>
<launcherArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
</launcherArgs>
<plugins>
</plugins>
<features>
<feature id="com.raytheon.wes2bridge.utility.feature" version="1.0.0.qualifier"/>
</features>
</product>

View file

@ -110,6 +110,7 @@ fi
mkdir -p %{_build_root}/usr/local/wes2bridge
%build
# build edex
pushd . > /dev/null 2>&1
# Run the pde build.
cd %{_baseline_workspace}/build.edex
@ -120,10 +121,23 @@ if [ $? -ne 0 ]; then
fi
popd > /dev/null 2>&1
# build the wes2bridge utilities
pushd . > /dev/null 2>&1
# Run the pde build.
cd %{_baseline_workspace}/build.wes2bridge.utility
/awips2/ant/bin/ant -f build.xml \
-Declipse.dir=%{_uframe_eclipse}
if [ $? -ne 0 ]; then
echo "ERROR: The pde build of the wes2bridge utilities has failed."
exit 1
fi
popd > /dev/null 2>&1
%install
# Run the deployment to the specified:
# Run the deployment to the specified directory:
# %{_build_root}%{_installation_directory}/edex
# "install" edex
pushd . > /dev/null 2>&1
cd %{_baseline_workspace}/build.edex
ant -f deploy-install.xml \
@ -135,6 +149,32 @@ if [ $? -ne 0 ]; then
fi
popd > /dev/null 2>&1
# "install" the wes2bridge utilities
cd %{_baseline_workspace}/com.raytheon.wes2bridge.configuration
/awips2/ant/bin/ant -f build.xml \
-Ddestination.directory=%{_build_root}%{_installation_directory}/wes2bridge/macro/utilities \
-Declipse.directory=%{_uframe_eclipse} \
-Drpm.build=true
if [ $? -ne 0 ]; then
exit 1
fi
cd %{_baseline_workspace}/com.raytheon.wes2bridge.datalink
/awips2/ant/bin/ant -f build.xml \
-Ddestination.directory=%{_build_root}%{_installation_directory}/wes2bridge/macro/utilities \
-Declipse.directory=%{_uframe_eclipse} \
-Drpm.build=true
if [ $? -ne 0 ]; then
exit 1
fi
cd %{_baseline_workspace}/com.raytheon.wes2bridge.manager
/awips2/ant/bin/ant -f build.xml \
-Ddestination.directory=%{_build_root}%{_installation_directory}/wes2bridge/macro/utilities \
-Declipse.directory=%{_uframe_eclipse} \
-Drpm.build=true
if [ $? -ne 0 ]; then
exit 1
fi
RPM_PROJECT="%{_baseline_workspace}/Installer.rpm"
POSTGRES_INITD="${RPM_PROJECT}/awips2.core/Installer.postgresql/scripts/init.d/edex_postgres"
QPID_INITD="${RPM_PROJECT}/awips2.qpid/SOURCES/qpidd"
@ -166,13 +206,6 @@ fi
# Copy the wes2bridge macro, functions, and utilities.
DELIVERABLES="%{_baseline_workspace}/Installer.rpm/awips2.wes2bridge/wes2bridge.files/deliverables"
# Utilities
cp ${DELIVERABLES}/utility/*.jar \
%{_build_root}%{_installation_directory}/wes2bridge/macro/utilities
if [ $? -ne 0 ]; then
exit 1
fi
# Macro and functions.
cp ${DELIVERABLES}/scripts/wes2bridge \
%{_build_root}%{_installation_directory}/wes2bridge/macro