diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2008-11-26 18:23:31 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2008-11-26 18:23:31 +0000 |
| commit | cc1c75562925be828b024f2da14ac6152c6c5f51 (patch) | |
| tree | 6a03cd0b6d8d173310ec44b8ea24e96d53f114e2 /java/management/eclipse-plugin | |
| parent | 43e26ecb7cdb04cf7a9c7e87fa7902b7ebe3f5ce (diff) | |
| download | qpid-python-cc1c75562925be828b024f2da14ac6152c6c5f51.tar.gz | |
QPID-1243 : Applied patch from Robert Gemmell. Took a different approach for the linux binaries as the provided binaries requried a newer libc than I have. Also restored the qpidversion.properties file generation for this module that
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@720931 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/management/eclipse-plugin')
11 files changed, 309 insertions, 33 deletions
diff --git a/java/management/eclipse-plugin/bin/qpidmc.sh b/java/management/eclipse-plugin/bin/qpidmc.sh index 2472545a14..599d9bf7e0 100755 --- a/java/management/eclipse-plugin/bin/qpidmc.sh +++ b/java/management/eclipse-plugin/bin/qpidmc.sh @@ -18,14 +18,13 @@ # under the License. # -if [ "$JAVA_HOME" == "" ]; then - echo "The JAVA_HOME environment variable is not defined"; - exit 0; +if [ -z "$JAVA" ]; then + JAVA=java fi -if [ "$QPIDMC_HOME" == "" ]; then - echo "The QPIDMC_HOME environment variable is not defined correctly"; - exit 0; +if [ -z "$QPIDMC_HOME" ]; then + export QPIDMC_HOME=$(dirname $(dirname $(readlink -f $0))) + export PATH=${PATH}:${QPIDMC_HOME}/bin fi # Test if we're running on cygwin. @@ -38,27 +37,39 @@ if $cygwin; then QPIDMC_HOME=$(cygpath -w $QPIDMC_HOME) fi -os=win32 -ws=win32 -arch=x86 - -##echo $os -##echo $ws -##echo $arch ## If this is to be run on different platform other than windows then following parameters should be passed -## qpidmc.sh <operating system> <windowing system> <platform achitecture> -## eg. qpidmc.sh linux motif x86 -if [ $# -eq 3 ]; then - os=$1 - ws=$2 - arch=$3 +## qpidmc.sh <windowing system> +## eg. qpidmc.sh motif + +if [ $# -eq 1 ] ; then + QPIDMC_WS=$1 +else + # If the WS is not set via QPIDMC_WS then query uname for the WS + if [ -z "$QPIDMC_WS" ] ; then + echo "Usage qpidmc.sh <windowing system> + echo "Alternatively set QPIDMC_WS to the windowing system you wish to use + exit 1 + fi +fi + +# If the OS is not set via QPIDMC_OS then query uname for the OS +if [ -z "$QPIDMC_OS" ] ; then + QPIDMC_OS=`uname | tr A-Z a-z` +else + # Force OS to be lower case + QPIDMC_OS=`echo $QPIDMC_OS | tr A-Z a-z` fi -if [ $os = "SunOS" ]; then - os="solaris" -elif [ $os = "Linux" ]; then - os="linux" +# If the ARCH is not set via QPIDMC_ARCH then query uname for the arch, +if [ -z "$QPIDMC_ARCH" ] ; then + QPIDMC_ARCH=`uname -i` fi -"$JAVA_HOME/bin/java" -Xms40m -Xmx256m -Declipse.consoleLog=false -jar $QPIDMC_HOME/eclipse/startup.jar org.eclipse.core.launcher.Main -launcher $QPIDMC_HOME/eclipse/eclipse -name "Qpid Management Console" -showsplash 600 -configuration "file:$QPIDMC_HOME/configuration" -os $os -ws $ws -arch $arch +# Note that it sometimes returns i386 which needs to be changed to x86 +if [ "$QPIDMC_ARCH" == "i386" ] ; then + QPIDMC_ARCH="x86" +fi + + +"$JAVA" -Xms40m -Xmx256m -Declipse.consoleLog=true -jar $QPIDMC_HOME/eclipse/startup.jar org.eclipse.core.launcher.Main -name "Qpid Management Console" -showsplash 600 -configuration "file:$QPIDMC_HOME/configuration" -os $QPIDMC_OS -ws $QPIDMC_WS -arch $QPIDMC_ARCH diff --git a/java/management/eclipse-plugin/bin/qpidmc_gtk.sh b/java/management/eclipse-plugin/bin/qpidmc_gtk.sh index 10b463d63b..1d55743d84 100755 --- a/java/management/eclipse-plugin/bin/qpidmc_gtk.sh +++ b/java/management/eclipse-plugin/bin/qpidmc_gtk.sh @@ -18,7 +18,9 @@ # under the License. # -os=`uname | tr A-Z a-z` -arch=`uname -p` +if [ -z "$QPIDMC_HOME" ]; then + export QPIDMC_HOME=$(dirname $(dirname $(readlink -f $0))) + export PATH=${PATH}:${QPIDMC_HOME}/bin +fi -$QPIDMC_HOME/bin/qpidmc.sh $os gtk $arch +$QPIDMC_HOME/bin/qpidmc.sh gtk diff --git a/java/management/eclipse-plugin/bin/qpidmc_motif.sh b/java/management/eclipse-plugin/bin/qpidmc_motif.sh index f53be75d87..f49759cc91 100755 --- a/java/management/eclipse-plugin/bin/qpidmc_motif.sh +++ b/java/management/eclipse-plugin/bin/qpidmc_motif.sh @@ -18,7 +18,4 @@ # under the License. # -os=`uname | tr A-Z a-z` -arch=`uname -p` - -$QPIDMC_HOME/bin/qpidmc.sh $os motif $arch +$QPIDMC_HOME/bin/qpidmc.sh motif diff --git a/java/management/eclipse-plugin/build-release-common.properties b/java/management/eclipse-plugin/build-release-common.properties new file mode 100644 index 0000000000..244448e322 --- /dev/null +++ b/java/management/eclipse-plugin/build-release-common.properties @@ -0,0 +1,17 @@ +artifactId=org.apache.qpid.management.ui +mcplugin.version=0.1.0-${project.version} +mcplugin.filename=${artifactId}_${mcplugin.version} + +mcplugin.contents.dir=${module.classes} + +mcplugin.manifest=${module.manifest} + +bin.dir=bin + +startup.jar=src/main/resources/startup.jar + +eclipse.ini=src/main/resources/eclipse.ini + +license.eclipse.txt=src/main/resources/license.eclipse.txt + +jmxremote.sasl.manifest=src/main/resources/sasl/MANIFEST.MF diff --git a/java/management/eclipse-plugin/build-release-linux-gtk-x86.properties b/java/management/eclipse-plugin/build-release-linux-gtk-x86.properties new file mode 100644 index 0000000000..5eeb771bb2 --- /dev/null +++ b/java/management/eclipse-plugin/build-release-linux-gtk-x86.properties @@ -0,0 +1,13 @@ +release.name=${module.namever}-linux-gtk-x86 + +release.subdir=${module.release.base}/${release.name} + +release.tar.gz=${module.release.base}/${release.name}.tar.gz + +eclipse.ini=src/main/resources/unix/eclipse.ini + +rcp.libs=${management-eclipse-plugin-linux-gtk-x86.libs} + +rcp.configuration.dir=src/main/resources/unix/configuration + +bin.includes=qpidmc.sh qpidmc_gtk.sh diff --git a/java/management/eclipse-plugin/build-release-win32-win32-x86.properties b/java/management/eclipse-plugin/build-release-win32-win32-x86.properties new file mode 100644 index 0000000000..a41bd5a54a --- /dev/null +++ b/java/management/eclipse-plugin/build-release-win32-win32-x86.properties @@ -0,0 +1,13 @@ +release.name=${module.namever}-win32-win32-x86 + +release.subdir=${module.release.base}/${release.name} + +release.zip=${module.release.base}/${release.name}.zip + +eclipse.executable=src/main/resources/eclipse.exe + +rcp.libs=${management-eclipse-plugin-win32-win32-x86.libs} + +rcp.configuration.dir=src/main/resources/win32/configuration + +bin.includes=qpidmc.bat
\ No newline at end of file diff --git a/java/management/eclipse-plugin/build-release.xml b/java/management/eclipse-plugin/build-release.xml new file mode 100644 index 0000000000..b116fcb55c --- /dev/null +++ b/java/management/eclipse-plugin/build-release.xml @@ -0,0 +1,152 @@ +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<project name="Eclipse Plugin Binary Release" default="release-bin"> + + <!-- check properties that must be set by caller --> + <target name="check" description="ensure all required properties are set"> + <condition property="properties.set"> + <and> + <!-- common properties --> + <isset property ="mcplugin.contents.dir"/> + <isset property ="mcplugin.manifest"/> + <isset property ="mcplugin.filename"/> + <isset property ="bin.dir"/> + <isset property ="startup.jar"/> + <isset property ="eclipse.ini"/> + <isset property ="license.eclipse.txt"/> + <isset property ="jmxremote.sasl.manifest"/> + <!-- platform specific properties --> + <isset property ="bin.includes"/> + <isset property ="release.name"/> + <isset property ="release.subdir"/> + <isset property ="rcp.libs"/> + <isset property ="rcp.configuration.dir"/> + <or> + <isset property ="release.zip"/> + <isset property ="release.tar.gz"/> + </or> + </and> + <!-- Optional Properties --> + <!-- eclipse.executable.companion.library --> + </condition> + + <fail unless="properties.set" message="required properties not set"/> + </target> + + <target name="release-bin-prepare"> + <mkdir dir="${release.subdir}"/> + </target> + + <target name="release-bin-mcplugin-jar"> + <jar destfile="${release.subdir}/eclipse/plugins/${mcplugin.filename}.jar" basedir="${mcplugin.contents.dir}" manifest="${mcplugin.manifest}"/> + </target> + + <target name="release-bin-jmxremote-plugin"> + <!-- Copy the jmxremote.sasl plugin's manifest, creating its plugin directory --> + <copy todir="${release.subdir}/eclipse/plugins/jmxremote.sasl_1.0.1/META-INF" flatten="true" failonerror="true"> + <fileset file="${jmxremote.sasl.manifest}"/> + </copy> + </target> + + <target name="copy-executable" description="Copy eclipse-rcp execuitable" if="eclipse.executable"> + + <!-- Copy the eclipse rcp executable files --> + <copy todir="${release.subdir}/eclipse" flatten="true" failonerror="true"> + <fileset file="${eclipse.executable}"/> + </copy> + <chmod dir="${release.subdir}/eclipse" perm="u+rx" includes="**/*"/> + + + </target> + + <target name="release-bin-rcp-deps" description="copy eclipse-rcp dependencies into module release" + depends="copy-executable"> + + <!-- Copy remaining startup & license files --> + <copy todir="${release.subdir}/eclipse" flatten="true" failonerror="true"> + <fileset file="${startup.jar}"/> + <fileset file="${eclipse.ini}"/> + <fileset file="${license.eclipse.txt}"/> + </copy> + + <echo message="${ecl-swt-linux-gtk-x86}"/> + <echo message="${management-eclipse-plugin-linux-gtk-x86.libs}"/> + <echo message="${rcp.libs}"/> + <!-- Copy the eclipse rcp module libs --> + <copy todir="${release.subdir}/eclipse/plugins" failonerror="true"> + + <fileset dir="${project.root}" includes="${rcp.libs}"/> + <globmapper from="lib/*" to="*"/> + </copy> + + <!-- Copy the relevant bin dir files--> + <copy todir="${release.subdir}/bin" failonerror="true"> + <fileset dir="${bin.dir}" includes="${bin.includes}"/> + </copy> + <chmod dir="${release.subdir}/bin" perm="u+rx" includes="**/*"/> + + <!-- Copy the relevant configuration dir --> + <copy todir="${release.subdir}/configuration" failonerror="true"> + <fileset dir="${rcp.configuration.dir}"/> + </copy> + <chmod dir="${release.subdir}/configuration" perm="ugo+r" includes="**/*"/> + </target> + + <target name="release-bin-zip" if="release.zip" description="build mc zip archive"> + <zip destfile="${release.zip}"> + <zipfileset dir="${release.subdir}" prefix="${release.name}" filemode="755"> + <include name="bin/*"/> + </zipfileset> + + <zipfileset dir="${release.subdir}" prefix="${release.name}" filemode="755"> + <include name="eclipse/eclipse*"/> + </zipfileset> + + <zipfileset dir="${release.subdir}" prefix="${release.name}" filemode="644" dirmode="755"> + <exclude name="bin/**"/> + <exclude name="eclipse/eclipse*"/> + </zipfileset> + </zip> + </target> + + <target name="release-bin-gzip" if="release.tar.gz" description="build mc tar.gz archive"> + <tar destfile="${release.tar.gz}" longfile="gnu"> + <tarfileset dir="${release.subdir}" prefix="${release.name}" filemode="755"> + <include name="bin/*"/> + </tarfileset> + + <tarfileset dir="${release.subdir}" prefix="${release.name}" filemode="755"> + <include name="eclipse/eclipse*"/> + </tarfileset> + + <tarfileset dir="${release.subdir}" prefix="${release.name}" filemode="644" dirmode="755"> + <exclude name="bin/**"/> + <exclude name="eclipse/eclipse*"/> + </tarfileset> + </tar> + </target> + + + + <target name="release-bin" depends="check,release-bin-prepare,release-bin-rcp-deps, + release-bin-mcplugin-jar,release-bin-jmxremote-plugin,release-bin-zip,release-bin-gzip"/> + +</project> diff --git a/java/management/eclipse-plugin/build.xml b/java/management/eclipse-plugin/build.xml index 492783e574..5cfd13f2a5 100644 --- a/java/management/eclipse-plugin/build.xml +++ b/java/management/eclipse-plugin/build.xml @@ -24,4 +24,59 @@ <import file="../../module.xml"/> + <!-- module.manifest property to invoke use of 'jar.manifest' jar target when building --> + <property name="module.manifest" value="${module.classes}/META-INF/MANIFEST.MF"/> + + <target name="copy-plugin-files" description="copy eclipse management plugin files into build tree"> + <copy todir="${module.classes}/icons" failonerror="true"> + <fileset dir="icons/"/> + </copy> + <copy todir="${module.classes}/META-INF/" failonerror="true"> + <fileset dir="META-INF/"/> + </copy> + <copy todir="${module.classes}" failonerror="true"> + <fileset file="icons/splash.bmp"/> + </copy> + <copy todir="${module.classes}" failonerror="true"> + <fileset file="plugin.properties"/> + </copy> + <copy todir="${module.classes}" failonerror="true"> + <fileset file="plugin.xml"/> + </copy> + </target> + + <target name="create-version" description="Create the version file"> + + <exec executable="svnversion" spawn="false" failifexecutionfails="false" + dir="." outputproperty="svnversion"> + <arg line="."/> + </exec> + + <!-- Write the version.properties out. --> + <propertyfile file="${module.classes}/qpidversion.properties"> + <entry key="qpid.version" value="${project.version}"/> + <entry key="qpid.svnversion" value="${svnversion}"/> + <entry key="qpid.name" value="${project.name}"/> + </propertyfile> + + </target> + + + <!-- Override imported module.xml build target, create module jar containing plugin files --> + <target name="build" depends="prepare, compile, copy-plugin-files, create-version, jar, jar-tests"/> + + <!-- Override imported module.xml release-bin target --> + <target name="release-bin" depends="build"> + <!-- linux gtk x86 --> + <ant antfile="build-release.xml"> + <property file="build-release-linux-gtk-x86.properties"/> + <property file="build-release-common.properties"/> + </ant> + <!-- win32 win32 x86 --> + <ant antfile="build-release.xml"> + <property file="build-release-win32-win32-x86.properties"/> + <property file="build-release-common.properties"/> + </ant> + </target> + </project> diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/VersionAction.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/VersionAction.java index 11db02f5a2..be69fadbe8 100644 --- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/VersionAction.java +++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/VersionAction.java @@ -57,6 +57,11 @@ public class VersionAction extends Action _text = "Build Version : " + _buildVersion + "\n" + "Release Version : " + _releaseVersion; } + else + { + _text = "Build Version : \n" + + "Release Version : "; + } } catch (Exception ex) { diff --git a/java/management/eclipse-plugin/src/main/resources/unix/configuration/config.ini b/java/management/eclipse-plugin/src/main/resources/unix/configuration/config.ini index aa2d21fd48..5bbf344c17 100644 --- a/java/management/eclipse-plugin/src/main/resources/unix/configuration/config.ini +++ b/java/management/eclipse-plugin/src/main/resources/unix/configuration/config.ini @@ -22,6 +22,6 @@ osgi.splashPath=platform:/base/plugins/org.apache.qpid.management.ui
eclipse.product=org.apache.qpid.management.ui.product
eclipse.application=org.apache.qpid.management.ui.application
-osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.core.runtime@start,com.ibm.icu,org.apache.qpid.management.ui,org.eclipse.core.commands,org.eclipse.core.contenttype,org.eclipse.core.expressions,org.eclipse.core.jobs,org.eclipse.core.runtime.compatibility.auth,org.eclipse.core.runtime.compatibility.registry,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.help,org.eclipse.jface,org.eclipse.swt,org.eclipse.swt.motif.linux.x86,org.eclipse.swt.gtk.linux.x86_64,org.eclipse.swt.gtk.linux.x86,org.eclipse.swt.gtk.linux.ppc,org.eclipse.swt.motif.hpux.PA_RISC,org.eclipse.swt.gtk.solaris.sparc,org.eclipse.swt.motif.solaris.sparc,org.eclipse.swt.carbon.macocx,org.eclipse.ui,org.eclipse.ui.forms,org.eclipse.ui.workbench
+osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.core.runtime@start,com.ibm.icu,org.apache.qpid.management.ui,org.eclipse.core.commands,org.eclipse.core.contenttype,org.eclipse.core.expressions,org.eclipse.core.jobs,org.eclipse.core.runtime.compatibility.auth,org.eclipse.core.runtime.compatibility.registry,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.help,org.eclipse.jface,org.eclipse.swt,org.eclipse.swt.gtk.linux.x86,org.eclipse.ui,org.eclipse.ui.forms,org.eclipse.ui.workbench,jmxremote.sasl
osgi.bundles.defaultStartLevel=4
-eof=eof
\ No newline at end of file +eof=eof
diff --git a/java/management/eclipse-plugin/src/main/resources/unix/eclipse.ini b/java/management/eclipse-plugin/src/main/resources/unix/eclipse.ini new file mode 100644 index 0000000000..33884bd8f1 --- /dev/null +++ b/java/management/eclipse-plugin/src/main/resources/unix/eclipse.ini @@ -0,0 +1,11 @@ +-startup +plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar +--launcher.library +plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805 +#-showsplash +#org.eclipse.platform +--launcher.XXMaxPermSize +256m +-vmargs +-Xms40m +-Xmx256m |
