tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r941994 [17/17] - in /websites/staging/tamaya/trunk/content: ./ javadoc/ javadoc/api/ javadoc/api/index-files/ javadoc/api/org/ javadoc/api/org/apache/ javadoc/api/org/apache/tamaya/ javadoc/api/org/apache/tamaya/spi/ javadoc/core/ javadoc/...
Date Mon, 02 Mar 2015 21:36:04 GMT
Added: websites/staging/tamaya/trunk/content/quickstart.html
==============================================================================
--- websites/staging/tamaya/trunk/content/quickstart.html (added)
+++ websites/staging/tamaya/trunk/content/quickstart.html Mon Mar  2 21:36:02 2015
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta name="description" content="tamaya-generate-pages">
+    <meta name="author" content="chm">
+
+    <title>Apache Tamaya - Tamaya Quickstart
</title>
+
+    
+
+    
+    <!-- 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
 &quot;License&quot;); 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
 &quot;AS IS&quot; 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.
 -->
+
+    <!-- Styles -->
+    
+    <link href="./resources/css/bootstrap.css" rel="stylesheet">    
+    <!--<link href="./resources/css/prettify.css" rel="stylesheet" /> -->
+    <link href="./resources/css/codehilite.css" rel="stylesheet" />
+    <link href="./resources/css/bootstrap-responsive.css" rel="stylesheet">
+
+    <style type="text/css">
+        body {
+            padding-top: 60px;
+            padding-bottom: 40px;
+        }
+    </style>
+ 
+	<script type="text/javascript">
+
+	  var _gaq = _gaq || [];
+	  _gaq.push(['_setAccount', 'UA-36103647-1']);
+	  _gaq.push(['_trackPageview']);
+	
+	  (function() {
+		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+	  })();
+	
+	</script>
+</head>
+
+<body>
+    <div class="navbar navbar-fixed-top">
+        <div class="navbar-inner">
+            <div class="container">
+                <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+                    <span class="icon-bar"></span>
+                    <span class="icon-bar"></span>
+                    <span class="icon-bar"></span>
+                </a>
+                <a class="brand logocolor" href="/index.html">Apache Tamaya</a>
+                <div class="nav-collapse">
+                    <ul class="nav">
+                        <li class="active"><a href="./index.html">Home</a></li>
+                        <li><a href="./documentation.html">Documentation</a></li>
+                        <li><a href="./javadoc.html">Javadoc</a></li>
+                        <li><a href="./source.html">Source</a></li>
+                        <li><a href="./download.html">Download</a></li>
+                        <li><a href="./community.html">Community</a></li>
+                        <!-- <li><a href="./support.html">Support</a></li>
 -->
+                        <li><a href="./news.html">News</a></li>
+                    </ul>
+                </div><!--/.nav-collapse -->
+                <form id="search-form" action="http://www.google.com/search" method="get"
 class="navbar-search pull-right" >
