diff --git a/cave/build/build.properties.p2 b/cave/build/build.properties.p2 index 8405baf7d5..67aa1b4745 100644 --- a/cave/build/build.properties.p2 +++ b/cave/build/build.properties.p2 @@ -14,7 +14,7 @@ skipFetch=true skipMaps=true baseos=linux basews=gtk -basearch=x86 +basearch=x86_64 logExtension=.log javacDebugInfo=false diff --git a/cave/build/build.xml b/cave/build/build.xml index b71ae6c773..3106dfcdc5 100644 --- a/cave/build/build.xml +++ b/cave/build/build.xml @@ -6,7 +6,7 @@ + value="x86_64" /> diff --git a/cave/build/cave/build.properties b/cave/build/cave/build.properties index 2da49f18bd..187a8655dd 100644 --- a/cave/build/cave/build.properties +++ b/cave/build/cave/build.properties @@ -49,9 +49,8 @@ collectingFolder=${archivePrefix} # configs=win32,win32,x86 & linux,motif,x86 # By default the value is *,*,* #configs = *, *, * -configs=linux, gtk, x86 & \ - linux, gtk, x86_64 & \ - win32, win32, x86 +configs=linux,gtk,x86_64 & \ + win32,win32,x86_64 # win32, win32, x86 & \ # linux, gtk, x86_64 & \ # linux, motif, x86 & \ diff --git a/cave/build/cave/customTargets.xml b/cave/build/cave/customTargets.xml index a971bcac3b..4c1097c604 100644 --- a/cave/build/cave/customTargets.xml +++ b/cave/build/cave/customTargets.xml @@ -172,40 +172,30 @@ - - - - - + - - - + + + + + + + + - - - - - - - - - - - - + + - - - - + + + + + + @@ -224,10 +214,11 @@ - + + classpath="${builder}/../lib/ant/ant-contrib-1.0b3.jar" /> + @@ -235,32 +226,6 @@ - - - - - - - - - - - - - - - - - - @@ -451,27 +416,6 @@ append="true" /> - - - - - - - - - - - - diff --git a/cave/com.raytheon.viz.product.awips/awips.product b/cave/com.raytheon.viz.product.awips/awips.product index 46df86e2ac..c08455d3cf 100644 --- a/cave/com.raytheon.viz.product.awips/awips.product +++ b/cave/com.raytheon.viz.product.awips/awips.product @@ -20,7 +20,7 @@ -Dosgi.instance.area.readOnly=true -Dorg.eclipse.update.reconcile=false -Dorg.eclipse.swt.internal.gtk.cairoGraphics=false --XX:MaxPermSize=128m +-XX:MaxPermSize=256m -Dorg.eclipse.ui/KEY_CONFIGURATION_ID=com.raytheon.viz.ui.awips.scheme -Dqpid.dest_syntax=BURL -Dlogback.configurationFile=logback-viz-core.xml @@ -35,7 +35,7 @@ -XX:G1MixedGCLiveThresholdPercent=25 -XX:G1OldCSetRegionThresholdPercent=25 -XX:G1HeapWastePercent=5 - -Xmx2048M -XX:MaxDirectMemorySize=2G + -Xmx2560M -XX:MaxDirectMemorySize=2G -XX:OnOutOfMemoryError="capture -t no -p $pid &" -Dfile.encoding=UTF-8 -Xmx2560M @@ -73,11 +73,11 @@ - + + + - - diff --git a/rpms/awips2.cave/Installer.cave-feature/component.spec b/rpms/awips2.cave/Installer.cave-feature/component.spec index 7acf61fd14..4f22ccedb5 100644 --- a/rpms/awips2.cave/Installer.cave-feature/component.spec +++ b/rpms/awips2.cave/Installer.cave-feature/component.spec @@ -70,26 +70,7 @@ if [ ! -f /awips2/cave/cave ]; then exit 1 fi -CAVE_BACKUP="/awips2/cave.bak" - -# Remove any existing backups. -if [ -d ${CAVE_BACKUP} ]; then - rm -rf ${CAVE_BACKUP} -fi - -# Create a backup of CAVE as it is. -LOG_TIMESTAMP=`date` -echo "backup STARTED: ${LOG_TIMESTAMP}" -cp -r /awips2/cave ${CAVE_BACKUP} -LOG_TIMESTAMP=`date` -echo "backup COMPLETE: ${LOG_TIMESTAMP}" -RC=$? -if [ ${RC} -ne 0 ]; then - exit 1 -fi - %post -CAVE_BACKUP="/awips2/cave.bak" function cleanupUnzip() { if [ -f /awips2/cave/.repository/artifacts.xml ]; then @@ -109,18 +90,6 @@ function cleanupUnzip() fi } -function restoreCAVEAndFail() -{ - rm -rf /awips2/cave - LOG_TIMESTAMP=`date` - echo "restoring backup STARTED: ${LOG_TIMESTAMP}" - mv -f ${CAVE_BACKUP} /awips2/cave - LOG_TIMESTAMP=`date` - echo "restoring backup COMPLETE: ${LOG_TIMESTAMP}" - cleanupUnzip - exit 1 -} - # Set all paths required by CAVE before installing. export LD_LIBRARY_PATH=/awips2/java/lib:/awips2/python/lib:$LD_LIBRARY_PATH export LD_PRELOAD=libpython.so @@ -171,16 +140,15 @@ unzip %{_component_zip_file_name} > /dev/null 2>&1 RC=$? if [ ${RC} -ne 0 ]; then echo "ERROR: Unzip of repository FAILED." - restoreCAVEAndFail + exit 1 fi # Install the component. LOG_TIMESTAMP=`date` echo "installation STARTED: ${LOG_TIMESTAMP}" ${INSTALL_CMD} -RC=$? -if [ ${RC} -ne 0 ]; then - restoreCAVEAndFail +if [ $? -ne 0 ]; then + exit 1 fi LOG_TIMESTAMP=`date` echo "installation COMPLETE: ${LOG_TIMESTAMP}" @@ -188,9 +156,6 @@ echo "installation COMPLETE: ${LOG_TIMESTAMP}" # Cleanup the unzip cleanupUnzip -# Remove the backup. -rm -rf /awips2/cave.bak - # move localization files in unpacked plugins to the # cave etc directory. if [ ! -d /awips2/cave/etc ]; then diff --git a/rpms/awips2.cave/Installer.cave-wrapper/component.spec b/rpms/awips2.cave/Installer.cave-wrapper/component.spec new file mode 100644 index 0000000000..cdb07a2b0a --- /dev/null +++ b/rpms/awips2.cave/Installer.cave-wrapper/component.spec @@ -0,0 +1,175 @@ +# RPM Metadata +%define _component_name awips2-cave-wrapper +%define _component_project_dir awips2.cave/Installer.cave-wrapper +%define _component_zip_file_name CAVE-linux.gtk.%{_build_arch}.zip +# +# awips2-cave-wrapper Spec File +# +%define __prelink_undo_cmd %{nil} +# Disable the brp-python-bytecompile script +%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') +# Disable the rpm jar repack script +%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g') + +Name: %{_component_name} +Summary: awips2-cave-wrapper Installation +Version: %{_component_version} +Release: %{_component_release} +Group: AWIPSII +BuildRoot: /tmp +URL: N/A +License: N/A +Distribution: N/A +Vendor: Raytheon + +AutoReq: no +Provides: %{_component_name} +Requires: awips2-cave + +BuildRequires: awips2-java + +%description +Provides scripts and other Viz configuration that make starting CAVE easier. + +%prep +# Verify That The User Has Specified A BuildRoot. +if [ "${RPM_BUILD_ROOT}" = "/tmp" ] +then + echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter." + echo "Unable To Continue ... Terminating" + exit 1 +fi +if [ -d ${RPM_BUILD_ROOT} ]; then + rm -rf ${RPM_BUILD_ROOT} +fi +CAVE_DIST_DIR="%{_baseline_workspace}/rpms/awips2.cave/setup/dist" + +if [ ! -f ${CAVE_DIST_DIR}/%{_component_zip_file_name} ]; then + echo "ERROR: Unable to find - ${CAVE_DIST_DIR}/%{_component_zip_file_name}." + exit 1 +fi + +%build +pushd . > /dev/null 2>&1 +cd %{_baseline_workspace}/rpms/awips2.cave/Installer.cave-wrapper/scripts/memory/iniFileGenerator/src +/awips2/java/bin/javac main/* +if [ $? -ne 0 ]; then + exit 1 +fi +popd > /dev/null 2>&1 + +%install +mkdir -p ${RPM_BUILD_ROOT}/awips2/cave +if [ $? -ne 0 ]; then + exit 1 +fi +mkdir -p ${RPM_BUILD_ROOT}/etc/xdg/autostart +if [ $? -ne 0 ]; then + exit 1 +fi +mkdir -p ${RPM_BUILD_ROOT}/etc/profile.d +if [ $? -ne 0 ]; then + exit 1 +fi + +# The profile.d scripts +PROFILE_D_DIR="%{_baseline_workspace}/rpms/common/environment/awips2-cave/profile.d" +cp ${PROFILE_D_DIR}/* ${RPM_BUILD_ROOT}/etc/profile.d +if [ $? -ne 0 ]; then + exit 1 +fi + +# The AWIPS II version script. +VERSIONS_SCRIPT="%{_baseline_workspace}/rpms/utility/scripts/versions.sh" +cp ${VERSIONS_SCRIPT} ${RPM_BUILD_ROOT}/awips2/cave +if [ $? -ne 0 ]; then + exit 1 +fi + +# testWS script +TEXTWS_SCRIPT="%{_baseline_workspace}/rpms/utility/scripts/textWS.sh" +cp ${TEXTWS_SCRIPT} ${RPM_BUILD_ROOT}/awips2/cave +if [ $? -ne 0 ]; then + exit 1 +fi + +# text-workstation autostart script. +CAVE_SCRIPTS_DIR="%{_baseline_workspace}/rpms/%{_component_project_dir}/scripts" +TEXTWS_AUTO_SCRIPT="${CAVE_SCRIPTS_DIR}/autostart/awips2-textws.desktop" +cp ${TEXTWS_AUTO_SCRIPT} ${RPM_BUILD_ROOT}/etc/xdg/autostart +if [ $? -ne 0 ]; then + exit 1 +fi + +# CAVE scripts and other required distributables. +_build_cave_static="%{_baseline_workspace}/build/static" +# we want the common directory, the common linux directory, and the architecture-specific Linux directory. +_common_dir="${_build_cave_static}/common/cave" +_linux_dir="${_build_cave_static}/linux/cave" +_linux_arch_dir="${_build_cave_static}/linux.x86_64/cave" + +cp -rv ${_common_dir}/* ${RPM_BUILD_ROOT}/awips2/cave +if [ $? -ne 0 ]; then + exit 1 +fi +cp -rv ${_linux_dir}/* ${RPM_BUILD_ROOT}/awips2/cave +if [ $? -ne 0 ]; then + exit 1 +fi +cp -rv ${_linux_arch_dir}/* ${RPM_BUILD_ROOT}/awips2/cave +if [ $? -ne 0 ]; then + exit 1 +fi + +CAVE_DIST_DIR="%{_baseline_workspace}/rpms/awips2.cave/setup/dist" +_cave_zip=${CAVE_DIST_DIR}/%{_component_zip_file_name} +_mem_settings_xml=%{_baseline_workspace}/rpms/awips2.cave/Installer.cave-wrapper/scripts/memory/memorySettings.xml +_ini_destination=${RPM_BUILD_ROOT}/awips2/cave + +pushd . > /dev/null 2>&1 +cd %{_baseline_workspace}/rpms/awips2.cave/Installer.cave-wrapper/scripts/memory/iniFileGenerator/src +/awips2/java/bin/java main/IniFileGenerator "${_cave_zip}" "${_mem_settings_xml}" "${_ini_destination}" +if [ $? -ne 0 ]; then + exit 1 +fi +rm -fv main/*.class +if [ $? -ne 0 ]; then + exit 1 +fi +popd > /dev/null 2>&1 + +%pre +%post +# Remove the text-workstation autostart script if we have not been installed +# on an xt workstation +if [ ! "`hostname | cut -b 1-2`" = "xt" ]; then + rm -f /etc/xdg/autostart/awips2-textws.desktop +fi + +%preun +%postun + +%clean +rm -rf ${RPM_BUILD_ROOT} + +%files +%defattr(644,root,root,-) +/etc/profile.d/awips2Cave.csh +/etc/profile.d/awips2Cave.sh + +%defattr(644,awips,fxalpha,755) +%dir /awips2 +%dir /awips2/cave +/awips2/cave/*.ini +%dir /awips2/cave/etc +/awips2/cave/etc/* + +%defattr(755,awips,fxalpha,755) +%dir /awips2/cave/caveEnvironment +/awips2/cave/caveEnvironment/* +/awips2/cave/*.sh +# not a noarch RPM due to the presence of the architecture-specific libraries. +%dir /awips2/cave/lib%{_build_bits} +/awips2/cave/lib%{_build_bits}/* + +%attr(644,root,root) /etc/xdg/autostart/awips2-textws.desktop diff --git a/rpms/awips2.cave/Installer.cave/scripts/autostart/awips2-textws.desktop b/rpms/awips2.cave/Installer.cave-wrapper/scripts/autostart/awips2-textws.desktop similarity index 100% rename from rpms/awips2.cave/Installer.cave/scripts/autostart/awips2-textws.desktop rename to rpms/awips2.cave/Installer.cave-wrapper/scripts/autostart/awips2-textws.desktop diff --git a/rpms/awips2.cave/Installer.cave-wrapper/scripts/memory/iniFileGenerator/.classpath b/rpms/awips2.cave/Installer.cave-wrapper/scripts/memory/iniFileGenerator/.classpath new file mode 100644 index 0000000000..fb565a588d --- /dev/null +++ b/rpms/awips2.cave/Installer.cave-wrapper/scripts/memory/iniFileGenerator/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/rpms/awips2.cave/Installer.cave-wrapper/scripts/memory/iniFileGenerator/.project b/rpms/awips2.cave/Installer.cave-wrapper/scripts/memory/iniFileGenerator/.project new file mode 100644 index 0000000000..2c426265ad --- /dev/null +++ b/rpms/awips2.cave/Installer.cave-wrapper/scripts/memory/iniFileGenerator/.project @@ -0,0 +1,17 @@ + + + iniFileGenerator + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/rpms/awips2.cave/Installer.cave-wrapper/scripts/memory/iniFileGenerator/src/main/IniFileGenerator.java b/rpms/awips2.cave/Installer.cave-wrapper/scripts/memory/iniFileGenerator/src/main/IniFileGenerator.java new file mode 100644 index 0000000000..88a9564037 --- /dev/null +++ b/rpms/awips2.cave/Installer.cave-wrapper/scripts/memory/iniFileGenerator/src/main/IniFileGenerator.java @@ -0,0 +1,517 @@ +/** + * This software was developed and / or modified by Raytheon Company, + * pursuant to Contract DG133W-05-CQ-1067 with the US Government. + * + * U.S. EXPORT CONTROLLED TECHNICAL DATA + * This software product contains export-restricted data whose + * export/transfer/disclosure is restricted by U.S. law. Dissemination + * to non-U.S. persons whether in the United States or abroad requires + * an export license or other authorization. + * + * Contractor Name: Raytheon Company + * Contractor Address: 6825 Pine Street, Suite 340 + * Mail Stop B8 + * Omaha, NE 68106 + * 402.291.0100 + * + * See the AWIPS II Master Rights File ("Master Rights File.pdf") for + * further licensing information. + **/ +package main; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.Charset; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; +import java.util.zip.ZipEntry; +import java.util.zip.ZipFile; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * Generates component-specific and wfo-specific ini files for CAVE based on the + * ini file generated by the Eclipse PDE build and the contents of + * memorySettings.xml. Compiled and used by the awips2-cave-wrapper RPM build. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Sep 22, 2015 4826       bkowal      Initial creation
+ * 
+ * 
+ * + * @author bkowal + * @version 1.0 + */ + +public class IniFileGenerator { + + private final JAXBContext jaxbContext; + + private static final String INI_EXT = ".ini"; + + private final String CAVE_INI_ENTRY = "cave/cave" + INI_EXT; + + private final Path zipPath; + + private final Path memorySettingsPath; + + private final Path iniPath; + + protected IniFileGenerator(final String zipPath, + final String memorySettings, final String iniDestination) + throws Exception { + this.zipPath = Paths.get(zipPath); + this.memorySettingsPath = Paths.get(memorySettings); + this.iniPath = Paths.get(iniDestination); + + this.jaxbContext = JAXBContext.newInstance(CAVEMemorySettings.class); + } + + protected void generate() throws Exception { + CAVEMemorySettings caveMemorySettings = null; + try (InputStream is = Files.newInputStream(memorySettingsPath)) { + caveMemorySettings = (CAVEMemorySettings) this.jaxbContext + .createUnmarshaller().unmarshal(is); + } + + String iniContents = null; + try (ZipFile zipFile = new ZipFile(zipPath.toFile(), ZipFile.OPEN_READ);) { + ZipEntry caveIniEntry = zipFile.getEntry(CAVE_INI_ENTRY); + try (InputStream is = zipFile.getInputStream(caveIniEntry); + InputStreamReader isr = new InputStreamReader(is); + BufferedReader br = new BufferedReader(isr);) { + String line; + while ((line = br.readLine()) != null) { + if (iniContents == null) { + iniContents = line; + } else { + iniContents += "\n" + line; + } + } + } + } + + final String defaultMaxMemory = caveMemorySettings + .getDefaultMemorySetting().getDefaultMaxMemory().getJvmArg() + + caveMemorySettings.getDefaultMemorySetting() + .getDefaultMaxMemory().getValue(); + final String defaultMaxPerm = caveMemorySettings + .getDefaultMemorySetting().getDefaultMaxPerm().getJvmArg() + + caveMemorySettings.getDefaultMemorySetting() + .getDefaultMaxPerm().getValue(); + + try (BufferedWriter bw = Files.newBufferedWriter( + this.iniPath.resolve("iniLookup.sh"), Charset.defaultCharset())) { + this.startIniLookup(bw); + for (MemorySetting memorySetting : caveMemorySettings + .getMemorySettings()) { + + String maxMemory = caveMemorySettings.getDefaultMemorySetting() + .getDefaultMaxMemory().getJvmArg() + + memorySetting.getIniSubsitution().getMaxMemory() + .getValue(); + if ("DEFAULT".equals(memorySetting.getIniSubsitution() + .getMaxMemory().getValue())) { + maxMemory = defaultMaxMemory; + } + String maxPerm = caveMemorySettings.getDefaultMemorySetting() + .getDefaultMaxPerm().getJvmArg() + + memorySetting.getIniSubsitution().getMaxPerm() + .getValue(); + if ("DEFAULT".equals(memorySetting.getIniSubsitution() + .getMaxPerm().getValue())) { + maxPerm = defaultMaxPerm; + } + + this.writeIniLookupEntry(bw, memorySetting.getCommandLineArgs() + .getFirstArg(), memorySetting.getCommandLineArgs() + .getSecondArg()); + + final Path iniPath = this.iniPath.resolve(memorySetting + .getCommandLineArgs().getSecondArg() + INI_EXT); + try (BufferedWriter iniBw = Files.newBufferedWriter(iniPath, + Charset.defaultCharset())) { + iniBw.write(iniContents + .replace(defaultMaxMemory, maxMemory).replace( + defaultMaxPerm, maxPerm)); + } + } + this.finishIniLookup(bw); + } + + for (SiteTypeOverride siteTypeOverride : caveMemorySettings + .getSiteTypeOverrides()) { + + String maxMemory = caveMemorySettings.getDefaultMemorySetting() + .getDefaultMaxMemory().getJvmArg() + + siteTypeOverride.getIniSubsitution().getMaxMemory() + .getValue(); + if ("DEFAULT".equals(siteTypeOverride.getIniSubsitution() + .getMaxMemory().getValue())) { + maxMemory = defaultMaxMemory; + } + String maxPerm = caveMemorySettings.getDefaultMemorySetting() + .getDefaultMaxPerm().getJvmArg() + + siteTypeOverride.getIniSubsitution().getMaxPerm() + .getValue(); + if ("DEFAULT".equals(siteTypeOverride.getIniSubsitution() + .getMaxPerm().getValue())) { + maxPerm = defaultMaxPerm; + } + + final Path iniPath = this.iniPath.resolve(siteTypeOverride + .getSiteType() + INI_EXT); + try (BufferedWriter iniBw = Files.newBufferedWriter(iniPath, + Charset.defaultCharset())) { + iniBw.write(iniContents.replace(defaultMaxMemory, maxMemory) + .replace(defaultMaxPerm, maxPerm)); + } + } + } + + private void startIniLookup(BufferedWriter bw) throws Exception { + this.writeIniLookupLine(bw, "#!/bin/bash"); + this.writeIniLookupLine(bw, ""); + this.writeIniLookupLine(bw, + "# This auto-generated script will be sourced by caveUtil.sh."); + this.writeIniLookupLine(bw, "export ASSOCIATED_INI="); + this.writeIniLookupLine(bw, ""); + this.writeIniLookupLine(bw, "function retrieveAssociatedINI()"); + this.writeIniLookupLine(bw, "{"); + this.writeIniLookupLine(bw, "# Arguments", 1); + this.writeIniLookupLine(bw, "# Arguments", 1); + this.writeIniLookupLine(bw, + "# ${1} == one in the set: {-component, -perspective}", 1); + this.writeIniLookupLine( + bw, + "# ${2} == the argument that corresponds to the first argument", + 1); + this.writeIniLookupLine(bw, ""); + this.writeIniLookupLine(bw, "# AUTOGENERATED IF STATEMENTS.", 1); + } + + private void writeIniLookupEntry(BufferedWriter bw, final String arg1, + final String arg2) throws Exception { + StringBuilder sb = new StringBuilder("if [ \"${1}\" = \""); + sb.append(arg1); + sb.append("\" ] && [ \"${2}\" = \""); + sb.append(arg2); + sb.append("\" ]; then"); + this.writeIniLookupLine(bw, sb.toString(), 1); + + sb = new StringBuilder("export ASSOCIATED_INI=\""); + sb.append(arg2).append(INI_EXT).append("\""); + this.writeIniLookupLine(bw, sb.toString(), 2); + this.writeIniLookupLine(bw, "return 0", 2); + this.writeIniLookupLine(bw, "fi", 1); + this.writeIniLookupLine(bw, ""); + } + + private void finishIniLookup(BufferedWriter bw) throws Exception { + this.writeIniLookupLine(bw, "return 1", 1); + this.writeIniLookupLine(bw, "}"); + } + + private void writeIniLookupLine(BufferedWriter bw, final String text) + throws Exception { + this.writeIniLookupLine(bw, text, 0); + } + + private void writeIniLookupLine(BufferedWriter bw, final String text, + final int leadingTabs) throws Exception { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < leadingTabs; i++) { + sb.append(" "); + } + sb.append(text); + sb.append("\n"); + + bw.write(sb.toString()); + } + + public static void main(String[] args) { + if (args.length != 3) { + System.out.println("Error: Invalid Arguments Specified."); + System.exit(1); + } + + try { + new IniFileGenerator(args[0], args[1], args[2]).generate(); + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + + System.exit(0); + } + + /* + * Memory Settings JAXB POJO. + */ + @SuppressWarnings("unused") + @XmlRootElement(name = "cave-memory-settings") + @XmlAccessorType(XmlAccessType.NONE) + private static class CAVEMemorySettings { + + @XmlElement(name = "file-version") + private String fileVersion; + + @XmlElement(name = "default-memory-setting") + private DefaultMemorySetting defaultMemorySetting; + + @XmlElement(name = "memory-setting") + private List memorySettings; + + @XmlElement(name = "site-type-override") + private List siteTypeOverrides; + + private CAVEMemorySettings() { + } + + public String getFileVersion() { + return fileVersion; + } + + public void setFileVersion(String fileVersion) { + this.fileVersion = fileVersion; + } + + public DefaultMemorySetting getDefaultMemorySetting() { + return defaultMemorySetting; + } + + public void setDefaultMemorySetting( + DefaultMemorySetting defaultMemorySetting) { + this.defaultMemorySetting = defaultMemorySetting; + } + + public List getMemorySettings() { + return memorySettings; + } + + public void setMemorySettings(List memorySettings) { + this.memorySettings = memorySettings; + } + + public List getSiteTypeOverrides() { + return siteTypeOverrides; + } + + public void setSiteTypeOverrides( + List siteTypeOverrides) { + this.siteTypeOverrides = siteTypeOverrides; + } + } + + @SuppressWarnings("unused") + @XmlAccessorType(XmlAccessType.NONE) + private static class DefaultMemorySetting { + + @XmlElement(name = "default-max-memory") + private DefaultJvmArgValuePair defaultMaxMemory; + + @XmlElement(name = "default-max-perm") + private DefaultJvmArgValuePair defaultMaxPerm; + + private DefaultMemorySetting() { + } + + public DefaultJvmArgValuePair getDefaultMaxMemory() { + return defaultMaxMemory; + } + + public void setDefaultMaxMemory(DefaultJvmArgValuePair defaultMaxMemory) { + this.defaultMaxMemory = defaultMaxMemory; + } + + public DefaultJvmArgValuePair getDefaultMaxPerm() { + return defaultMaxPerm; + } + + public void setDefaultMaxPerm(DefaultJvmArgValuePair defaultMaxPerm) { + this.defaultMaxPerm = defaultMaxPerm; + } + } + + @SuppressWarnings("unused") + @XmlAccessorType(XmlAccessType.NONE) + private static class DefaultJvmArgValuePair { + + @XmlElement(name = "jvm-arg") + private String jvmArg; + + @XmlElement + private String value; + + private DefaultJvmArgValuePair() { + } + + public String getJvmArg() { + return jvmArg; + } + + public void setJvmArg(String jvmArg) { + this.jvmArg = jvmArg; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + } + + @SuppressWarnings("unused") + @XmlAccessorType(XmlAccessType.NONE) + private static class MemorySetting { + + @XmlElement(name = "command-line-args") + private CommandLineArgs commandLineArgs; + + @XmlElement(name = "ini-substitutions") + private IniSubsitution iniSubsitution; + + private MemorySetting() { + } + + public CommandLineArgs getCommandLineArgs() { + return commandLineArgs; + } + + public void setCommandLineArgs(CommandLineArgs commandLineArgs) { + this.commandLineArgs = commandLineArgs; + } + + public IniSubsitution getIniSubsitution() { + return iniSubsitution; + } + + public void setIniSubsitution(IniSubsitution iniSubsitution) { + this.iniSubsitution = iniSubsitution; + } + } + + @SuppressWarnings("unused") + @XmlAccessorType(XmlAccessType.NONE) + private static class SiteTypeOverride { + + @XmlElement(name = "site-type") + private String siteType; + + @XmlElement(name = "ini-substitutions") + private IniSubsitution iniSubsitution; + + private SiteTypeOverride() { + } + + public String getSiteType() { + return siteType; + } + + public void setSiteType(String siteType) { + this.siteType = siteType; + } + + public IniSubsitution getIniSubsitution() { + return iniSubsitution; + } + + public void setIniSubsitution(IniSubsitution iniSubsitution) { + this.iniSubsitution = iniSubsitution; + } + } + + @SuppressWarnings("unused") + @XmlAccessorType(XmlAccessType.NONE) + private static class CommandLineArgs { + + @XmlElement(name = "first-arg") + private String firstArg; + + @XmlElement(name = "second-arg") + private String secondArg; + + private CommandLineArgs() { + } + + public String getFirstArg() { + return firstArg; + } + + public void setFirstArg(String firstArg) { + this.firstArg = firstArg; + } + + public String getSecondArg() { + return secondArg; + } + + public void setSecondArg(String secondArg) { + this.secondArg = secondArg; + } + } + + @SuppressWarnings("unused") + @XmlAccessorType(XmlAccessType.NONE) + private static class IniSubsitution { + + @XmlElement(name = "max-memory") + private SubstitutionValue maxMemory; + + @XmlElement(name = "max-perm") + private SubstitutionValue maxPerm; + + private IniSubsitution() { + } + + public SubstitutionValue getMaxMemory() { + return maxMemory; + } + + public void setMaxMemory(SubstitutionValue maxMemory) { + this.maxMemory = maxMemory; + } + + public SubstitutionValue getMaxPerm() { + return maxPerm; + } + + public void setMaxPerm(SubstitutionValue maxPerm) { + this.maxPerm = maxPerm; + } + } + + @SuppressWarnings("unused") + @XmlAccessorType(XmlAccessType.NONE) + private static class SubstitutionValue { + + @XmlElement + private String value; + + private SubstitutionValue() { + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + } +} \ No newline at end of file diff --git a/cave/build/cave/memorySettings.xml b/rpms/awips2.cave/Installer.cave-wrapper/scripts/memory/memorySettings.xml similarity index 78% rename from cave/build/cave/memorySettings.xml rename to rpms/awips2.cave/Installer.cave-wrapper/scripts/memory/memorySettings.xml index 76cb531301..3e18647591 100644 --- a/cave/build/cave/memorySettings.xml +++ b/rpms/awips2.cave/Installer.cave-wrapper/scripts/memory/memorySettings.xml @@ -2,7 +2,7 @@ - 4.0 + 5.0