ARTEMIS-1270 Management Console - Hawtio Solution
Add Hawtio to web Add Custom ActiveMQ Hawtio Branding Plugin
|
@ -1,4 +1,7 @@
|
||||||
<!-- The web server is only bound to localhost by default -->
|
<!-- The web server is only bound to localhost by default -->
|
||||||
<web bind="${web.protocol}://${http.host}:${http.port}" path="web"${extra.web.attributes}>
|
<web bind="${web.protocol}://${http.host}:${http.port}" path="web"${extra.web.attributes}>
|
||||||
<app url="jolokia" war="jolokia.war"/>
|
<app url="jolokia" war="jolokia.war"/>
|
||||||
|
<app url="activemq-branding" war="activemq-branding.war"/>
|
||||||
|
<app url="artemis-plugin" war="artemis-plugin.war"/>
|
||||||
|
<app url="hawtio" war="hawtio.war"/>
|
||||||
</web>
|
</web>
|
||||||
|
|
|
@ -169,7 +169,28 @@
|
||||||
<artifactId>jolokia-war</artifactId>
|
<artifactId>jolokia-war</artifactId>
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
|
<!-- Management Console Dependencies -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.hawt</groupId>
|
||||||
|
<artifactId>hawtio-no-slf4j</artifactId>
|
||||||
|
<version>1.5.2</version>
|
||||||
|
<type>war</type>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
<artifactId>activemq-branding</artifactId>
|
||||||
|
<version>${project.version} </version>
|
||||||
|
<type>war</type>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
<artifactId>artemis-plugin</artifactId>
|
||||||
|
<version>${project.version} </version>
|
||||||
|
<type>war</type>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
<groupId>commons-beanutils</groupId>
|
<groupId>commons-beanutils</groupId>
|
||||||
<artifactId>commons-beanutils</artifactId>
|
<artifactId>commons-beanutils</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -142,6 +142,33 @@
|
||||||
<unpack>false</unpack>
|
<unpack>false</unpack>
|
||||||
<outputFileNameMapping>jolokia.war</outputFileNameMapping>
|
<outputFileNameMapping>jolokia.war</outputFileNameMapping>
|
||||||
</dependencySet>
|
</dependencySet>
|
||||||
|
|
||||||
|
<!-- Management Console Dependencies -->
|
||||||
|
<dependencySet>
|
||||||
|
<includes>
|
||||||
|
<include>io.hawt:hawtio-no-slf4j:war</include>
|
||||||
|
</includes>
|
||||||
|
<outputDirectory>web</outputDirectory>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<outputFileNameMapping>hawtio.war</outputFileNameMapping>
|
||||||
|
</dependencySet>
|
||||||
|
<dependencySet>
|
||||||
|
<includes>
|
||||||
|
<include>org.apache.activemq:activemq-branding:war</include>
|
||||||
|
</includes>
|
||||||
|
<outputDirectory>web</outputDirectory>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<outputFileNameMapping>activemq-branding.war</outputFileNameMapping>
|
||||||
|
</dependencySet>
|
||||||
|
<dependencySet>
|
||||||
|
<includes>
|
||||||
|
<include>org.apache.activemq:artemis-plugin:war</include>
|
||||||
|
</includes>
|
||||||
|
<outputDirectory>web</outputDirectory>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<outputFileNameMapping>artemis-plugin.war</outputFileNameMapping>
|
||||||
|
</dependencySet>
|
||||||
|
|
||||||
</dependencySets>
|
</dependencySets>
|
||||||
<fileSets>
|
<fileSets>
|
||||||
<!-- schema -->
|
<!-- schema -->
|
||||||
|
|
|
@ -0,0 +1,260 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
<artifactId>artemis-hawtio-pom</artifactId>
|
||||||
|
<version>2.2.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>activemq-branding</artifactId>
|
||||||
|
<name>ActiveMQ Artemis HawtIO Branding</name>
|
||||||
|
|
||||||
|
<!-- hawtio plugins are almost always war files -->
|
||||||
|
<packaging>war</packaging>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<activemq.basedir>${project.basedir}/../..</activemq.basedir>
|
||||||
|
|
||||||
|
<!-- filtered plugin properties, we don't define plugin-scripts here
|
||||||
|
as we build that dynamically using maven-antrun-plugin below. -->
|
||||||
|
<!-- plugin-context is what context this plugin will handle requests on
|
||||||
|
in the application server -->
|
||||||
|
<plugin-context>/activemq-branding</plugin-context>
|
||||||
|
|
||||||
|
<!-- plugin-name is the name of our plugin, affects the name used for
|
||||||
|
the plugin's mbean -->
|
||||||
|
<plugin-name>${project.artifactId}</plugin-name>
|
||||||
|
|
||||||
|
<!-- plugin-domain is currently unused, we just define it to an empty
|
||||||
|
string -->
|
||||||
|
<plugin-domain/>
|
||||||
|
|
||||||
|
<!-- this lets this plugin deploy nicely into karaf, these get used
|
||||||
|
for the ImportPackage directive for maven-bundle-plugin -->
|
||||||
|
<fuse.osgi.import>
|
||||||
|
javax.servlet,
|
||||||
|
*;resolution:=optional
|
||||||
|
</fuse.osgi.import>
|
||||||
|
|
||||||
|
<webapp-dir>${project.artifactId}-${project.version}</webapp-dir>
|
||||||
|
<webapp-outdir>${basedir}/target/${webapp-dir}</webapp-outdir>
|
||||||
|
<schema-outdir>${basedir}/src/main/webapp/lib</schema-outdir>
|
||||||
|
<appjs-outfile>${webapp-outdir}/app/app.js</appjs-outfile>
|
||||||
|
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- we only need to embed this dependency in the war, this contains
|
||||||
|
a nice helper class that our plugin can use to export it's plugin
|
||||||
|
mbean -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.hawt</groupId>
|
||||||
|
<artifactId>hawtio-plugin-mbean</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- servlet API is provided by the container -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>servlet-api</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- logging -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
<build>
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.xml</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
|
||||||
|
<!-- We use maven-antrun-plugin to build up a list of
|
||||||
|
javascript files for our plugin mbean, this means
|
||||||
|
it needs to run before the maven-resources-plugin
|
||||||
|
copies and filters the web.xml, since for this
|
||||||
|
example we use contextParam settings to configure
|
||||||
|
our plugin mbean -->
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
<version>${maven-antrun-plugin-version}</version>
|
||||||
|
<executions>
|
||||||
|
|
||||||
|
<execution>
|
||||||
|
<!-- we run this early in the build process before
|
||||||
|
maven-resources-plugin is run. We're exporting the
|
||||||
|
plugin-scripts property from here, so we need to
|
||||||
|
use maven-antrun-plugin 1.6 or up -->
|
||||||
|
<id>generate-sources</id>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<target>
|
||||||
|
<echo>Building plugin javascript file list</echo>
|
||||||
|
<!-- javascript-files will contain all of the javascript in
|
||||||
|
our project -->
|
||||||
|
<fileset id="javascript-files" dir="${basedir}/src/main/webapp">
|
||||||
|
<include name="**/*.js"/>
|
||||||
|
</fileset>
|
||||||
|
<!-- we need to strip out the top level path which is
|
||||||
|
our source directory and be sure to change the directory
|
||||||
|
separators to forward slashes -->
|
||||||
|
<pathconvert pathsep="," dirsep="/" property="plugin-scripts" refid="javascript-files">
|
||||||
|
<map from="${basedir}/src/main/webapp/" to=""/>
|
||||||
|
</pathconvert>
|
||||||
|
<echo>Files: ${plugin-scripts}</echo>
|
||||||
|
|
||||||
|
</target>
|
||||||
|
<!-- this exports plugin-scripts to the maven build, without
|
||||||
|
this line ${plugin-scripts} in the web.xml file won't be
|
||||||
|
replaced -->
|
||||||
|
<exportAntProperties>true</exportAntProperties>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>${maven-resources-plugin-version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<!-- defining this maven plugin in the same phase as the
|
||||||
|
maven-antrun-plugin but *after* we've configured the
|
||||||
|
maven-antrun-plugin ensures we filter resources *after*
|
||||||
|
we've discovered the plugin .js files. -->
|
||||||
|
<id>copy-resources</id>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>resources</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!-- maven-bundle-plugin config, needed to make this war
|
||||||
|
deployable in karaf, defines the context that this bundle
|
||||||
|
should handle requests on -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.felix</groupId>
|
||||||
|
<artifactId>maven-bundle-plugin</artifactId>
|
||||||
|
<version>${maven-bundle-plugin-version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>bundle-manifest</id>
|
||||||
|
<phase>process-classes</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>manifest</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<manifestLocation>${webapp-outdir}/META-INF</manifestLocation>
|
||||||
|
<supportedProjectTypes>
|
||||||
|
<supportedProjectType>jar</supportedProjectType>
|
||||||
|
<supportedProjectType>bundle</supportedProjectType>
|
||||||
|
<supportedProjectType>war</supportedProjectType>
|
||||||
|
</supportedProjectTypes>
|
||||||
|
<instructions>
|
||||||
|
<Webapp-Context>${plugin-context}</Webapp-Context>
|
||||||
|
<Web-ContextPath>${plugin-context}</Web-ContextPath>
|
||||||
|
|
||||||
|
<Embed-Directory>WEB-INF/lib</Embed-Directory>
|
||||||
|
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
|
||||||
|
<Embed-Transitive>true</Embed-Transitive>
|
||||||
|
|
||||||
|
<Export-Package>${fuse.osgi.export}</Export-Package>
|
||||||
|
<Import-Package>${fuse.osgi.import}</Import-Package>
|
||||||
|
<DynamicImport-Package>${fuse.osgi.dynamic}</DynamicImport-Package>
|
||||||
|
<Private-Package>${fuse.osgi.private.pkg}</Private-Package>
|
||||||
|
|
||||||
|
<Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>
|
||||||
|
|
||||||
|
<Bundle-Name>${project.description}</Bundle-Name>
|
||||||
|
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
|
||||||
|
<Implementation-Title>HawtIO</Implementation-Title>
|
||||||
|
<Implementation-Version>${project.version}</Implementation-Version>
|
||||||
|
</instructions>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!-- We define the maven-war-plugin here and make sure it uses
|
||||||
|
the manifest file generated by the maven-bundle-plugin. We
|
||||||
|
also ensure it picks up our filtered web.xml and not the one
|
||||||
|
in src/main/resources -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>${war-plugin-version}</version>
|
||||||
|
<configuration>
|
||||||
|
<outputFileNameMapping>@{artifactId}@-@{baseVersion}@@{dashClassifier?}@.@{extension}@</outputFileNameMapping>
|
||||||
|
<packagingExcludes>**/classes/OSGI-INF/**</packagingExcludes>
|
||||||
|
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||||
|
<archive>
|
||||||
|
<manifestFile>${webapp-outdir}/META-INF/MANIFEST.MF</manifestFile>
|
||||||
|
</archive>
|
||||||
|
<webResources>
|
||||||
|
<resource>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.*</include>
|
||||||
|
</includes>
|
||||||
|
<excludes>
|
||||||
|
<exclude>log4j.properties</exclude>
|
||||||
|
</excludes>
|
||||||
|
</resource>
|
||||||
|
</webResources>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
|
||||||
|
</project>
|
|
@ -0,0 +1,71 @@
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.apache.activemq.hawtio.branding;
|
||||||
|
|
||||||
|
import io.hawt.web.plugin.HawtioPlugin;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import javax.servlet.ServletContext;
|
||||||
|
import javax.servlet.ServletContextEvent;
|
||||||
|
import javax.servlet.ServletContextListener;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Plugin Context Listener used to load in the plugin
|
||||||
|
**/
|
||||||
|
public class PluginContextListener implements ServletContextListener {
|
||||||
|
|
||||||
|
private static final Logger LOG = LoggerFactory.getLogger(PluginContextListener.class);
|
||||||
|
|
||||||
|
HawtioPlugin plugin = null;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void contextInitialized(ServletContextEvent servletContextEvent) {
|
||||||
|
|
||||||
|
ServletContext context = servletContextEvent.getServletContext();
|
||||||
|
|
||||||
|
plugin = new HawtioPlugin();
|
||||||
|
plugin.setContext((String)context.getInitParameter("plugin-context"));
|
||||||
|
plugin.setName(context.getInitParameter("plugin-name"));
|
||||||
|
plugin.setScripts(context.getInitParameter("plugin-scripts"));
|
||||||
|
plugin.setDomain(null);
|
||||||
|
|
||||||
|
try {
|
||||||
|
plugin.init();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw createServletException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG.info("Initialized {} plugin", plugin.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void contextDestroyed(ServletContextEvent servletContextEvent) {
|
||||||
|
try {
|
||||||
|
plugin.destroy();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw createServletException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG.info("Destroyed {} plugin", plugin.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected RuntimeException createServletException(Exception e) {
|
||||||
|
return new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,57 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
|
||||||
|
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
|
||||||
|
version="2.4">
|
||||||
|
|
||||||
|
<description>ActiveMQ Artemis HawtIO branding plugin</description>
|
||||||
|
<display-name>activemq artemis hawt.io branding plugin</display-name>
|
||||||
|
|
||||||
|
<context-param>
|
||||||
|
<description>Plugin's path on the server</description>
|
||||||
|
<param-name>plugin-context</param-name>
|
||||||
|
<param-value>${plugin-context}</param-value>
|
||||||
|
</context-param>
|
||||||
|
|
||||||
|
<context-param>
|
||||||
|
<description>Plugin's path on the server</description>
|
||||||
|
<param-name>plugin-name</param-name>
|
||||||
|
<param-value>${project.artifactId}</param-value>
|
||||||
|
</context-param>
|
||||||
|
|
||||||
|
<context-param>
|
||||||
|
<description>Plugin's path on the server</description>
|
||||||
|
<param-name>plugin-domain</param-name>
|
||||||
|
<param-value>${plugin-domain}</param-value>
|
||||||
|
</context-param>
|
||||||
|
|
||||||
|
<context-param>
|
||||||
|
<description>Plugin's path on the server</description>
|
||||||
|
<param-name>plugin-scripts</param-name>
|
||||||
|
<param-value>${plugin-scripts}</param-value>
|
||||||
|
</context-param>
|
||||||
|
|
||||||
|
<listener>
|
||||||
|
<listener-class>org.apache.activemq.hawtio.branding.PluginContextListener</listener-class>
|
||||||
|
</listener>
|
||||||
|
|
||||||
|
|
||||||
|
</web-app>
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--
|
||||||
|
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.
|
||||||
|
Architecture
|
||||||
|
-->
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<title>hawtio-activemq-branding</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>hawtio :: ActiveMQ Artemis Branding</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,43 @@
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
#main-nav > .navbar-inner.main-nav-upper > .container > .pull-left > .brand {
|
||||||
|
/*
|
||||||
|
padding-top: 6px;
|
||||||
|
*/
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#main-nav > .navbar-inner.main-nav-upper > .container > .pull-left > .brand > img {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
left: -3px;
|
||||||
|
height: 43px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#main-nav > .navbar-inner.main-nav-upper > .container > .pull-left > .brand > strong {
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 18px;
|
||||||
|
position: relative;
|
||||||
|
top: 2px;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand > .with-text {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
![ActiveMQ Artemis logo](../activemq-branding/plugin/img/activemq-artemis-logo.png)
|
||||||
|
|
||||||
|
Apache ActiveMQ Artemis
|
||||||
|
=======================
|
||||||
|
|
||||||
|
|
||||||
|
Management Console
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Links
|
||||||
|
-----
|
||||||
|
|
||||||
|
[Artemis User Guide](http://activemq.apache.org/artemis/docs/2.1.0/index.html)
|
||||||
|
[Java Docs](http://activemq.apache.org/artemis/docs/javadocs/javadoc-2.1.0/index.html)
|
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 355 B |
After Width: | Height: | Size: 244 B |
After Width: | Height: | Size: 228 B |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 149 B |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 21 KiB |
|
@ -0,0 +1,66 @@
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* The activemq hawtio theme
|
||||||
|
*
|
||||||
|
* @module activemqBranding
|
||||||
|
* @main activemq
|
||||||
|
*/
|
||||||
|
var activemqBranding = (function (self) {
|
||||||
|
|
||||||
|
self.log = Logger.get("activemq");
|
||||||
|
self.context = '../activemq-branding/';
|
||||||
|
self.pluginName = 'hawtio-activemq-branding';
|
||||||
|
|
||||||
|
hawtioPluginLoader.registerPreBootstrapTask(function (task) {
|
||||||
|
Themes.definitions['activemq'] = {
|
||||||
|
label: 'activemq',
|
||||||
|
file: self.context + 'plugin/css/activemq.css',
|
||||||
|
loginBg: self.context + 'plugin/img/apache-login-background.jpg'
|
||||||
|
};
|
||||||
|
var localStorage = Core.getLocalStorage();
|
||||||
|
if (!('theme' in localStorage)) {
|
||||||
|
localStorage['theme'] = 'activemq';
|
||||||
|
}
|
||||||
|
Themes.brandings['activemq'] = {
|
||||||
|
label: 'activemq',
|
||||||
|
setFunc: function(branding) {
|
||||||
|
branding.appName = 'Management Console';
|
||||||
|
branding.appLogo = self.context + 'plugin/img/activemq.png';
|
||||||
|
branding.logoOnly = false;
|
||||||
|
branding.fullscreenLogin = true;
|
||||||
|
branding.css = self.context + 'plugin/css/branding.css';
|
||||||
|
branding.favicon = self.context + 'plugin/img/favicon.png';
|
||||||
|
branding.welcomePageUrl = self.context + 'plugin/doc/welcome.md';
|
||||||
|
return branding;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!('branding' in localStorage)) {
|
||||||
|
localStorage['branding'] = 'activemq';
|
||||||
|
}
|
||||||
|
task();
|
||||||
|
});
|
||||||
|
|
||||||
|
self.module = angular.module(self.pluginName, ['hawtioCore']);
|
||||||
|
self.module.run(function (branding) {
|
||||||
|
self.log.debug("ActivMQ theme loaded");
|
||||||
|
});
|
||||||
|
|
||||||
|
hawtioPluginLoader.addModule(self.pluginName);
|
||||||
|
return self;
|
||||||
|
})(activemqBranding || {});
|
||||||
|
|
|
@ -0,0 +1,103 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
<artifactId>artemis-pom</artifactId>
|
||||||
|
<version>2.2.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>artemis-hawtio-pom</artifactId>
|
||||||
|
<name>ActiveMQ Artemis HawtIO</name>
|
||||||
|
|
||||||
|
<!-- hawtio plugins are almost always war files -->
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
|
||||||
|
<activemq.basedir>${project.basedir}/..</activemq.basedir>
|
||||||
|
|
||||||
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
|
|
||||||
|
<hawtio.version>1.5.2</hawtio.version>
|
||||||
|
<jline.version>3.2.0</jline.version>
|
||||||
|
<jolokia-version>1.3.6</jolokia-version>
|
||||||
|
<junit-version>4.11</junit-version>
|
||||||
|
<log4j-version>1.2.17</log4j-version>
|
||||||
|
<maven-version>3.0.4</maven-version>
|
||||||
|
<maven-antrun-plugin-version>1.7</maven-antrun-plugin-version>
|
||||||
|
<maven-bundle-plugin-version>3.0.1</maven-bundle-plugin-version>
|
||||||
|
<maven-plugin-version>3.3</maven-plugin-version>
|
||||||
|
<maven-source-plugin-version>2.1.2</maven-source-plugin-version>
|
||||||
|
<maven-resources-plugin-version>2.6</maven-resources-plugin-version>
|
||||||
|
<maven-surefire-plugin-version>2.19.1</maven-surefire-plugin-version>
|
||||||
|
<servlet-api-version>2.5</servlet-api-version>
|
||||||
|
|
||||||
|
<!-- use slf4j-api 1.6.x to be easy compatible with older Karaf/Camel releases -->
|
||||||
|
<slf4j-api-version>1.6.6</slf4j-api-version>
|
||||||
|
<slf4j-version>1.7.21</slf4j-version>
|
||||||
|
|
||||||
|
<war-plugin-version>2.1.1</war-plugin-version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<!-- we only need to embed this dependency in the war, this contains
|
||||||
|
a nice helper class that our plugin can use to export it's plugin
|
||||||
|
mbean -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.hawt</groupId>
|
||||||
|
<artifactId>hawtio-plugin-mbean</artifactId>
|
||||||
|
<version>${hawtio.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- servlet API is provided by the container -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>servlet-api</artifactId>
|
||||||
|
<version>${servlet-api-version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- logging -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<version>${slf4j-version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
|
<version>${slf4j-version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>activemq-branding</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
</project>
|
|
@ -22,6 +22,15 @@
|
||||||
elementFormDefault="qualified"
|
elementFormDefault="qualified"
|
||||||
version="1.0">
|
version="1.0">
|
||||||
|
|
||||||
|
<xsd:element name="imports">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="import" maxOccurs="unbounded" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="type"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
|
||||||
<xsd:element name="core" type="configurationType"/>
|
<xsd:element name="core" type="configurationType"/>
|
||||||
|
|
||||||
<xsd:complexType name="configurationType">
|
<xsd:complexType name="configurationType">
|
||||||
|
|
|
@ -58,7 +58,7 @@ import org.junit.Test;
|
||||||
|
|
||||||
public class FileConfigurationTest extends ConfigurationImplTest {
|
public class FileConfigurationTest extends ConfigurationImplTest {
|
||||||
|
|
||||||
private final String fullConfigurationName = "ConfigurationTest-full-config.xml";
|
private final String fullConfigurationName = "configurationImport.xml";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -54,4 +54,8 @@ public interface ActiveMQWebLogger extends BasicLogger {
|
||||||
@LogMessage(level = Logger.Level.WARN)
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
@Message(id = 244003, value = "Temporary file not deleted on shutdown: {0}", format = Message.Format.MESSAGE_FORMAT)
|
@Message(id = 244003, value = "Temporary file not deleted on shutdown: {0}", format = Message.Format.MESSAGE_FORMAT)
|
||||||
void tmpFileNotDeleted(File tmpdir);
|
void tmpFileNotDeleted(File tmpdir);
|
||||||
|
|
||||||
|
@LogMessage(level = Logger.Level.INFO)
|
||||||
|
@Message(id = 241004, value = "Artemis Hawtio available at {0}", format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
void hawtioAvailable(String bind);
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,7 @@ public class WebServerComponent implements ExternalComponent {
|
||||||
private WebServerDTO webServerConfig;
|
private WebServerDTO webServerConfig;
|
||||||
private URI uri;
|
private URI uri;
|
||||||
private String jolokiaUrl;
|
private String jolokiaUrl;
|
||||||
|
private String hawtioUrl;
|
||||||
private List<WebAppContext> webContexts;
|
private List<WebAppContext> webContexts;
|
||||||
private ServerConnector connector;
|
private ServerConnector connector;
|
||||||
|
|
||||||
|
@ -105,6 +106,9 @@ public class WebServerComponent implements ExternalComponent {
|
||||||
if (app.war.startsWith("jolokia")) {
|
if (app.war.startsWith("jolokia")) {
|
||||||
jolokiaUrl = webServerConfig.bind + "/" + app.url;
|
jolokiaUrl = webServerConfig.bind + "/" + app.url;
|
||||||
}
|
}
|
||||||
|
if (app.war.startsWith("hawtio")) {
|
||||||
|
hawtioUrl = webServerConfig.bind + "/" + app.url;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,6 +140,9 @@ public class WebServerComponent implements ExternalComponent {
|
||||||
if (jolokiaUrl != null) {
|
if (jolokiaUrl != null) {
|
||||||
ActiveMQWebLogger.LOGGER.jolokiaAvailable(jolokiaUrl);
|
ActiveMQWebLogger.LOGGER.jolokiaAvailable(jolokiaUrl);
|
||||||
}
|
}
|
||||||
|
if (hawtioUrl != null) {
|
||||||
|
ActiveMQWebLogger.LOGGER.hawtioAvailable(hawtioUrl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void internalStop() throws Exception {
|
public void internalStop() throws Exception {
|
||||||
|
|
1
pom.xml
|
@ -54,6 +54,7 @@
|
||||||
<module>artemis-jdbc-store</module>
|
<module>artemis-jdbc-store</module>
|
||||||
<module>artemis-maven-plugin</module>
|
<module>artemis-maven-plugin</module>
|
||||||
<module>artemis-server-osgi</module>
|
<module>artemis-server-osgi</module>
|
||||||
|
<module>artemis-hawtio</module>
|
||||||
<module>integration/activemq-spring-integration</module>
|
<module>integration/activemq-spring-integration</module>
|
||||||
<module>artemis-distribution</module>
|
<module>artemis-distribution</module>
|
||||||
<module>artemis-tools</module>
|
<module>artemis-tools</module>
|
||||||
|
|