+                    <input value="tamaya.incubator.apache.org" name="sitesearch" type="hidden"/>
+                    <input class="search-query" name="q" id="query" type="text" />
+                </form>
+            </div>
+        </div>
+    </div>
+
+    <div class="container">
+      <div class="row">
+          <div class="span12">
+              <div class="page-title">
+                <h1>Tamaya Quickstart
</h1>
+				  <img src="http://incubator.apache.org/images/egg-logo.png" alt="The Apache Software
Foundation - Incubator" align="right"/>
+              </div>
+              <div class="toc">
+<ul>
+<li><a href="#minimal-dependency">Minimal Dependency</a></li>
+<li><a href="#adding-additional-features">Adding additional features</a><ul>
+<li><a href="#dynamic-resolution-and-value-placeholders">Dynamic Resolution and
Value Placeholders</a></li>
+<li><a href="#ant-styled-path-resolution-of-resources">Ant-styled Path Resolution
of Resources</a></li>
+<li><a href="#configuration-injection">Configuration Injection</a></li>
+</ul>
+</li>
+</ul>
+</div>
+<hr />
+<h1 id="minimal-dependency">Minimal Dependency</h1>
+<p>The fastest way to start with Tamaya is just using the <em>Core</em>
implementation, implementing the <em>API</em> in small,
+minimalistic way. FOr that add the following dependency to your project:</p>
+<div class="codehilite"><pre><span class="nt">&lt;dependency&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>org.apache.tamaya<span
class="nt">&lt;/id&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>tamaya-core<span class="nt">&lt;/artifactId&gt;</span>
+  <span class="nt">&lt;version&gt;&lt;CURRENT_VERSION&gt;&lt;/version&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+</pre></div>
+
+
+<p>Given that you can add your configuration properties to the following locations
in your classpath:</p>
+<div class="codehilite"><pre><span class="n">META</span><span
class="o">-</span><span class="n">INF</span><span class="o">/</span><span
class="n">cfg</span><span class="o">/</span><span class="n">default</span><span
class="o">-</span><span class="n">config</span><span class="p">.</span><span
class="k">properties</span>
+<span class="n">META</span><span class="o">-</span><span class="n">INF</span><span
class="o">/</span><span class="n">cfg</span><span class="o">/</span><span
class="n">config</span><span class="p">.</span><span class="k">properties</span>
+</pre></div>
+
+
+<p>Additionally also system and environment properties are taken into account. Overall
Tamaya by default defines the
+following configuration model (most significant first):</p>
+<div class="codehilite"><pre>1<span class="p">.</span> <span class="n">System</span>
<span class="n">Properties</span>
+2<span class="p">.</span> <span class="n">META</span><span class="o">-</span><span
class="n">INF</span><span class="o">/</span><span class="n">cfg</span><span
class="o">/</span><span class="n">config</span><span class="p">.</span><span
class="k">properties</span>
+3<span class="p">.</span> <span class="n">META</span><span class="o">-</span><span
class="n">INF</span><span class="o">/</span><span class="n">cfg</span><span
class="o">/</span><span class="n">default</span><span class="o">-</span><span
class="n">config</span><span class="p">.</span><span class="k">properties</span>
+5<span class="p">.</span> <span class="n">Environment</span> <span
class="n">Properties</span>
+</pre></div>
+
+
+<h1 id="adding-additional-features">Adding additional features</h1>
+<p>Depenending on your likingy you may add additional extensions such as:</p>
+<h2 id="dynamic-resolution-and-value-placeholders">Dynamic Resolution and Value Placeholders</h2>
+<div class="codehilite"><pre><span class="nt">&lt;dependency&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>org.apache.tamaya.ext<span
class="nt">&lt;/id&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>tamaya-resolver<span class="nt">&lt;/artifactId&gt;</span>
+  <span class="nt">&lt;version&gt;&lt;CURRENT_VERSION&gt;&lt;/version&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+</pre></div>
+
+
+<p>With that it is possible to define values with Unix styled placeholders that are
resolved on configuration access,
+e.g. <em>mykey=my${dynamicValue}</em>. For further details refer to the module
documentation.</p>
+<h2 id="ant-styled-path-resolution-of-resources">Ant-styled Path Resolution of Resources</h2>
+<div class="codehilite"><pre><span class="nt">&lt;dependency&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>org.apache.tamaya.ext<span
class="nt">&lt;/id&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>tamaya-resolution<span
class="nt">&lt;/artifactId&gt;</span>
+  <span class="nt">&lt;version&gt;&lt;CURRENT_VERSION&gt;&lt;/version&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+</pre></div>
+
+
+<p>This module provides a <em>ResourceResolver</em> service that allows
to resolve configuration resources using a ant-styled
+resource description, e.g.</p>
+<div class="codehilite"><pre><span class="n">Collection</span><span
class="o">&lt;</span><span class="n">URL</span><span class="o">&gt;</span>
<span class="n">urls</span> <span class="p">=</span> <span class="n">ResourceResolver</span><span
class="p">.</span><span class="n">getResources</span><span class="p">(</span>&quot;<span
class="n">META</span><span class="o">-</span><span class="n">INF</span><span
class="o">/</span><span class="n">cfg</span><span class="o">/**/*</span><span
class="p">.</span><span class="k">properties</span>&quot;<span
class="p">);</span>
+</pre></div>
+
+
+<p>For further details refer to the module documentation.</p>
+<h2 id="configuration-injection">Configuration Injection</h2>
+<div class="codehilite"><pre><span class="nt">&lt;dependency&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>org.apache.tamaya.ext<span
class="nt">&lt;/id&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>tamaya-inject<span class="nt">&lt;/artifactId&gt;</span>
+  <span class="nt">&lt;version&gt;&lt;CURRENT_VERSION&gt;&lt;/version&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+</pre></div>
+
+
+<p>With this extension you can let <em>Tamaya</em> inject configuration
into instances of annotated classes or
+let Tamaya implement a configuration template:
+corresponding configuration:</p>
+<p>public class MyType{</p>
+<div class="codehilite"><pre>  <span class="p">@</span><span class="n">ConfiguredProperty</span><span
class="p">(</span>&quot;<span class="n">name</span>&quot;<span
class="p">)</span>
+  <span class="n">private</span> <span class="n">String</span> <span
class="n">typeName</span><span class="p">;</span>
+
+  <span class="n">public</span> <span class="n">String</span> <span
class="n">getName</span><span class="p">(){</span>
+     <span class="k">return</span> <span class="n">name</span><span
class="p">;</span>
+  <span class="p">}</span>
+</pre></div>
+
+
+<p>}</p>
+<p>MyType type = new MyType();
+   ConfigurationInjector.injectConfiguration(type);</p>
+<p>Or the same as template:</p>
+<p>public interface MyTypeTemplate{</p>
+<div class="codehilite"><pre>  <span class="p">@</span><span class="n">ConfiguredProperty</span><span
class="p">(</span>&quot;<span class="n">name</span>&quot;<span
class="p">)</span>
+  <span class="n">public</span> <span class="n">String</span> <span
class="n">getName</span><span class="p">();</span>
+</pre></div>
+
+
+<p>}</p>
+<p>MyTypeTemplate type = ConfigurationInjector.createTemplate(MyTypeTemplate.class);</p>
+          </div>
+      </div>
+
+      <hr>
+
+      <footer>
+        <p>Copyright © 2014 The Apache Software Foundation, Licensed under the Apache
License, Version 2.0.</p>
+        <p>Apache and the Apache feather logo are trademarks of The Apache Software
Foundation.</p>
+      </footer>
+
+    </div> <!-- /.container -->
+
+    <!-- Javascript
+    ================================================== -->
+    <!-- Placed at the end of the document so the pages load faster -->
+    <!--<script src="./resources/js/prettyfy.js"></script> -->
+    <script src="./resources/js/prettyprint.js"></script>
+    <script src="./resources/js/jquery.js"></script>
+    <script src="./resources/js/bootstrap-transition.js"></script>
+    <script src="./resources/js/bootstrap-alert.js"></script>
+    <script src="./resources/js/bootstrap-modal.js"></script>
+    <script src="./resources/js/bootstrap-dropdown.js"></script>
+    <script src="./resources/js/bootstrap-scrollspy.js"></script>
+    <script src="./resources/js/bootstrap-tab.js"></script>
+    <script src="./resources/js/bootstrap-tooltip.js"></script>
+    <script src="./resources/js/bootstrap-popover.js"></script>
+    <script src="./resources/js/bootstrap-button.js"></script>
+    <script src="./resources/js/bootstrap-collapse.js"></script>
+    <script src="./resources/js/bootstrap-carousel.js"></script>
+    <script src="./resources/js/bootstrap-typeahead.js"></script>
+</body>
+</html>

