You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@onami.apache.org by si...@apache.org on 2013/07/14 23:55:31 UTC
svn commit: r1503069 [1/2] - in /onami/sandbox/console: ./ src/ src/main/
src/main/assembly/ src/main/java/ src/main/java/org/
src/main/java/org/apache/ src/main/java/org/apache/onami/
src/main/java/org/apache/onami/console/ src/main/java/org/apache/on...
Author: simonetripodi
Date: Sun Jul 14 21:55:30 2013
New Revision: 1503069
URL: http://svn.apache.org/r1503069
Log:
initial checkin of an experimental console runner based on Guice and other Onami components
Added:
onami/sandbox/console/ (with props)
onami/sandbox/console/LICENSE (with props)
onami/sandbox/console/NOTICE (with props)
onami/sandbox/console/pom.xml (with props)
onami/sandbox/console/src/
onami/sandbox/console/src/main/
onami/sandbox/console/src/main/assembly/
onami/sandbox/console/src/main/assembly/LICENSE-with-deps
onami/sandbox/console/src/main/assembly/NOTICE-with-deps
onami/sandbox/console/src/main/assembly/README (with props)
onami/sandbox/console/src/main/assembly/bin.xml (with props)
onami/sandbox/console/src/main/assembly/license-header.txt (with props)
onami/sandbox/console/src/main/java/
onami/sandbox/console/src/main/java/org/
onami/sandbox/console/src/main/java/org/apache/
onami/sandbox/console/src/main/java/org/apache/onami/
onami/sandbox/console/src/main/java/org/apache/onami/console/
onami/sandbox/console/src/main/java/org/apache/onami/console/OnamiConsole.java (with props)
onami/sandbox/console/src/main/java/org/apache/onami/console/commands/
onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Config.java (with props)
onami/sandbox/console/src/main/java/org/apache/onami/console/commands/ConsoleRunner.java (with props)
onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Exit.java (with props)
onami/sandbox/console/src/main/java/org/apache/onami/console/commands/History.java (with props)
onami/sandbox/console/src/main/java/org/apache/onami/console/commands/ShutdownHook.java (with props)
onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Version.java (with props)
onami/sandbox/console/src/main/java/org/apache/onami/console/commands/package-info.java (with props)
onami/sandbox/console/src/main/java/org/apache/onami/console/modules/
onami/sandbox/console/src/main/java/org/apache/onami/console/modules/BasicConfigurationModule.java (with props)
onami/sandbox/console/src/main/java/org/apache/onami/console/modules/package-info.java (with props)
onami/sandbox/console/src/main/java/org/apache/onami/console/package-info.java (with props)
onami/sandbox/console/src/main/mdo/
onami/sandbox/console/src/main/mdo/console.mdo
onami/sandbox/console/src/main/resources/
onami/sandbox/console/src/main/resources/META-INF/
onami/sandbox/console/src/main/resources/META-INF/services/
onami/sandbox/console/src/main/resources/META-INF/services/com.google.inject.Module
onami/sandbox/console/src/main/resources/META-INF/services/java.lang.Runnable
onami/sandbox/console/src/main/resources/logback-config.xml (with props)
Propchange: onami/sandbox/console/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Jul 14 21:55:30 2013
@@ -0,0 +1,2 @@
+.settings
+target
Added: onami/sandbox/console/LICENSE
URL: http://svn.apache.org/viewvc/onami/sandbox/console/LICENSE?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/LICENSE (added)
+++ onami/sandbox/console/LICENSE Sun Jul 14 21:55:30 2013
@@ -0,0 +1,202 @@
+
+ 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.
\ No newline at end of file
Propchange: onami/sandbox/console/LICENSE
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: onami/sandbox/console/LICENSE
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: onami/sandbox/console/LICENSE
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: onami/sandbox/console/NOTICE
URL: http://svn.apache.org/viewvc/onami/sandbox/console/NOTICE?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/NOTICE (added)
+++ onami/sandbox/console/NOTICE Sun Jul 14 21:55:30 2013
@@ -0,0 +1,5 @@
+Apache Onami-Console
+Copyright 2013 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
Propchange: onami/sandbox/console/NOTICE
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: onami/sandbox/console/NOTICE
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: onami/sandbox/console/NOTICE
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: onami/sandbox/console/pom.xml
URL: http://svn.apache.org/viewvc/onami/sandbox/console/pom.xml?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/pom.xml (added)
+++ onami/sandbox/console/pom.xml Sun Jul 14 21:55:30 2013
@@ -0,0 +1,326 @@
+<?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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.onami</groupId>
+ <artifactId>org.apache.onami.parent</artifactId>
+ <version>5-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.apache.onami.console</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+
+ <name>Apache Onami Console</name>
+ <description>Apache Onami-Console ... TODO</description>
+ <url>http://onami.apache.org/console/</url>
+
+ <scm>
+ <url>https://svn.apache.org/viewvc/onami/trunk/console</url>
+ <connection>scm:svn:https://svn.apache.org/repos/asf/onami/trunk/console</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/onami/trunk/console</developerConnection>
+ </scm>
+ <issueManagement>
+ <system>JIRA</system>
+ <url>https://issues.apache.org/jira/browse/ONAMI/component/12320011</url>
+ </issueManagement>
+ <ciManagement>
+ <system>Jenkins</system>
+ <url>https://builds.apache.org/job/Onami-Console/</url>
+ <notifiers>
+ <notifier>
+ <type>mail</type>
+ <sendOnError>true</sendOnError>
+ <sendOnFailure>true</sendOnFailure>
+ <sendOnSuccess>false</sendOnSuccess>
+ <sendOnWarning>false</sendOnWarning>
+ <configuration>
+ <address>dev@onami.apache.org</address>
+ </configuration>
+ </notifier>
+ </notifiers>
+ </ciManagement>
+ <distributionManagement>
+ <site>
+ <id>apache.website.svnpub</id>
+ <url>scm:svn:https://svn.apache.org/repos/asf/onami/site/console</url>
+ </site>
+ </distributionManagement>
+
+ <properties>
+ <onami.logging.version>3.4.0-incubating</onami.logging.version>
+ </properties>
+
+ <dependencies>
+ <!--
+ | THE cli parser
+ -->
+ <dependency>
+ <groupId>io.airlift</groupId>
+ <artifactId>airline</artifactId>
+ <version>0.5</version>
+ </dependency>
+
+ <!--
+ | @Inject
+ -->
+ <dependency>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <!--
+ | logging world
+ -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.5</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.0.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.onami.logging</groupId>
+ <artifactId>org.apache.onami.logging.core</artifactId>
+ <version>${onami.logging.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.onami.logging</groupId>
+ <artifactId>org.apache.onami.logging.slf4j</artifactId>
+ <version>${onami.logging.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!--
+ | configuration - all users need to configure components
+ -->
+ <dependency>
+ <groupId>org.apache.onami</groupId>
+ <artifactId>org.apache.onami.configuration</artifactId>
+ <version>6.3.0</version>
+ </dependency>
+
+ <!--
+ | discover commands and modules just declaring them!
+ -->
+ <dependency>
+ <groupId>org.apache.onami.spi</groupId>
+ <artifactId>org.apache.onami.spi.all</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+
+ <!--
+ | read from console
+ -->
+ <dependency>
+ <groupId>jline</groupId>
+ <artifactId>jline</artifactId>
+ <version>2.11</version>
+ </dependency>
+
+ <!--
+ | textual representation of console configuration
+ -->
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ <version>2.2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ <version>1.12</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.10</version>
+ </dependency>
+
+ <!--
+ | Test dependencies
+ -->
+ <dependency>
+ <groupId>org.apache.onami</groupId>
+ <artifactId>org.apache.onami.test</artifactId>
+ <version>1.4.0-incubating</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>${basedir}</directory>
+ <targetPath>META-INF</targetPath>
+ <includes>
+ <include>LICENSE</include>
+ <include>NOTICE</include>
+ </includes>
+ </resource>
+
+ <resource>
+ <directory>${basedir}/src/main/resources</directory>
+ </resource>
+ </resources>
+
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-maven-plugin</artifactId>
+ <version>1.8-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>generate-sources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>java</goal>
+ <!-- json -->
+ <goal>jackson-reader</goal>
+ <goal>jsonschema</goal>
+ <!-- yaml -->
+ <goal>snakeyaml-reader</goal>
+ <!-- xml -->
+ <goal>xpp3-reader</goal>
+ <goal>xsd</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <version>1.0.0</version>
+ <useJava5>true</useJava5>
+ <models>
+ <model>src/main/mdo/console.mdo</model>
+ </models>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>appassembler-maven-plugin</artifactId>
+ <version>1.4</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>assemble</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <programs>
+ <program>
+ <mainClass>org.apache.onami.console.OnamiConsole</mainClass>
+ <name>ocr</name>
+ </program>
+ </programs>
+ <repositoryLayout>flat</repositoryLayout>
+ <repositoryName>lib</repositoryName>
+ <extraJvmArguments>-server -Dproject.artifactId=${project.artifactId} -Dproject.version=${project.version} -Xms500m -Xmx500m -XX:PermSize=128m -XX:-UseGCOverheadLimit</extraJvmArguments>
+ <licenseHeaderFile>${basedir}/src/main/assembly/license-header.txt</licenseHeaderFile>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <attach>true</attach>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>${basedir}/src/main/assembly/bin.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <configuration>
+ <locales>en</locales>
+ <skipDeploy>true</skipDeploy>
+ </configuration>
+ <executions>
+ <execution>
+ <id>attach-descriptor</id>
+ <goals>
+ <goal>attach-descriptor</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>stage-for-scm-publish</id>
+ <phase>post-site</phase>
+ <goals>
+ <goal>stage</goal>
+ </goals>
+ <configuration>
+ <skipDeploy>false</skipDeploy>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-scm-publish-plugin</artifactId>
+ <inherited>false</inherited>
+ <configuration>
+ <checkinComment>Onami Configuration site deployment</checkinComment>
+ <checkoutDirectory>${user.home}/onami-sites/onami-console-site</checkoutDirectory>
+ </configuration>
+ <executions>
+ <execution>
+ <id>scm-publish</id>
+ <phase>site-deploy</phase>
+ <goals>
+ <goal>publish-scm</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Propchange: onami/sandbox/console/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: onami/sandbox/console/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: onami/sandbox/console/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: onami/sandbox/console/src/main/assembly/LICENSE-with-deps
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/assembly/LICENSE-with-deps?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/src/main/assembly/LICENSE-with-deps (added)
+++ onami/sandbox/console/src/main/assembly/LICENSE-with-deps Sun Jul 14 21:55:30 2013
@@ -0,0 +1,202 @@
+
+ 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.
\ No newline at end of file
Added: onami/sandbox/console/src/main/assembly/NOTICE-with-deps
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/assembly/NOTICE-with-deps?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/src/main/assembly/NOTICE-with-deps (added)
+++ onami/sandbox/console/src/main/assembly/NOTICE-with-deps Sun Jul 14 21:55:30 2013
@@ -0,0 +1,5 @@
+Apache Onami-Console
+Copyright 2013 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
Added: onami/sandbox/console/src/main/assembly/README
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/assembly/README?rev=1503069&view=auto
==============================================================================
(empty)
Propchange: onami/sandbox/console/src/main/assembly/README
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: onami/sandbox/console/src/main/assembly/README
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: onami/sandbox/console/src/main/assembly/README
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: onami/sandbox/console/src/main/assembly/bin.xml
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/assembly/bin.xml?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/src/main/assembly/bin.xml (added)
+++ onami/sandbox/console/src/main/assembly/bin.xml Sun Jul 14 21:55:30 2013
@@ -0,0 +1,74 @@
+<?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.
+-->
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+
+ <id>bin</id>
+ <formats>
+ <format>tar.gz</format>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>true</includeBaseDirectory>
+ <baseDirectory>${project.build.finalName}</baseDirectory>
+
+ <files>
+ <file>
+ <source>${basedir}/src/main/assembly/README</source>
+ <filtered>true</filtered>
+ <outputDirectory>/</outputDirectory>
+ <fileMode>666</fileMode>
+ </file>
+ <file>
+ <source>${basedir}/src/main/assembly/LICENSE-with-deps</source>
+ <destName>LICENSE</destName>
+ <outputDirectory>/</outputDirectory>
+ <fileMode>666</fileMode>
+ </file>
+ <file>
+ <source>${basedir}/src/main/assembly/NOTICE-with-deps</source>
+ <destName>NOTICE.txt</destName>
+ <outputDirectory>/</outputDirectory>
+ <fileMode>666</fileMode>
+ </file>
+ </files>
+
+ <fileSets>
+ <!--
+ | shell scripts
+ -->
+ <fileSet>
+ <directory>${project.build.directory}/appassembler/bin/</directory>
+ <outputDirectory>/bin</outputDirectory>
+ <fileMode>755</fileMode>
+ </fileSet>
+
+ <!--
+ | core libraries
+ -->
+ <fileSet>
+ <directory>${project.build.directory}/appassembler/lib/</directory>
+ <outputDirectory>/lib</outputDirectory>
+ <excludes>
+ <exclude>*.xml</exclude>
+ </excludes>
+ </fileSet>
+ </fileSets>
+
+</assembly>
Propchange: onami/sandbox/console/src/main/assembly/bin.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: onami/sandbox/console/src/main/assembly/bin.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: onami/sandbox/console/src/main/assembly/bin.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: onami/sandbox/console/src/main/assembly/license-header.txt
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/assembly/license-header.txt?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/src/main/assembly/license-header.txt (added)
+++ onami/sandbox/console/src/main/assembly/license-header.txt Sun Jul 14 21:55:30 2013
@@ -0,0 +1,16 @@
+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.
\ No newline at end of file
Propchange: onami/sandbox/console/src/main/assembly/license-header.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: onami/sandbox/console/src/main/java/org/apache/onami/console/OnamiConsole.java
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/java/org/apache/onami/console/OnamiConsole.java?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/src/main/java/org/apache/onami/console/OnamiConsole.java (added)
+++ onami/sandbox/console/src/main/java/org/apache/onami/console/OnamiConsole.java Sun Jul 14 21:55:30 2013
@@ -0,0 +1,57 @@
+package org.apache.onami.console;
+
+/*
+ * 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.
+ */
+
+import static java.lang.System.out;
+import static java.lang.System.getProperty;
+
+import org.apache.onami.console.commands.ConsoleRunner;
+import org.apache.onami.console.commands.Version;
+
+import io.airlift.command.Cli;
+import io.airlift.command.Help;
+import io.airlift.command.ParseArgumentsUnexpectedException;
+
+public final class OnamiConsole
+{
+
+ /**
+ * @param args
+ */
+ public static void main( String[] args )
+ {
+ try
+ {
+ Cli.<Runnable> builder( getProperty( "app.name" ) )
+ .withCommand( Help.class )
+ .withCommand( ConsoleRunner.class )
+ .withCommand( Version.class )
+ .withDefaultCommand( Help.class )
+ .build()
+ .parse( args )
+ .run();
+ }
+ catch ( ParseArgumentsUnexpectedException e )
+ {
+ out.println( "Input command not recognized: " + e.getMessage() );
+ }
+ }
+
+}
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/OnamiConsole.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/OnamiConsole.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/OnamiConsole.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Config.java
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Config.java?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Config.java (added)
+++ onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Config.java Sun Jul 14 21:55:30 2013
@@ -0,0 +1,88 @@
+package org.apache.onami.console.commands;
+
+/*
+ * 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.
+ */
+
+import io.airlift.command.Command;
+
+import java.util.Map.Entry;
+
+import org.apache.onami.logging.core.InjectLogger;
+import org.slf4j.Logger;
+
+import com.google.inject.Binding;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import com.google.inject.Key;
+import com.google.inject.TypeLiteral;
+import com.google.inject.name.Named;
+
+@Command( name = "config", description = "Print configured variables." )
+public final class Config
+ implements Runnable
+{
+
+ private final TypeLiteral<String> stringLiteral = new TypeLiteral<String>(){};
+
+ @Inject
+ private Injector injector;
+
+ @InjectLogger
+ private Logger logger;
+
+ public void setInjector( Injector injector )
+ {
+ this.injector = injector;
+ }
+
+ public void setLogger( Logger logger )
+ {
+ this.logger = logger;
+ }
+
+ public void run()
+ {
+ for ( Entry<Key<?>, Binding<?>> binding : injector.getAllBindings().entrySet() )
+ {
+ Key<?> bindingKey = binding.getKey();
+
+ if ( stringLiteral.equals( bindingKey.getTypeLiteral() )
+ && bindingKey.getAnnotation() != null
+ && ( Named.class.isAssignableFrom( bindingKey.getAnnotationType() )
+ || javax.inject.Named.class.isAssignableFrom( bindingKey.getAnnotationType() ) ) )
+ {
+ String propertyKey;
+
+ if ( Named.class.isAssignableFrom( bindingKey.getAnnotationType() ) )
+ {
+ propertyKey = ( (Named) bindingKey.getAnnotation() ).value();
+ }
+ else
+ {
+ propertyKey = ( (javax.inject.Named) bindingKey.getAnnotation() ).value();
+ }
+
+ String propertyValue = (String) binding.getValue().getProvider().get();
+
+ logger.info( "{}={}", new Object[] { propertyKey, propertyValue } );
+ }
+ }
+ }
+
+}
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Config.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Config.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Config.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/ConsoleRunner.java
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/java/org/apache/onami/console/commands/ConsoleRunner.java?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/src/main/java/org/apache/onami/console/commands/ConsoleRunner.java (added)
+++ onami/sandbox/console/src/main/java/org/apache/onami/console/commands/ConsoleRunner.java Sun Jul 14 21:55:30 2013
@@ -0,0 +1,208 @@
+package org.apache.onami.console.commands;
+
+/*
+ * 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.
+ */
+
+import static org.apache.onami.configuration.OnamiVariablesExpander.expandVariables;
+import static java.lang.System.err;
+import static com.google.inject.Guice.createInjector;
+import static java.lang.Runtime.getRuntime;
+import static java.lang.System.getProperty;
+import static java.lang.System.setProperty;
+import static org.apache.onami.spi.core.ServiceLoader.load;
+import static org.apache.onami.spi.modules.GuiceServiceLoader.loadModules;
+import static org.slf4j.LoggerFactory.getILoggerFactory;
+import static org.slf4j.LoggerFactory.getLogger;
+import io.airlift.command.Cli;
+import io.airlift.command.Command;
+import io.airlift.command.Help;
+import io.airlift.command.Option;
+import io.airlift.command.ParseArgumentsUnexpectedException;
+
+import java.io.File;
+
+import jline.console.ConsoleReader;
+import jline.console.history.FileHistory;
+
+import org.slf4j.Logger;
+
+import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.classic.joran.JoranConfigurator;
+import ch.qos.logback.core.joran.spi.JoranException;
+
+import com.google.inject.Injector;
+
+@Command( name = "run" )
+public final class ConsoleRunner
+ implements Runnable
+{
+
+ private static final String ARGS_SEPARATOR = "\\s";
+
+ private static final String PROMPT = "$ ";
+
+ private final Logger logger = getLogger( getClass() );
+
+ @Option( name = { "-q", "--quiet" }, description = "Long errors only." )
+ private boolean quiet;
+
+ @Option( name = { "-v", "--verbose" }, description = "Produce execution debug output." )
+ public boolean verbose;
+
+ public void run()
+ {
+ setupLogging();
+
+ logger.info( "" );
+ logger.info( " ''~``" );
+ logger.info( " ( o o )" );
+ logger.info( "+------------------.oooO--(_)--Oooo.------------------+" );
+ logger.info( "" );
+ logger.info( "{} v{}",
+ new Object[] {
+ getProperty( "project.artifactId" ),
+ getProperty( "project.version" )
+ } );
+ logger.info( "" );
+ logger.info( " .oooO " );
+ logger.info( " ( ) Oooo. " );
+ logger.info( "+---------------------\\ (----( )--------------------+" );
+ logger.info( " \\_) ) /" );
+ logger.info( " (_/" );
+
+ try
+ {
+ String appName = getProperty( "app.name" );
+
+ File onamiConsoleRunnerDir = new File( getProperty( "user.home" ), '.' + appName );
+
+ ConsoleReader consoleReader = newConsoleReader( onamiConsoleRunnerDir );
+
+ // TODO plug Eclipse Aether
+ File repositoryDir = new File( onamiConsoleRunnerDir, "repository" );
+
+ // setup the injector by discovering modules automatically
+
+ Injector injector = createInjector( expandVariables( loadModules() ) );
+
+ // setup the CLI parser by discovering commands automatically
+
+ Cli<Runnable> gitParser = Cli.<Runnable> builder( appName )
+ .withCommands( load( Runnable.class ) )
+ .withCommand( Help.class )
+ .withDefaultCommand( Help.class ).build();
+
+ // run!
+
+ executeCommands( consoleReader, gitParser, injector );
+ }
+ catch ( Throwable t )
+ {
+ // something went really bad, the console cannot be run
+ err.println( "Ouch, that's embarassing..." );
+ err.println( "Apache Onami Console crashed, please report the following details to Apache Onami developers team!" );
+ err.println( "+-----------------------------------------------------+" );
+ t.printStackTrace( err );
+ err.println( "+-----------------------------------------------------+" );
+ err.println( "Please fill an issue on error on issues.apache.org/jira/browse/ONAMI, if the same error has not reported already, or" );
+ err.println( "drop an email to users@onami.apache.org to see how other users managed that error, or" );
+ err.println( "drop an email to users@onami.apache.org to keep in touch with developers." );
+ }
+ }
+
+ private void setupLogging()
+ {
+ if ( quiet )
+ {
+ setProperty( "log.level", "ERROR" );
+ setProperty( "log.pattern", "$ [%level] %message%n" );
+ }
+ else if ( verbose )
+ {
+ setProperty( "log.level", "DEBUG" );
+ setProperty( "log.pattern", "$ %date{ISO8601} [%level] [%thread] %message%n" );
+ }
+ else
+ {
+ setProperty( "log.level", "INFO" );
+ setProperty( "log.pattern", "$ %message%n" );
+ }
+
+ // assume SLF4J is bound to logback in the current environment
+ final LoggerContext lc = (LoggerContext) getILoggerFactory();
+
+ try
+ {
+ JoranConfigurator configurator = new JoranConfigurator();
+ configurator.setContext( lc );
+ // the context was probably already configured by default configuration
+ // rules
+ lc.reset();
+ configurator.doConfigure( getClass().getClassLoader().getResourceAsStream( "logback-config.xml" ) );
+ }
+ catch ( JoranException je )
+ {
+ // StatusPrinter should handle this
+ }
+ }
+
+ private ConsoleReader newConsoleReader( File onamiConsoleRunnerDir )
+ throws Exception
+ {
+ ConsoleReader consoleReader = new ConsoleReader();
+
+ FileHistory fileHistory = new FileHistory( new File( onamiConsoleRunnerDir, "history" ) );
+ getRuntime().addShutdownHook( new ShutdownHook( fileHistory ) );
+ consoleReader.setHistory( fileHistory );
+ consoleReader.setHistoryEnabled( true );
+
+ return consoleReader;
+ }
+
+ private void executeCommands( ConsoleReader consoleReader, Cli<Runnable> gitParser, Injector injector )
+ throws Throwable
+ {
+ String line;
+ while ( ( line = consoleReader.readLine( PROMPT ) ) != null )
+ {
+ if ( line != null && !line.isEmpty() )
+ {
+ try
+ {
+ Runnable command = gitParser.parse( line.split( ARGS_SEPARATOR ) );
+
+ if ( command != null )
+ {
+ if ( !(command instanceof Help) )
+ {
+ injector.injectMembers( command );
+ }
+
+ command.run();
+ }
+ }
+ catch ( ParseArgumentsUnexpectedException e )
+ {
+ logger.warn( "-ocr: {}: command not found.", line );
+ }
+ }
+ }
+ }
+
+}
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/ConsoleRunner.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/ConsoleRunner.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/ConsoleRunner.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Exit.java
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Exit.java?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Exit.java (added)
+++ onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Exit.java Sun Jul 14 21:55:30 2013
@@ -0,0 +1,35 @@
+package org.apache.onami.console.commands;
+
+/*
+ * 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.
+ */
+
+import static java.lang.System.exit;
+import io.airlift.command.Command;
+
+@Command( name = "exit", description = "Terminates the program execution." )
+public final class Exit
+ implements Runnable
+{
+
+ public void run()
+ {
+ exit( 0 );
+ }
+
+}
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Exit.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Exit.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Exit.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/History.java
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/java/org/apache/onami/console/commands/History.java?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/src/main/java/org/apache/onami/console/commands/History.java (added)
+++ onami/sandbox/console/src/main/java/org/apache/onami/console/commands/History.java Sun Jul 14 21:55:30 2013
@@ -0,0 +1,32 @@
+package org.apache.onami.console.commands;
+
+/*
+ * 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.
+ */
+
+public final class History
+ implements Runnable
+{
+
+ public void run()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/History.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/History.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/History.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/ShutdownHook.java
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/java/org/apache/onami/console/commands/ShutdownHook.java?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/src/main/java/org/apache/onami/console/commands/ShutdownHook.java (added)
+++ onami/sandbox/console/src/main/java/org/apache/onami/console/commands/ShutdownHook.java Sun Jul 14 21:55:30 2013
@@ -0,0 +1,111 @@
+package org.apache.onami.console.commands;
+
+/*
+ * 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.
+ */
+
+import static java.lang.Runtime.getRuntime;
+import static java.lang.System.currentTimeMillis;
+import static org.slf4j.LoggerFactory.getLogger;
+
+import java.io.IOException;
+import java.util.Date;
+import java.util.Formatter;
+
+import jline.console.history.FileHistory;
+
+import org.slf4j.Logger;
+
+final class ShutdownHook
+ extends Thread
+{
+
+ private final Logger logger = getLogger( getClass() );
+
+ private final long start = currentTimeMillis();
+
+ private final FileHistory history;
+
+ public ShutdownHook( FileHistory history )
+ {
+ super( "shutdown-hook" );
+ this.history = history;
+ }
+
+ @Override
+ public void run()
+ {
+ logger.info( "" );
+ logger.info( " ''~``" );
+ logger.info( " ( o o )" );
+ logger.info( "+------------------.oooO--(_)--Oooo.------------------+" );
+
+ try
+ {
+ history.flush();
+ }
+ catch ( IOException e )
+ {
+ // ignore it silently
+ }
+
+ // format the uptime string
+
+ @SuppressWarnings( "resource" )
+ Formatter uptime = new Formatter().format( "Total uptime:" );
+
+ long uptimeInSeconds = ( currentTimeMillis() - start ) / 1000;
+ final long hours = uptimeInSeconds / 3600;
+
+ if ( hours > 0 )
+ {
+ uptime.format( " %s hour%s", hours, ( hours > 1 ? "s" : "" ) );
+ }
+
+ uptimeInSeconds = uptimeInSeconds - ( hours * 3600 );
+ final long minutes = uptimeInSeconds / 60;
+
+ if ( minutes > 0 )
+ {
+ uptime.format( " %s minute%s", minutes, ( minutes > 1 ? "s" : "" ) );
+ }
+
+ uptimeInSeconds = uptimeInSeconds - ( minutes * 60 );
+
+ if ( uptimeInSeconds > 0 )
+ {
+ uptime.format( " %s second%s", uptimeInSeconds, ( uptimeInSeconds > 1 ? "s" : "" ) );
+ }
+
+ logger.info( uptime.toString() );
+ logger.info( "Finished at: {}", new Date() );
+
+ final Runtime runtime = getRuntime();
+ final int megaUnit = 1024 * 1024;
+ logger.info( "Final Memory: {}M/{}M",
+ ( runtime.totalMemory() - runtime.freeMemory() ) / megaUnit,
+ runtime.totalMemory() / megaUnit );
+
+ logger.info( " .oooO " );
+ logger.info( " ( ) Oooo. " );
+ logger.info( "+---------------------\\ (----( )--------------------+" );
+ logger.info( " \\_) ) /" );
+ logger.info( " (_/" );
+ }
+
+}
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/ShutdownHook.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/ShutdownHook.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/ShutdownHook.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Version.java
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Version.java?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Version.java (added)
+++ onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Version.java Sun Jul 14 21:55:30 2013
@@ -0,0 +1,99 @@
+package org.apache.onami.console.commands;
+
+/*
+ * 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.
+ */
+
+import static java.lang.System.getProperty;
+import static java.lang.System.out;
+import io.airlift.command.Command;
+
+@Command( name = "version", description = "Display version information." )
+public final class Version
+ implements Runnable
+{
+
+ public void run()
+ {
+ out.printf( "Apache Onami-Console %s%n",
+ getProperty( "project.version" ) );
+ out.printf( "Java version: %s, vendor: %s%n",
+ getProperty( "java.version" ),
+ getProperty( "java.vendor" ) );
+ out.printf( "Java home: %s%n", getProperty( "java.home" ) );
+ out.printf( "Default locale: %s_%s, platform encoding: %s%n",
+ getProperty( "user.language" ),
+ getProperty( "user.country" ),
+ getProperty( "sun.jnu.encoding" ) );
+ out.printf( "OS name: \"%s\", version: \"%s\", arch: \"%s\", family: \"%s\"%n",
+ getProperty( "os.name" ),
+ getProperty( "os.version" ),
+ getProperty( "os.arch" ),
+ getOsFamily() );
+ }
+
+ private static final String getOsFamily()
+ {
+ String osName = getProperty( "os.name" ).toLowerCase();
+ String pathSep = getProperty( "path.separator" );
+
+ if ( osName.indexOf( "windows" ) != -1 )
+ {
+ return "windows";
+ }
+ else if ( osName.indexOf( "os/2" ) != -1 )
+ {
+ return "os/2";
+ }
+ else if ( osName.indexOf( "z/os" ) != -1 || osName.indexOf( "os/390" ) != -1 )
+ {
+ return "z/os";
+ }
+ else if ( osName.indexOf( "os/400" ) != -1 )
+ {
+ return "os/400";
+ }
+ else if ( pathSep.equals( ";" ) )
+ {
+ return "dos";
+ }
+ else if ( osName.indexOf( "mac" ) != -1 )
+ {
+ if ( osName.endsWith( "x" ) )
+ {
+ return "mac"; // MACOSX
+ }
+ return "unix";
+ }
+ else if ( osName.indexOf( "nonstop_kernel" ) != -1 )
+ {
+ return "tandem";
+ }
+ else if ( osName.indexOf( "openvms" ) != -1 )
+ {
+ return "openvms";
+ }
+ else if ( pathSep.equals( ":" ) )
+ {
+ return "unix";
+ }
+
+ return "undefined";
+ }
+
+}
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Version.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Version.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/Version.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/package-info.java
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/java/org/apache/onami/console/commands/package-info.java?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/src/main/java/org/apache/onami/console/commands/package-info.java (added)
+++ onami/sandbox/console/src/main/java/org/apache/onami/console/commands/package-info.java Sun Jul 14 21:55:30 2013
@@ -0,0 +1,23 @@
+/*
+ * 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.onami.console.commands;
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/package-info.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/package-info.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/commands/package-info.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: onami/sandbox/console/src/main/java/org/apache/onami/console/modules/BasicConfigurationModule.java
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/java/org/apache/onami/console/modules/BasicConfigurationModule.java?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/src/main/java/org/apache/onami/console/modules/BasicConfigurationModule.java (added)
+++ onami/sandbox/console/src/main/java/org/apache/onami/console/modules/BasicConfigurationModule.java Sun Jul 14 21:55:30 2013
@@ -0,0 +1,35 @@
+package org.apache.onami.console.modules;
+
+/*
+ * 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.
+ */
+
+import org.apache.onami.configuration.ConfigurationModule;
+
+public final class BasicConfigurationModule
+ extends ConfigurationModule
+{
+
+ @Override
+ protected void bindConfigurations()
+ {
+ bindEnvironmentVariables();
+ bindSystemProperties();
+ }
+
+}
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/modules/BasicConfigurationModule.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/modules/BasicConfigurationModule.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/modules/BasicConfigurationModule.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: onami/sandbox/console/src/main/java/org/apache/onami/console/modules/package-info.java
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/java/org/apache/onami/console/modules/package-info.java?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/src/main/java/org/apache/onami/console/modules/package-info.java (added)
+++ onami/sandbox/console/src/main/java/org/apache/onami/console/modules/package-info.java Sun Jul 14 21:55:30 2013
@@ -0,0 +1,23 @@
+/*
+ * 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.onami.console.modules;
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/modules/package-info.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/modules/package-info.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/modules/package-info.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: onami/sandbox/console/src/main/java/org/apache/onami/console/package-info.java
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/java/org/apache/onami/console/package-info.java?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/src/main/java/org/apache/onami/console/package-info.java (added)
+++ onami/sandbox/console/src/main/java/org/apache/onami/console/package-info.java Sun Jul 14 21:55:30 2013
@@ -0,0 +1,23 @@
+/*
+ * 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.onami.console;
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/package-info.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/package-info.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: onami/sandbox/console/src/main/java/org/apache/onami/console/package-info.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: onami/sandbox/console/src/main/mdo/console.mdo
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/mdo/console.mdo?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/src/main/mdo/console.mdo (added)
+++ onami/sandbox/console/src/main/mdo/console.mdo Sun Jul 14 21:55:30 2013
@@ -0,0 +1,61 @@
+<?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.
+-->
+<model xmlns="http://modello.codehaus.org/MODELLO/1.4.1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://modello.codehaus.org/MODELLO/1.4.1 http://modello.codehaus.org/xsd/modello-1.4.1.xsd"
+ xsd.namespace="http://onami.apache.org/console/1.x/">
+
+ <id>OnamiConsole</id>
+ <name>OnamiConsole</name>
+ <description>The Apache Onami-Console configuration model</description>
+ <comment>The Apache Onami-Console configuration model</comment>
+
+ <defaults>
+ <default>
+ <key>package</key>
+ <value>org.apache.onami.console.descriptor</value>
+ </default>
+ </defaults>
+
+ <classes>
+ <class xml.tagName="console" rootElement="true" java.toString="true">
+ <name>Console</name>
+ <version>1.0.0+</version>
+ <fields>
+ <field xml.attribute="true">
+ <name>name</name>
+ <type>String</type>
+ <version>1.0.0+</version>
+ <required>true</required>
+ </field>
+ <field java.setter="false">
+ <name>properties</name>
+ <version>1.0.0+</version>
+ <type>Properties</type>
+ <association xml.mapStyle="inline" java.init="constructor">
+ <type>String</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ </fields>
+ </class>
+ </classes>
+
+</model>
Added: onami/sandbox/console/src/main/resources/META-INF/services/com.google.inject.Module
URL: http://svn.apache.org/viewvc/onami/sandbox/console/src/main/resources/META-INF/services/com.google.inject.Module?rev=1503069&view=auto
==============================================================================
--- onami/sandbox/console/src/main/resources/META-INF/services/com.google.inject.Module (added)
+++ onami/sandbox/console/src/main/resources/META-INF/services/com.google.inject.Module Sun Jul 14 21:55:30 2013
@@ -0,0 +1,21 @@
+# 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.
+
+# required startup modules
+
+org.apache.onami.console.modules.BasicConfigurationModule
+org.apache.onami.logging.slf4j.Slf4jLoggingModule