Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 4486bbd21 -> 7c2191eea


DISPATCH-447 Add cmake option to install stand-alone console and build hawtio 
console


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/7c2191ee
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/7c2191ee
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/7c2191ee

Branch: refs/heads/master
Commit: 7c2191eeab5a078330d5f1cadc769df6a078d46f
Parents: 4486bbd
Author: Ernest Allen <[email protected]>
Authored: Tue Jul 19 15:52:24 2016 -0400
Committer: Ernest Allen <[email protected]>
Committed: Tue Jul 19 15:52:24 2016 -0400

----------------------------------------------------------------------
 CMakeLists.txt         |  1 +
 console/CMakeLists.txt | 58 +++++++++++++++++++++++++++++++++++++++++++++
 console/hawtio/pom.xml |  6 +++--
 3 files changed, 63 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/7c2191ee/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e92b32..989687a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -155,6 +155,7 @@ add_subdirectory(tests)
 add_subdirectory(python)
 add_subdirectory(router)
 add_subdirectory(doc)
+add_subdirectory(console)
 
 # reconfigure.in is a workaround to force cmake re-configuration. For example,
 # we use GLOB to collect .h files for install and apidoc, so if you _remove_ a

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/7c2191ee/console/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/console/CMakeLists.txt b/console/CMakeLists.txt
new file mode 100644
index 0000000..e64f518
--- /dev/null
+++ b/console/CMakeLists.txt
@@ -0,0 +1,58 @@
+##
+## 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.
+##
+
+set(CONSOLE_BASE_INSTALL_DIR "share/qpid-dispatch/console")
+set(CONSOLE_BASE_SOURCE_DIR "${CMAKE_SOURCE_DIR}/console/stand-alone/")
+set(CONSOLE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${CONSOLE_BASE_INSTALL_DIR}")
+
+##
+## Add option to not install the stand-alone console
+##
+option(CONSOLE_INSTALL "Install stand-alone console" ON)
+if(CONSOLE_INSTALL)
+
+       # Static console files
+       install(
+               DIRECTORY ${CONSOLE_BASE_SOURCE_DIR} DESTINATION 
${CONSOLE_INSTALL_DIR}/stand-alone
+    )
+
+endif(CONSOLE_INSTALL)
+
+##
+## Add a custom make hawtio target
+##
+find_program (MAVEN_EXE mvn DOC "Location of the maven program")
+if (MAVEN_EXE)
+       # the directory where the .war file will be built
+       set(HAWTIO_BUILD_DIR "${CMAKE_BINARY_DIR}/hawtio")
+
+       # create the console .war file
+       add_custom_target(hawtio
+           COMMAND ${MAVEN_EXE} -DbuildDirectory=${HAWTIO_BUILD_DIR} package
+           WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/console/hawtio
+       )
+
+       # install the built war file into the console dir
+       install(
+           # We don't know in advance what the name of the final .war will be 
because
+               # the war file name depends on the version in the pom.xml. The 
version will change each release
+           CODE "file( GLOB builtwar 
\"${HAWTIO_BUILD_DIR}/dispatch-hawtio-console*.war\" )"
+           CODE "file( INSTALL \${builtwar} DESTINATION 
\"${CONSOLE_INSTALL_DIR}/hawtio\" )"
+       )
+endif(MAVEN_EXE)

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/7c2191ee/console/hawtio/pom.xml
----------------------------------------------------------------------
diff --git a/console/hawtio/pom.xml b/console/hawtio/pom.xml
index ac9d696..29ae286 100644
--- a/console/hawtio/pom.xml
+++ b/console/hawtio/pom.xml
@@ -72,8 +72,9 @@
     <maven-antrun-plugin-version>1.7</maven-antrun-plugin-version>
     <maven-bundle-plugin-version>2.3.7</maven-bundle-plugin-version>
 
+    <buildDirectory>${project.basedir}/target</buildDirectory>
     <webapp-dir>${project.artifactId}-${project.version}</webapp-dir>
-    <webapp-outdir>${basedir}/target/${webapp-dir}</webapp-outdir>
+    <webapp-outdir>${buildDirectory}/${webapp-dir}</webapp-outdir>
 
     <!-- this lets this plugin deploy nicely into karaf, these get used
       for the ImportPackage directive for maven-bundle-plugin -->
@@ -121,6 +122,7 @@
 
   <build>
 
+    <directory>${buildDirectory}</directory>
     <!-- we want to ensure src/main/resources/WEB-INF/web.xml is being filtered
       so that it picks up all of our javascript files -->
     <resources>
@@ -174,7 +176,7 @@
                 <echo>Files: ${plugin-scripts}</echo>
 
                 <echo>Copying log4j.properties</echo>
-                <copy file="src/main/resources/log4j.properties" 
todir="target/classes" />
+                <copy file="src/main/resources/log4j.properties" 
todir="${buildDirectory}/classes" />
 
               </target>
               <!-- this exports plugin-scripts to the maven build, without


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to