Modified: websites/staging/tamaya/trunk/content/sitemap.html
==============================================================================
--- websites/staging/tamaya/trunk/content/sitemap.html (original)
+++ websites/staging/tamaya/trunk/content/sitemap.html Mon Mar  2 21:36:02 2015
@@ -49,6 +49,8 @@
 <li><a href="/modules.html">Parts &amp; Modules</a></li>
 <li><a href="/news.html">Apache Tamaya News
 </a></li>
+<li><a href="/quickstart.html">Tamaya Quickstart
+</a></li>
 <li><a href="/source.html">Source</a></li>
 <li><a href="/suggested-git-workflows.html"></a></li>
 </ul></div></div>

Modified: websites/staging/tamaya/trunk/content/suggested-git-workflows.html
==============================================================================
--- websites/staging/tamaya/trunk/content/suggested-git-workflows.html (original)
+++ websites/staging/tamaya/trunk/content/suggested-git-workflows.html Mon Mar  2 21:36:02
2015
@@ -113,15 +113,18 @@ This will always lead to some dirty arti
 </pre></div>
 
 
-<p>Please note that this sometimes trashes your working tree if there are unmergeable
files around. Cleaning this up with a forced manual rebase is not something we would recommend
for a git beginner.</p>
+<p>Please note that this sometimes trashes your working tree if there are unmergeable
files around. Cleaning this up with
+a forced manual rebase is not something we would recommend for a git beginner.</p>
 <h3 id="working-in-an-own-branch">Working in an own branch</h3>
 <p>This is actually the suggested way to prevent auto-merges.</p>
-<p>Create an own branch where you do your feature work. Either do all your work in
one branch or create one branch per feature you are working on.</p>
+<p>Create an own branch where you do your feature work. Either do all your work in
one branch or create one branch per
+feature you are working on.</p>
 <div class="codehilite"><pre><span class="c">%&gt; git branch mybranch</span>
 </pre></div>
 
 
-<p>After you finished your feature, <code>git-add</code> and <code>git-commit</code>
your work. Check with <code>git-status</code> that you don't have any dirty files
and uncommitted changes around. You can use <code>git-stash</code> to 'backup'
unfinished work.</p>
+<p>After you finished your feature, <code>git-add</code> and <code>git-commit</code>
your work. Check with <code>git-status</code> that you don't have
+any dirty files and uncommitted changes around. You can use <code>git-stash</code>
to 'backup' unfinished work.</p>
 <p>Then switch back to the master branch and pull changes done by other committers
in the meantime.</p>
 <div class="codehilite"><pre><span class="c">%&gt; git checkout master</span>
 <span class="c">%&gt; git pull --rebase</span>
