diff options
| author | Alex Rudyy <orudyy@apache.org> | 2015-04-15 09:47:28 +0000 |
|---|---|---|
| committer | Alex Rudyy <orudyy@apache.org> | 2015-04-15 09:47:28 +0000 |
| commit | 0a0baee45ebcff44635907d457c4ff6810b09c87 (patch) | |
| tree | 8bfb0f9eddbc23cff88af69be80ab3ce7d47011c /qpid/java/broker/src | |
| parent | 54aa3d7070da16ce55c28ccad3f7d0871479e461 (diff) | |
| download | qpid-python-0a0baee45ebcff44635907d457c4ff6810b09c87.tar.gz | |
QPID-6481: Move java source tree to top level
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1673693 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker/src')
7 files changed, 0 insertions, 1349 deletions
diff --git a/qpid/java/broker/src/main/assembly/LICENSE b/qpid/java/broker/src/main/assembly/LICENSE deleted file mode 100644 index bb9e55be67..0000000000 --- a/qpid/java/broker/src/main/assembly/LICENSE +++ /dev/null @@ -1,300 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed 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. - - - -############################################### -# Third Party Dependency Licensing Information: -############################################### - -This bundles portions of crypto-js which is under the MIT licence: - -Copyright (c) 2009-2013 Jeff Mott - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -############################################### - -This product bundles the slf4j-api and slf4j-log4j jars which are under -the MIT licence: - -Copyright (c) 2004-2013 QOS.ch - All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -############################################### - -This product bundles the dojo zip which is under the "New" BSD licence: - -Dojo is available under *either* the terms of the modified BSD license *or* the -Academic Free License version 2.1. As a recipient of Dojo, you may choose which -license to receive this code under (except as noted in per-module LICENSE -files). Some modules may not be the copyright of the Dojo Foundation. These -modules contain explicit declarations of copyright in both the LICENSE files in -the directories in which they reside and in the code itself. No external -contributions are allowed under licenses which are fundamentally incompatible -with the AFL or BSD licenses that Dojo is distributed under. - -The "New" BSD License: -********************** - -Copyright (c) 2005-2014, The Dojo Foundation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the Dojo Foundation nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/qpid/java/broker/src/main/assembly/NOTICE b/qpid/java/broker/src/main/assembly/NOTICE deleted file mode 100644 index 6950a91fb3..0000000000 --- a/qpid/java/broker/src/main/assembly/NOTICE +++ /dev/null @@ -1,93 +0,0 @@ -Qpid Java Broker -Copyright 2006-2014 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -############################################### - -Apache Derby -Copyright 2004-2011 The Apache Software Foundation - -Portions of Derby were originally developed by -International Business Machines Corporation and are -licensed to the Apache Software Foundation under the -"Software Grant and Corporate Contribution License Agreement", -informally known as the "Derby CLA". -The following copyright notice(s) were affixed to portions of the code -with which this file is now or was at one time distributed -and are placed here unaltered. - -(C) Copyright 1997,2004 International Business Machines Corporation. All rights reserved. - -(C) Copyright IBM Corp. 2003. - -############################################### - -============================================================== - Jetty Web Container - Copyright 1995-2014 Mort Bay Consulting Pty Ltd. -============================================================== - -The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd -unless otherwise noted. - -Jetty is dual licensed under both - - * The Apache 2.0 License - http://www.apache.org/licenses/LICENSE-2.0.html - - and - - * The Eclipse Public 1.0 License - http://www.eclipse.org/legal/epl-v10.html - -Jetty may be distributed under either license. - -The javax.servlet package used was sourced from the Apache -Software Foundation and is distributed under the apache 2.0 -license. - -The UnixCrypt.java code implements the one way cryptography used by -Unix systems for simple password protection. Copyright 1996 Aki Yoshida, -modified April 2001 by Iris Van den Broeke, Daniel Deville. -Permission to use, copy, modify and distribute UnixCrypt -for non-commercial or commercial purposes and without fee is -granted provided that the copyright notice appears in all copies. - -############################################### - -Geronimo Servlet Spec 3.0 -Copyright 2003-2010 The Apache Software Foundation - -This product includes software developed by -The W3C Consortium (http://www.w3.org/). - -Copyright © 1994-2002 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National -de Recherche en Informatique et en Automatique, Keio -University). All Rights Reserved. -http://www.w3.org/Consortium/Legal/ - -############################################### - -Apache Commons Codec -Copyright 2002-2013 The Apache Software Foundation - -############################################### - -Apache Commons CLI -Copyright 2001-2009 The Apache Software Foundation - -############################################### - -Apache Commons Lang -Copyright 2001-2011 The Apache Software Foundation - -############################################### - -Apache log4j -Copyright 2007 The Apache Software Foundation - -############################################### - diff --git a/qpid/java/broker/src/main/assembly/README.txt b/qpid/java/broker/src/main/assembly/README.txt deleted file mode 100644 index eec46a52f0..0000000000 --- a/qpid/java/broker/src/main/assembly/README.txt +++ /dev/null @@ -1,3 +0,0 @@ -Documentation for the Qpid components can be accessed on our website at: - -http://qpid.apache.org/documentation.html diff --git a/qpid/java/broker/src/main/assembly/dependency-verification/DEPENDENCIES_REFERENCE b/qpid/java/broker/src/main/assembly/dependency-verification/DEPENDENCIES_REFERENCE deleted file mode 100644 index a50f17aea0..0000000000 --- a/qpid/java/broker/src/main/assembly/dependency-verification/DEPENDENCIES_REFERENCE +++ /dev/null @@ -1,132 +0,0 @@ -# -# 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. -# - -#// ------------------------------------------------------------------ -# TRIMMED 3RD PARTY DEPENDENCY INFORMATION FOR MODIFICATION CHECKS -#// ------------------------------------------------------------------ - - - -From: 'an unknown organization' - - Guava: Google Core Libraries for Java (http://code.google.com/p/guava-libraries/guava) com.google.guava:guava:bundle:14.0.1 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - bcel org.apache.bcel:bcel:jar:5.2 - - -From: 'Apache Software Foundation' (http://db.apache.org/) - - Apache Derby Database Engine and Embedded JDBC Driver (http://db.apache.org/derby/derby/) org.apache.derby:derby:jar:10.8.2.2 - License: Apache 2 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'Apache Software Foundation' (http://www.apache.org) - - Apache Log4j (http://logging.apache.org/log4j/1.2/) log4j:log4j:bundle:1.2.16 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'FasterXML' (http://fasterxml.com) - - Jackson (http://jackson.codehaus.org) org.codehaus.jackson:jackson-core-asl:jar:1.9.1 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Data Mapper for Jackson (http://jackson.codehaus.org) org.codehaus.jackson:jackson-mapper-asl:jar:1.9.1 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'JolBox' (http://jolbox.com) - - BoneCP :: Core Library (http://jolbox.com/bonecp) com.jolbox:bonecp:bundle:0.7.1.RELEASE - License: Apache v2 (http://www.apache.org/licenses/LICENSE-2.0.html) - -From: 'Mort Bay Consulting' (http://www.mortbay.com) - - Jetty :: Continuation (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-continuation:jar:8.1.14.v20131031 - License: Apache Software License - Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) License: Eclipse Public License - Version 1.0 (http://www.eclipse.org/org/documents/epl-v10.php) - - Jetty :: Http Utility (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-http:jar:8.1.14.v20131031 - License: Apache Software License - Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) License: Eclipse Public License - Version 1.0 (http://www.eclipse.org/org/documents/epl-v10.php) - - Jetty :: IO Utility (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-io:jar:8.1.14.v20131031 - License: Apache Software License - Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) License: Eclipse Public License - Version 1.0 (http://www.eclipse.org/org/documents/epl-v10.php) - - Jetty :: Security (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-security:jar:8.1.14.v20131031 - License: Apache Software License - Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) License: Eclipse Public License - Version 1.0 (http://www.eclipse.org/org/documents/epl-v10.php) - - Jetty :: Server Core (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-server:jar:8.1.14.v20131031 - License: Apache Software License - Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) License: Eclipse Public License - Version 1.0 (http://www.eclipse.org/org/documents/epl-v10.php) - - Jetty :: Servlet Handling (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-servlet:jar:8.1.14.v20131031 - License: Apache Software License - Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) License: Eclipse Public License - Version 1.0 (http://www.eclipse.org/org/documents/epl-v10.php) - - Jetty :: Utilities (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-util:jar:8.1.14.v20131031 - License: Apache Software License - Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) License: Eclipse Public License - Version 1.0 (http://www.eclipse.org/org/documents/epl-v10.php) - - Jetty :: Websocket (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-websocket:jar:8.1.14.v20131031 - License: Apache Software License - Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) License: Eclipse Public License - Version 1.0 (http://www.eclipse.org/org/documents/epl-v10.php) - -From: 'QOS.ch' (http://www.qos.ch) - - SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.6.4 - License: MIT License (http://www.opensource.org/licenses/mit-license.php) - - SLF4J LOG4J-12 Binding (http://www.slf4j.org) org.slf4j:slf4j-log4j12:jar:1.6.4 - License: MIT License (http://www.opensource.org/licenses/mit-license.php) - -From: 'The Apache Software Foundation' (http://www.apache.org) - - Servlet 3.0 (http://geronimo.apache.org/maven/specs/geronimo-servlet_3.0_spec/1.0) org.apache.geronimo.specs:geronimo-servlet_3.0_spec:bundle:1.0 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'The Apache Software Foundation' (http://www.apache.org/) - - Commons CLI (http://commons.apache.org/cli/) commons-cli:commons-cli:jar:1.2 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Apache Commons Codec (http://commons.apache.org/proper/commons-codec/) commons-codec:commons-codec:jar:1.9 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.6 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid AMQP 1.0 Common (http://qpid.apache.org/qpid-java-build/qpid-amqp-1-0-common) org.apache.qpid:qpid-amqp-1-0-common:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid BDB Message Store (http://qpid.apache.org/qpid-java-build/qpid-bdbstore) org.apache.qpid:qpid-bdbstore:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid BDB Message Store JMX (http://qpid.apache.org/qpid-java-build/bdbstore/qpid-bdbstore-jmx) org.apache.qpid:qpid-bdbstore-jmx:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid Java Broker Core (http://qpid.apache.org/qpid-java-build/qpid-broker-core) org.apache.qpid:qpid-broker-core:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid Access Control Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-access-control) org.apache.qpid:qpid-broker-plugins-access-control:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid AMQP 0-10 Protocol Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-amqp-0-10-protocol) org.apache.qpid:qpid-broker-plugins-amqp-0-10-protocol:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid AMQP 0-8 Protocol Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-amqp-0-8-protocol) org.apache.qpid:qpid-broker-plugins-amqp-0-8-protocol:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid AMQP 1-0 Protocol Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-amqp-1-0-protocol) org.apache.qpid:qpid-broker-plugins-amqp-1-0-protocol:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid AMQP 0-10 to 1-0 Message Conversion Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-amqp-msg-conv-0-10-to-1-0) org.apache.qpid:qpid-broker-plugins-amqp-msg-conv-0-10-to-1-0:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid AMQP 0-8 to 0-10 Message Conversion Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-amqp-msg-conv-0-8-to-0-10) org.apache.qpid:qpid-broker-plugins-amqp-msg-conv-0-8-to-0-10:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid AMQP 0-8 to 1-0 Message Conversion Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-amqp-msg-conv-0-8-to-1-0) org.apache.qpid:qpid-broker-plugins-amqp-msg-conv-0-8-to-1-0:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid Derby Message Store (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-derby-store) org.apache.qpid:qpid-broker-plugins-derby-store:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid JDBC Message Store Connection Pooling Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-jdbc-provider-bone) org.apache.qpid:qpid-broker-plugins-jdbc-provider-bone:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid JDBC Message Store Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-jdbc-store) org.apache.qpid:qpid-broker-plugins-jdbc-store:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid HTTP Management Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-management-http) org.apache.qpid:qpid-broker-plugins-management-http:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid JMX Management Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-management-jmx) org.apache.qpid:qpid-broker-plugins-management-jmx:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid Memory Message Store Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-memory-store) org.apache.qpid:qpid-broker-plugins-memory-store:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid WebSocket Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-websocket) org.apache.qpid:qpid-broker-plugins-websocket:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid Common (http://qpid.apache.org/qpid-java-build/management/qpid-common) org.apache.qpid:qpid-common:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid Management Common (http://qpid.apache.org/qpid-java-build/management/qpid-management-common) org.apache.qpid:qpid-management-common:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'The Dojo Foundation' (http://dojotoolkit.org/foundation) - - Dojo Toolkit :: Bundles (http://dojotoolkit.org) org.dojotoolkit:dojo:pom:1.9.1 - License: Academic Free License v2.1 (http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE) License: BSD License (http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE) - - - - diff --git a/qpid/java/broker/src/main/assembly/qpid-broker-bin.xml b/qpid/java/broker/src/main/assembly/qpid-broker-bin.xml deleted file mode 100644 index 4ec674c803..0000000000 --- a/qpid/java/broker/src/main/assembly/qpid-broker-bin.xml +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version='1.0'?> -<!-- - - 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. - ---> -<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> - <id>bin</id> - <formats> - <format>tar.gz</format> - </formats> - <baseDirectory>qpid-broker/${project.version}</baseDirectory> - <fileSets> - <fileSet> - <directory>${project.basedir}</directory> - <outputDirectory>/</outputDirectory> - <includes> - <include>etc/</include> - </includes> - <fileMode>0644</fileMode> - <directoryMode>0755</directoryMode> - </fileSet> - <fileSet> - <directory>${basedir}/src/main/assembly/</directory> - <outputDirectory>/</outputDirectory> - <includes> - <include>LICENSE</include> - <include>NOTICE</include> - <include>README.txt</include> - </includes> - <fileMode>0644</fileMode> - <directoryMode>0755</directoryMode> - </fileSet> - <fileSet> - <directory>${project.basedir}</directory> - <outputDirectory>/</outputDirectory> - <includes> - <include>bin/</include> - </includes> - <fileMode>0755</fileMode> - <directoryMode>0755</directoryMode> - </fileSet> - <fileSet> - <directory>${project.basedir}/../common</directory> - <outputDirectory>/</outputDirectory> - <includes> - <include>bin/qpid-run</include> - </includes> - <fileMode>0755</fileMode> - <directoryMode>0755</directoryMode> - </fileSet> - </fileSets> - <dependencySets> - <dependencySet> - <outputDirectory>/lib</outputDirectory> - <useProjectArtifact>true</useProjectArtifact> - </dependencySet> - </dependencySets> -</assembly> - diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java deleted file mode 100644 index 8e08492d68..0000000000 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java +++ /dev/null @@ -1,460 +0,0 @@ -/* - * - * 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.qpid.server; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URL; - -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.OptionBuilder; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; -import org.apache.commons.cli.PosixParser; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.apache.qpid.common.QpidProperties; -import org.apache.qpid.framing.ProtocolVersion; -import org.apache.qpid.server.configuration.IllegalConfigurationException; -import org.apache.qpid.server.util.Action; -import org.apache.qpid.server.util.StringUtil; -import org.apache.qpid.util.FileUtils; - -/** - * Main entry point for AMQPD. - * - */ -public class Main -{ - private static final int MANAGEMENT_MODE_PASSWORD_LENGTH = 10; - - private static final Option OPTION_HELP = new Option("h", "help", false, "print this message"); - - private static final Option OPTION_VERSION = new Option("v", "version", false, "print the version information and exit"); - - private static final Option OPTION_CONFIGURATION_STORE_PATH = OptionBuilder.withArgName("path").hasArg() - .withDescription("use given configuration store location").withLongOpt("store-path").create("sp"); - - private static final Option OPTION_CONFIGURATION_STORE_TYPE = OptionBuilder.withArgName("type").hasArg() - .withDescription("use given broker configuration store type").withLongOpt("store-type").create("st"); - - private static final Option OPTION_INITIAL_CONFIGURATION_PATH = OptionBuilder.withArgName("path").hasArg() - .withDescription("set the location of initial JSON config to use when creating/overwriting a broker configuration store").withLongOpt("initial-config-path").create("icp"); - - private static final Option OPTION_OVERWRITE_CONFIGURATION_STORE = OptionBuilder.withDescription("overwrite the broker configuration store with the current initial configuration") - .withLongOpt("overwrite-store").create("os"); - - private static final Option OPTION_CREATE_INITIAL_CONFIG = OptionBuilder.withArgName("path").hasOptionalArg().withDescription("create a copy of the initial config file, either to an" + - " optionally specified file path, or as " + BrokerOptions.DEFAULT_INITIAL_CONFIG_NAME + " in the current directory") - .withLongOpt("create-initial-config").create("cic"); - - private static final Option OPTION_CONFIGURATION_PROPERTY = OptionBuilder.withArgName("name=value").hasArg() - .withDescription("set a configuration property to use when resolving variables in the broker configuration store, with format \"name=value\"") - .withLongOpt("config-property").create("prop"); - - private static final Option OPTION_LOG_CONFIG_FILE = - OptionBuilder.withArgName("file").hasArg() - .withDescription("use the specified log4j xml configuration file. By " - + "default looks for a file named " + BrokerOptions.DEFAULT_LOG_CONFIG_FILE - + " in the same directory as the configuration file").withLongOpt("logconfig").create("l"); - - private static final Option OPTION_LOG_WATCH = - OptionBuilder.withArgName("period").hasArg() - .withDescription("monitor the log file configuration file for changes. Units are seconds. " - + "Zero means do not check for changes.").withLongOpt("logwatch").create("w"); - - private static final Option OPTION_MANAGEMENT_MODE = OptionBuilder.withDescription("start broker in management mode, disabling the AMQP ports") - .withLongOpt("management-mode").create("mm"); - private static final Option OPTION_MM_QUIESCE_VHOST = OptionBuilder.withDescription("make virtualhosts stay in the quiesced state during management mode.") - .withLongOpt("management-mode-quiesce-virtualhosts").create("mmqv"); - private static final Option OPTION_MM_RMI_PORT = OptionBuilder.withArgName("port").hasArg() - .withDescription("override jmx rmi registry port in management mode").withLongOpt("management-mode-rmi-registry-port").create("mmrmi"); - private static final Option OPTION_MM_CONNECTOR_PORT = OptionBuilder.withArgName("port").hasArg() - .withDescription("override jmx connector port in management mode").withLongOpt("management-mode-jmx-connector-port").create("mmjmx"); - private static final Option OPTION_MM_HTTP_PORT = OptionBuilder.withArgName("port").hasArg() - .withDescription("override http management port in management mode").withLongOpt("management-mode-http-port").create("mmhttp"); - private static final Option OPTION_MM_PASSWORD = OptionBuilder.withArgName("password").hasArg() - .withDescription("Set the password for the management mode user " + BrokerOptions.MANAGEMENT_MODE_USER_NAME).withLongOpt("management-mode-password").create("mmpass"); - - private static final Option OPTION_INITIAL_SYSTEM_PROPERTIES = OptionBuilder.withArgName("path").hasArg() - .withDescription("set the location of initial properties file to set otherwise unset system properties").withLongOpt("system-properties-file").create("props"); - - private static final Options OPTIONS = new Options(); - - static - { - OPTIONS.addOption(OPTION_HELP); - OPTIONS.addOption(OPTION_VERSION); - OPTIONS.addOption(OPTION_CONFIGURATION_STORE_PATH); - OPTIONS.addOption(OPTION_CONFIGURATION_STORE_TYPE); - OPTIONS.addOption(OPTION_OVERWRITE_CONFIGURATION_STORE); - OPTIONS.addOption(OPTION_CREATE_INITIAL_CONFIG); - OPTIONS.addOption(OPTION_LOG_CONFIG_FILE); - OPTIONS.addOption(OPTION_LOG_WATCH); - OPTIONS.addOption(OPTION_INITIAL_CONFIGURATION_PATH); - OPTIONS.addOption(OPTION_MANAGEMENT_MODE); - OPTIONS.addOption(OPTION_MM_QUIESCE_VHOST); - OPTIONS.addOption(OPTION_MM_RMI_PORT); - OPTIONS.addOption(OPTION_MM_CONNECTOR_PORT); - OPTIONS.addOption(OPTION_MM_HTTP_PORT); - OPTIONS.addOption(OPTION_MM_PASSWORD); - OPTIONS.addOption(OPTION_CONFIGURATION_PROPERTY); - OPTIONS.addOption(OPTION_INITIAL_SYSTEM_PROPERTIES); - } - - protected CommandLine _commandLine; - - public static void main(String[] args) - { - //if the -Dlog4j.configuration property has not been set, enable the init override - //to stop Log4J wondering off and picking up the first log4j.xml/properties file it - //finds from the classpath when we get the first Loggers - if(System.getProperty("log4j.configuration") == null) - { - System.setProperty("log4j.defaultInitOverride", "true"); - } - - new Main(args); - } - - public Main(final String[] args) - { - if (parseCommandline(args)) - { - try - { - execute(); - } - catch(Exception e) - { - System.err.println("Exception during startup: " + e); - e.printStackTrace(); - shutdown(1); - } - } - } - - protected boolean parseCommandline(final String[] args) - { - try - { - _commandLine = new PosixParser().parse(OPTIONS, args); - - return true; - } - catch (ParseException e) - { - System.err.println("Error: " + e.getMessage()); - HelpFormatter formatter = new HelpFormatter(); - formatter.printHelp("Qpid", OPTIONS, true); - - return false; - } - } - - protected void execute() throws Exception - { - BrokerOptions options = new BrokerOptions(); - - String initialProperties = _commandLine.getOptionValue(OPTION_INITIAL_SYSTEM_PROPERTIES.getOpt()); - if (initialProperties != null) - { - options.setInitialSystemProperties(initialProperties); - } - - String initialConfigLocation = _commandLine.getOptionValue(OPTION_INITIAL_CONFIGURATION_PATH.getOpt()); - if (initialConfigLocation != null) - { - options.setInitialConfigurationLocation(initialConfigLocation); - } - - //process the remaining options - if (_commandLine.hasOption(OPTION_HELP.getOpt())) - { - final HelpFormatter formatter = new HelpFormatter(); - formatter.printHelp("Qpid", OPTIONS, true); - } - else if (_commandLine.hasOption(OPTION_CREATE_INITIAL_CONFIG.getOpt())) - { - File destinationFile = null; - - String destinationOption = _commandLine.getOptionValue(OPTION_CREATE_INITIAL_CONFIG.getOpt()); - if (destinationOption != null) - { - destinationFile = new File(destinationOption); - } - else - { - destinationFile = new File(System.getProperty("user.dir"), BrokerOptions.DEFAULT_INITIAL_CONFIG_NAME); - } - - copyInitialConfigFile(options, destinationFile); - - System.out.println("Initial config written to: " + destinationFile.getAbsolutePath()); - } - else if (_commandLine.hasOption(OPTION_VERSION.getOpt())) - { - final StringBuilder protocol = new StringBuilder("AMQP version(s) [major.minor]: "); - boolean first = true; - for (final ProtocolVersion pv : ProtocolVersion.getSupportedProtocolVersions()) - { - if (first) - { - first = false; - } - else - { - protocol.append(", "); - } - - protocol.append(pv.getMajorVersion()).append('-').append(pv.getMinorVersion()); - } - System.out.println(QpidProperties.getVersionString() + " (" + protocol + ")"); - } - else - { - String[] configPropPairs = _commandLine.getOptionValues(OPTION_CONFIGURATION_PROPERTY.getOpt()); - if(configPropPairs != null && configPropPairs.length > 0) - { - for(String s : configPropPairs) - { - int firstEquals = s.indexOf("="); - if(firstEquals == -1) - { - throw new IllegalArgumentException("Configuration property argument is not of the format name=value: " + s); - } - String name = s.substring(0, firstEquals); - String value = s.substring(firstEquals + 1); - - if(name.equals("")) - { - throw new IllegalArgumentException("Configuration property argument is not of the format name=value: " + s); - } - - options.setConfigProperty(name, value); - } - } - - String configurationStore = _commandLine.getOptionValue(OPTION_CONFIGURATION_STORE_PATH.getOpt()); - if (configurationStore != null) - { - options.setConfigurationStoreLocation(configurationStore); - } - - String configurationStoreType = _commandLine.getOptionValue(OPTION_CONFIGURATION_STORE_TYPE.getOpt()); - if (configurationStoreType != null) - { - options.setConfigurationStoreType(configurationStoreType); - } - - String logWatchConfig = _commandLine.getOptionValue(OPTION_LOG_WATCH.getOpt()); - if(logWatchConfig != null) - { - options.setLogWatchFrequency(Integer.parseInt(logWatchConfig)); - } - - String logConfig = _commandLine.getOptionValue(OPTION_LOG_CONFIG_FILE.getOpt()); - if(logConfig != null) - { - options.setLogConfigFileLocation(logConfig); - } - - boolean overwriteConfigurationStore = _commandLine.hasOption(OPTION_OVERWRITE_CONFIGURATION_STORE.getOpt()); - options.setOverwriteConfigurationStore(overwriteConfigurationStore); - - boolean managementMode = _commandLine.hasOption(OPTION_MANAGEMENT_MODE.getOpt()); - if (managementMode) - { - options.setManagementMode(true); - String rmiPort = _commandLine.getOptionValue(OPTION_MM_RMI_PORT.getOpt()); - if (rmiPort != null) - { - options.setManagementModeRmiPortOverride(Integer.parseInt(rmiPort)); - } - String connectorPort = _commandLine.getOptionValue(OPTION_MM_CONNECTOR_PORT.getOpt()); - if (connectorPort != null) - { - options.setManagementModeJmxPortOverride(Integer.parseInt(connectorPort)); - } - String httpPort = _commandLine.getOptionValue(OPTION_MM_HTTP_PORT.getOpt()); - if (httpPort != null) - { - options.setManagementModeHttpPortOverride(Integer.parseInt(httpPort)); - } - - boolean quiesceVhosts = _commandLine.hasOption(OPTION_MM_QUIESCE_VHOST.getOpt()); - options.setManagementModeQuiesceVirtualHosts(quiesceVhosts); - - String password = _commandLine.getOptionValue(OPTION_MM_PASSWORD.getOpt()); - if (password == null) - { - password = new StringUtil().randomAlphaNumericString(MANAGEMENT_MODE_PASSWORD_LENGTH); - } - options.setManagementModePassword(password); - } - setExceptionHandler(); - - startBroker(options); - } - } - - private void copyInitialConfigFile(final BrokerOptions options, final File destinationFile) - { - String initialConfigLocation = options.getInitialConfigurationLocation(); - URL url = null; - try - { - url = new URL(initialConfigLocation); - } - catch (MalformedURLException e) - { - File locationFile = new File(initialConfigLocation); - try - { - url = locationFile.toURI().toURL(); - } - catch (MalformedURLException e1) - { - throw new IllegalConfigurationException("Cannot create URL for file " + locationFile, e1); - } - } - InputStream in = null; - try - { - in = url.openStream(); - FileUtils.copy(in, destinationFile); - } - catch (IOException e) - { - throw new IllegalConfigurationException("Cannot create file " + destinationFile - + " by copying initial config from " + initialConfigLocation, e); - } - finally - { - if (in != null) - { - try - { - in.close(); - } - catch (IOException e) - { - throw new IllegalConfigurationException("Cannot close initial config input stream: " + initialConfigLocation, e); - } - } - } - } - - protected void setExceptionHandler() - { - Thread.UncaughtExceptionHandler handler = null; - String handlerClass = System.getProperty("qpid.broker.exceptionHandler"); - if(handlerClass != null) - { - try - { - handler = (Thread.UncaughtExceptionHandler) Class.forName(handlerClass).newInstance(); - } - catch (ClassNotFoundException e) - { - - } - catch (InstantiationException e) - { - - } - catch (IllegalAccessException e) - { - - } - catch (ClassCastException e) - { - - } - } - - if(handler == null) - { - handler = - new Thread.UncaughtExceptionHandler() - { - public void uncaughtException(final Thread t, final Throwable e) - { - boolean continueOnError = Boolean.getBoolean("qpid.broker.exceptionHandler.continue"); - try - { - System.err.println("########################################################################"); - System.err.println("#"); - System.err.print("# Unhandled Exception "); - System.err.print(e.toString()); - System.err.print(" in Thread "); - System.err.println(t.getName()); - System.err.println("#"); - System.err.println(continueOnError ? "# Forced to continue by JVM setting 'qpid.broker.exceptionHandler.continue'" : "# Exiting"); - System.err.println("#"); - System.err.println("########################################################################"); - e.printStackTrace(System.err); - - Logger logger = LoggerFactory.getLogger("org.apache.qpid.server.Main"); - logger.error("Uncaught exception, " + (continueOnError ? "continuing." : "shutting down."), e); - } - finally - { - if (!continueOnError) - { - Runtime.getRuntime().halt(1); - } - } - - } - }; - - Thread.setDefaultUncaughtExceptionHandler(handler); - } - } - - protected void startBroker(final BrokerOptions options) throws Exception - { - Broker broker = new Broker(new Action<Integer>() - { - @Override - public void performAction(final Integer exitStatusCode) - { - if (exitStatusCode != 0) - { - shutdown(exitStatusCode); - } - } - }); - broker.startup(options); - } - - protected void shutdown(final int status) - { - System.exit(status); - } - -} diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/MainTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/MainTest.java deleted file mode 100644 index 636048cac2..0000000000 --- a/qpid/java/broker/src/test/java/org/apache/qpid/server/MainTest.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * - * 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.qpid.server; - -import java.io.File; -import java.util.Map; - -import org.apache.commons.cli.CommandLine; -import org.apache.qpid.server.configuration.BrokerProperties; -import org.apache.qpid.test.utils.QpidTestCase; - -/** - * Test to verify the command line parsing within the Main class, by - * providing it a series of command line arguments and verifying the - * BrokerOptions emerging for use in starting the Broker instance. - */ -public class MainTest extends QpidTestCase -{ - private Exception _startupException; - - public void testNoOptionsSpecified() - { - String qpidWork = "/qpid/work"; - setTestSystemProperty(BrokerProperties.PROPERTY_QPID_WORK, qpidWork); - String qpidHome = "/qpid/home"; - setTestSystemProperty(BrokerProperties.PROPERTY_QPID_HOME, qpidHome); - - String expectedStorePath = new File(qpidWork, BrokerOptions.DEFAULT_CONFIG_NAME_PREFIX + ".json").getAbsolutePath(); - String expectedLogConfigPath = new File(qpidHome, BrokerOptions.DEFAULT_LOG_CONFIG_FILE).getAbsolutePath(); - - BrokerOptions options = startDummyMain(""); - - assertEquals("JSON", options.getConfigurationStoreType()); - assertEquals(expectedStorePath, options.getConfigurationStoreLocation()); - assertEquals(expectedLogConfigPath, options.getLogConfigFileLocation()); - assertEquals(0, options.getLogWatchFrequency()); - assertEquals(BrokerOptions.DEFAULT_INITIAL_CONFIG_LOCATION, options.getInitialConfigurationLocation()); - assertFalse(options.isOverwriteConfigurationStore()); - assertFalse(options.isManagementMode()); - assertEquals(0, options.getManagementModeJmxPortOverride()); - assertEquals(0, options.getManagementModeRmiPortOverride()); - assertEquals(0, options.getManagementModeHttpPortOverride()); - } - - public void testConfigurationStoreLocation() - { - BrokerOptions options = startDummyMain("-sp abcd/config.xml"); - assertEquals("abcd/config.xml", options.getConfigurationStoreLocation()); - - options = startDummyMain("-store-path abcd/config2.xml"); - assertEquals("abcd/config2.xml", options.getConfigurationStoreLocation()); - } - - public void testConfigurationStoreType() - { - BrokerOptions options = startDummyMain("-st dby"); - assertEquals("dby", options.getConfigurationStoreType()); - - options = startDummyMain("-store-type bdb"); - assertEquals("bdb", options.getConfigurationStoreType()); - } - - public void testOverwriteConfigurationStore() - { - BrokerOptions options = startDummyMain("-os"); - assertTrue(options.isOverwriteConfigurationStore()); - - options = startDummyMain("-overwrite-store"); - assertTrue(options.isOverwriteConfigurationStore()); - } - - public void testLogConfig() - { - BrokerOptions options = startDummyMain("-l wxyz/log4j.xml"); - - assertEquals("wxyz/log4j.xml", options.getLogConfigFileLocation()); - } - - public void testLogWatch() - { - BrokerOptions options = startDummyMain("-w 9"); - - assertEquals(9, options.getLogWatchFrequency()); - } - - public void testVersion() - { - final TestMain main = new TestMain("-v".split("\\s")); - - assertNotNull("Command line not parsed correctly", main.getCommandLine()); - assertTrue("Parsed command line didnt pick up version option", main.getCommandLine().hasOption("v")); - } - - public void testHelp() - { - final TestMain main = new TestMain("-h".split("\\s")); - - assertNotNull("Command line not parsed correctly", main.getCommandLine()); - assertTrue("Parsed command line didnt pick up help option", main.getCommandLine().hasOption("h")); - } - - public void testInitailConfigurationLocation() - { - BrokerOptions options = startDummyMain("-icp abcd/initial-config.json"); - assertEquals("abcd/initial-config.json", options.getInitialConfigurationLocation()); - - options = startDummyMain("-initial-config-path abcd/initial-config.json"); - assertEquals("abcd/initial-config.json", options.getInitialConfigurationLocation()); - } - - public void testManagementMode() - { - BrokerOptions options = startDummyMain("-mm"); - assertTrue(options.isManagementMode()); - - options = startDummyMain("--management-mode"); - assertTrue(options.isManagementMode()); - } - - public void testManagementModeRmiPortOverride() - { - BrokerOptions options = startDummyMain("-mm -mmrmi 7777"); - assertTrue(options.isManagementMode()); - assertEquals(7777, options.getManagementModeRmiPortOverride()); - - options = startDummyMain("-mm --management-mode-rmi-registry-port 7777"); - assertTrue(options.isManagementMode()); - assertEquals(7777, options.getManagementModeRmiPortOverride()); - - options = startDummyMain("-mmrmi 7777"); - assertEquals(0, options.getManagementModeRmiPortOverride()); - } - - public void testManagementModeJmxPortOverride() - { - BrokerOptions options = startDummyMain("-mm -mmjmx 8888"); - assertTrue(options.isManagementMode()); - assertEquals(8888, options.getManagementModeJmxPortOverride()); - - options = startDummyMain("-mm --management-mode-jmx-connector-port 8888"); - assertTrue(options.isManagementMode()); - assertEquals(8888, options.getManagementModeJmxPortOverride()); - - options = startDummyMain("-mmjmx 8888"); - assertEquals(0, options.getManagementModeJmxPortOverride()); - } - - public void testManagementModeHttpPortOverride() - { - BrokerOptions options = startDummyMain("-mm -mmhttp 9999"); - assertTrue(options.isManagementMode()); - assertEquals(9999, options.getManagementModeHttpPortOverride()); - - options = startDummyMain("-mm --management-mode-http-port 9999"); - assertTrue(options.isManagementMode()); - assertEquals(9999, options.getManagementModeHttpPortOverride()); - - options = startDummyMain("-mmhttp 9999"); - assertEquals(0, options.getManagementModeHttpPortOverride()); - } - - public void testManagementModePassword() - { - String password = getTestName(); - BrokerOptions options = startDummyMain("-mm -mmpass " + password); - assertTrue(options.isManagementMode()); - assertEquals(password, options.getManagementModePassword()); - - options = startDummyMain("-mm --management-mode-password " + password); - assertTrue(options.isManagementMode()); - assertEquals(password, options.getManagementModePassword()); - - options = startDummyMain("-mm -mmpass " + password); - assertNotNull(options.getManagementModePassword()); - } - - public void testDefaultManagementModePassword() - { - BrokerOptions options = startDummyMain("-mm"); - assertTrue(options.isManagementMode()); - assertNotNull(options.getManagementModePassword()); - } - - public void testSetConfigProperties() - { - //short name - String newPort = "12345"; - BrokerOptions options = startDummyMain("-prop name=value -prop " + org.apache.qpid.server.model.Broker.QPID_AMQP_PORT + "=" + newPort); - - Map<String, String> props = options.getConfigProperties(); - - assertEquals(newPort, props.get(org.apache.qpid.server.model.Broker.QPID_AMQP_PORT)); - assertEquals("value", props.get("name")); - - //long name - newPort = "678910"; - options = startDummyMain("--config-property name2=value2 --config-property " + org.apache.qpid.server.model.Broker.QPID_AMQP_PORT + "=" + newPort); - - props = options.getConfigProperties(); - - assertEquals(newPort, props.get(org.apache.qpid.server.model.Broker.QPID_AMQP_PORT)); - assertEquals("value2", props.get("name2")); - } - - public void testSetConfigPropertiesInvalidFormat() - { - //missing equals - startDummyMain("-prop namevalue"); - assertTrue("expected exception did not occur", - _startupException instanceof IllegalArgumentException); - - //no name specified - startDummyMain("-prop =value"); - assertTrue("expected exception did not occur", - _startupException instanceof IllegalArgumentException); - } - - private BrokerOptions startDummyMain(String commandLine) - { - return (new TestMain(commandLine.split("\\s"))).getOptions(); - } - - private class TestMain extends Main - { - private BrokerOptions _options; - - public TestMain(String[] args) - { - super(args); - } - - @Override - protected void execute() - { - try - { - super.execute(); - } - catch(Exception re) - { - MainTest.this._startupException = re; - } - } - - @Override - protected void startBroker(BrokerOptions options) - { - _options = options; - } - - @Override - protected void setExceptionHandler() - { - } - - public BrokerOptions getOptions() - { - return _options; - } - - public CommandLine getCommandLine() - { - return _commandLine; - } - } -} |