@@ -135,7 +138,8 @@ Now go back to your private branch and r
 </pre></div>
 
 
-<p>If you got conflicts, you will get lines with "&gt;&gt;&gt;&gt;"
added to those files. Resolve those conflicts manually, add them and finish the rebase.</p>
+<p>If you got conflicts, you will get lines with "&gt;&gt;&gt;&gt;"
added to those files. Resolve those conflicts manually, add them
+and finish the rebase.</p>
 <p>Check with <code>git-status</code> and <code>gitk</code>
if the merge went well and the history now contains your changes.
 If all is well, go back to the master branch and merge your changes in.</p>
 <div class="codehilite"><pre><span class="c">%&gt; git pull --rebase
    // (just for safety, you should see no changes)</span>
@@ -163,13 +167,17 @@ If all is well, go back to the master br
 </pre></div>
 
 
-<p>Now you can start to work on your patch. When you are finished, commit your changes.
But don't forget to <strong>add the name of the JIRA issue to the commit message</strong>.</p>
+<p>Now you can start to work on your patch. When you are finished, commit your changes.
But don't forget to <strong>add the name
+of the JIRA issue to the commit message</strong>.</p>
 <div class="codehilite"><pre><span class="c">%&gt; git add -am &quot;TAMAYA-XXX:
Fixed some issue&quot;</span>
 </pre></div>
 
 
-<p>For small patches we recommend to do a single commit containing your changes. For
larger contributions you should try to group your work into separate sub-tasks that you can
commit one by one.</p>
-<p>Before you create your patch you should make sure that your local repository is
up to date with the master repository. This is very important especially if you work on your
branch for a long time. Use the following commands to pull the latest changes from the upstream
repository and rebase your branch against the current master.</p>
+<p>For small patches we recommend to do a single commit containing your changes. For
larger contributions you should try
+to group your work into separate sub-tasks that you can commit one by one.</p>
+<p>Before you create your patch you should make sure that your local repository is
up to date with the master repository.
+This is very important especially if you work on your branch for a long time. Use the following
commands to pull the
+latest changes from the upstream repository and rebase your branch against the current master.</p>
 <div class="codehilite"><pre><span class="c">%&gt; git checkout master</span>
 <span class="c">%&gt; git pull --rebase</span>
 <span class="c">%&gt; git checkout TAMAYA-XXX</span>
@@ -204,7 +212,12 @@ If all is well, go back to the master br
 
 
 <h2 id="discussion-workflow-optional">Discussion workflow (optional)</h2>
-<p>All discussions which lead to a decision take place on the mailing list. Sometimes
it's required to show-case an idea esp. if the solution is more than few lines. As shown above
it makes sense to use local branches for developing new parts. Git allows to push such local
branches to a public repository. So it's easier to share it with the community for discussing
it. The following listings show an example in combination with GitHub - for sure it works
with any hosting platform like BitBucket, Google-Code,... The only important part here is
that such branches <em>NEVER</em> get pushed to the main Apache repository to
keep the commit history as clean as possible.</p>
+<p>All discussions which lead to a decision take place on the mailing list. Sometimes
it's required to show-case an idea
+esp. if the solution is more than few lines. As shown above it makes sense to use local branches
for developing new
+parts. Git allows to push such local branches to a public repository. So it's easier to share
it with the community
+for discussing it. The following listings show an example in combination with GitHub - for
sure it works with any
+hosting platform like BitBucket, Google-Code,... The only important part here is that such
branches <em>NEVER</em> get pushed
+to the main Apache repository to keep the commit history as clean as possible.</p>
 <p><strong>Initial setup</strong></p>
 <div class="codehilite"><pre><span class="c">%&gt; git clone https://git-wip-us.apache.org/repos/asf/incubator-tamaya.git
./</span>
 <span class="c">%&gt; git remote add discuss https://[username]@github.com/[username]/[repo-name].git</span>
@@ -220,7 +233,9 @@ If all is well, go back to the master br
 </pre></div>
 
 
-<p><em>If the community agrees on the suggested change, the implementation will
be applied to the origin master. A committer has to follow the steps described above for the
basic workflow to keep the commit history simple, clean and straight. A contributor has to
follow the steps described above for creating a patch.</em></p>
+<p><em>If the community agrees on the suggested change, the implementation will
be applied to the origin master. A committer
+has to follow the steps described above for the basic workflow to keep the commit history
simple, clean and straight.
+A contributor has to follow the steps described above for creating a patch.</em></p>
 <p><strong>Delete the branch again</strong></p>
 <div class="codehilite"><pre><span class="c">%&gt;git push discuss
:TAMAYA-XXX</span>
 <span class="c">%&gt;git branch -d TAMAYA-XXX</span>



Mime
View raw message