Repository: incubator-tamaya-site Updated Branches: refs/heads/master 43f983e92 -> 8dd2accde
TAMAYA-359 Improve hompage, also adding a windows start script to bake and view the paeg locally. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-site/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-site/commit/15c355a8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-site/tree/15c355a8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-site/diff/15c355a8 Branch: refs/heads/master Commit: 15c355a8100a5b91fbe65cf34502d493acb2c7c6 Parents: 31718f6 Author: Anatole Tresch <[email protected]> Authored: Tue Oct 23 18:44:33 2018 +0200 Committer: Anatole Tresch <[email protected]> Committed: Tue Oct 23 18:44:33 2018 +0200 ---------------------------------------------------------------------- assets/css/base.css | 20 +++- assets/logos/tamaya.png | Bin 0 -> 2015 bytes bake.cmd | 9 ++ content/about.adoc | 45 ++++++++ .../extensions/mod_microprofile.adoc | 2 +- content/documentation/quickstart.adoc | 6 +- content/documentation/usecases.adoc | 26 ++++- content/features.adoc | 105 +++++++++++++++++++ content/start.adoc | 2 +- templates/blog.thyme | 27 +++++ templates/footer.thyme | 5 +- templates/index.thyme | 60 +++++++++-- templates/menu.thyme | 9 +- 13 files changed, 293 insertions(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-site/blob/15c355a8/assets/css/base.css ---------------------------------------------------------------------- diff --git a/assets/css/base.css b/assets/css/base.css index 68fe241..96a8004 100644 --- a/assets/css/base.css +++ b/assets/css/base.css @@ -36,16 +36,34 @@ body { } } +.incubator-logo { + width; 300px; + height: 30px; +} + /* Custom page CSS -------------------------------------------------- */ /* Not required for template or sticky footer method. */ #wrap > .container { - padding-top: 60px; + padding-top: 20px; } .container .credit { margin: 20px 0; } +.front-logo { + padding-top: 6px; + padding-right: 20px; + padding-bottom: 10px; + padding-left: 0px; +} +.front-cell { + padding-top: 5px; + padding-right: 5px; + padding-bottom: 5px; + padding-left: 0px; + width: 33%; +} /*code { font-size: 80%; http://git-wip-us.apache.org/repos/asf/incubator-tamaya-site/blob/15c355a8/assets/logos/tamaya.png ---------------------------------------------------------------------- diff --git a/assets/logos/tamaya.png b/assets/logos/tamaya.png new file mode 100644 index 0000000..16df5d7 Binary files /dev/null and b/assets/logos/tamaya.png differ http://git-wip-us.apache.org/repos/asf/incubator-tamaya-site/blob/15c355a8/bake.cmd ---------------------------------------------------------------------- diff --git a/bake.cmd b/bake.cmd new file mode 100644 index 0000000..c8c630b --- /dev/null +++ b/bake.cmd @@ -0,0 +1,9 @@ +@ECHO OFF +cls +echo Cleaning up cache ... +rmdir /Q /S cache/ +echo Starting to bake our project homepage .... +set JBAKE_HOME="%~dp0\bin\jbake-2.6.1-bin" +echo %JBAKE_HOME% +%JBAKE_HOME%/bin/jbake -b -s +@ECHO ON http://git-wip-us.apache.org/repos/asf/incubator-tamaya-site/blob/15c355a8/content/about.adoc ---------------------------------------------------------------------- diff --git a/content/about.adoc b/content/about.adoc new file mode 100644 index 0000000..cfdc6c3 --- /dev/null +++ b/content/about.adoc @@ -0,0 +1,45 @@ +:jbake-type: page +:jbake-status: published + += About Tamaya + +Apache Tamaya (incubating) provides a *unopinionated and powerful +configuration solution* for developers on the JVM. + + +== Rationale + +Configuration is one of the most prominent cross-cutting concerns similar to logging. Most of us already have been +writing similar code again and again in each of our projects. Sometimes in a similar way but mostly always slightly +different, but certainly with high coupling to your configuration backends. Given your code is reused or integrated +some how, or deployed by some customers, struggling starts: not supported backends, different policies, missing +combination and validation mechanisms and so on. Tamaya solves all this by defining a common API and backend SPI. +Your code is decoupled from the configuration backend. There is no difference if your code is deployed on your dev box +or in a clustered Docker environment in production, it stays the same! + + +For further information we recommend to have a look at our documentation resources: + +* link:features.html[Feature Overview] +* link:documentation/usecases.html[Use Cases and Requirements] +* link:highleveldesign.html[High Level Design] +* link:documentation/api.html[API] +* link:documentation/core.html[Core] +* link:documentation/extensions.html[Extensions] + + +== You just wanna start right away + +So here is five liner to start... + +1. Add `{tamaya_mvn_group_id}:tamaya-core:{tamaya_version}` to your dependencies. +2. Add some config to `META-INF/javaconfiguration.properties` +3. Access your configuration by `Configuration.current()` and use it. +4. Look at the link:features.html[extensions modules] to customize your setup! +5. Enjoy! + +And, yes, give feedback, so we can improve ;-) + + + + http://git-wip-us.apache.org/repos/asf/incubator-tamaya-site/blob/15c355a8/content/documentation/extensions/mod_microprofile.adoc ---------------------------------------------------------------------- diff --git a/content/documentation/extensions/mod_microprofile.adoc b/content/documentation/extensions/mod_microprofile.adoc index 9d5951d..b6d8bb0 100644 --- a/content/documentation/extensions/mod_microprofile.adoc +++ b/content/documentation/extensions/mod_microprofile.adoc @@ -55,7 +55,7 @@ be supported by Tamaya as well. -------------------------------------------------------- // SE API -Config config = ConfigProvider.getConfig(); +Config config = Configuration.current(); String serverUrl = config.getValue("acme.myprj.some.url", String.class); callToServer(serverUrl); http://git-wip-us.apache.org/repos/asf/incubator-tamaya-site/blob/15c355a8/content/documentation/quickstart.adoc ---------------------------------------------------------------------- diff --git a/content/documentation/quickstart.adoc b/content/documentation/quickstart.adoc index 8648e74..e396bcc 100644 --- a/content/documentation/quickstart.adoc +++ b/content/documentation/quickstart.adoc @@ -26,7 +26,7 @@ to provide the default values when accessing the configuration: [source,java] ---- -Configuration config = ConfigurationProvider.getConfiguration(); +Configuration config = Configuration.current(); String aTextValue = config.getOrDefault("my.value.key", "N/A"); int aNumericValue = config.getOrDefault("my.numValueKey", Integer.class, 15 /* default */); @@ -37,9 +37,9 @@ With Java 8 you can, of course, also use +Optional+, e.g. [source,java] ---- -Configuration config = ConfigurationProvider.getConfiguration(); +Configuration config = Configuration.current(); -String aTextValue = Optional.ofNullable(config.getOrDefault("my.value.key").orElse("N/A"); +String aTextValue = config.getOptional("my.value.key", String.class).orElse("N/A"); ---- === Add/define your configuration data http://git-wip-us.apache.org/repos/asf/incubator-tamaya-site/blob/15c355a8/content/documentation/usecases.adoc ---------------------------------------------------------------------- diff --git a/content/documentation/usecases.adoc b/content/documentation/usecases.adoc index 0d0d4e0..8d83ced 100644 --- a/content/documentation/usecases.adoc +++ b/content/documentation/usecases.adoc @@ -1,7 +1,31 @@ :jbake-type: page :jbake-status: published -== Apache Tamaya: Use Cases and Requirements + += Why you should rely on Tamaya? + +There are several reasons, why you should choose Tamaya, some of them: + +* *Tamaya is useful*: Tamaya ships with a type safe, easy to use API and SPI, which can help you to decouple your + code from configuration concerns. +* *Tamaya is flexible*: Regardless of working +with Vanilla Java SE or with OSGI or Jakarta EE, Tamaya can be the tool +of choice for your configuration concerns. +* *Tamaya is extendible*: Tamaya comes with a lean core API. Additional features can + be added easily by simply adding them to the project classpath as needed. +Tamaya does not fill up your memory with things you wont ever need. +* *Tamaya is easy*: Tamaya comes with a flexible auto-discovery mechanism to lookup + the property sources and define their individual significance. +* *Tamaya is runtime-independent*: Tamaya runs on every JVM platform, since it's core is written in pure + Java. +* *Tamaya is well documented*: Both the API as well as the extension are all well documented. +* *Tamaya is Apache*: Tamaya is community as it's best, no vendor lock-in, no payed members, just + the Apache Way! + +A good way to continue is probably looking at the use cases we had in mind, when implementing Tamaya... + + += Use Cases and Requirements toc::[] http://git-wip-us.apache.org/repos/asf/incubator-tamaya-site/blob/15c355a8/content/features.adoc ---------------------------------------------------------------------- diff --git a/content/features.adoc b/content/features.adoc new file mode 100644 index 0000000..eb43a57 --- /dev/null +++ b/content/features.adoc @@ -0,0 +1,105 @@ +:jbake-type: page +:jbake-status: published + +[toc] + += Tamaya\'s Features + +Apache Tamaya comes with numerous useful features. This page lists the most important +ones. Also also have a look at the full feature list. If you don't find your features, +please get in contact with us to discuss your ideas! + +== Core Features + +The Core Features are built-in riht away and available by default. Just add Tamaya to your project +dependencies and there you go! + + +=== Accessing Configuration + +Tamaya provides a super simple API to access configuration: + +[source: java] +---- +Configuration config = Configuration.current(); +---- + +Yes it's as easy as that. Optionally you can also pass your classloader of choice: + +[source: java] +---- +ClassLoader myApplicationClassLoader = ...; +Configuration config = Configuration.current(myApplicationClassLoader); +---- + +From there you can access your configuration properties: + +[source: java] +---- +String host = config.getOrDefault("server.host", "localhost"); +Optional<Integer> port = config.getOptional("server.port", Integer.class); +---- + + +=== Providing Configuration + +Providing configuration is as simple: + +* Implement the `PropertySource` interface. +* Register your implementation with the Java `ServiceLoader`. + + +== Configuration Auto-Discovery and Builders + +Tamaya can care about everything. You dont have to bother with +configuration sources, classloaders, overriding etc. Tamaya will collect and load +all registered property sources. + +On the other hand if you prefer having full control, Tamaya provides +powerful factories and builders, with allow to built your customized +configuration and manage your own configuration lifecycle. + +[source: java] +---- +Configuration config = Configuration.builder() + .withDefaultPropertySources() + .addPropertySources(new MyCustomPropertySource()) + .withDefaultConverters() + .build(); +---- + + +== Pluggable Extensions + +Tamaya comes with numerous features, that can be easily added. Just add +the corresponding dependency to your build. Yes, it's as easy as that. +So let's have a quick look at some of the most commonly used features... + + +== Functional Extensions + + +== Dynamic Placeholders + + +== Different Configuration Formats: JSON, YAML, XML, properties, ini... + + +== Support for Configuration Injection + + +== Support for Configuration Templates + + +== Ant styled File Resource Wildcards + + +== Support for Spring/Spring Boot + + + + + + + + http://git-wip-us.apache.org/repos/asf/incubator-tamaya-site/blob/15c355a8/content/start.adoc ---------------------------------------------------------------------- diff --git a/content/start.adoc b/content/start.adoc index 58eb6f1..35cb043 100644 --- a/content/start.adoc +++ b/content/start.adoc @@ -33,7 +33,7 @@ Using Apache Tamaya is simple: 1. Add `{tamaya_mvn_group_id}:tamaya-core:{tamaya_version}` to your dependencies. 2. Add your config to `META-INF/javaconfiguration.properties` -3. Access your configuration by `ConfigurationProvider.getConfiguration()` and use it. +3. Access your configuration by `Configuration.current()` and use it. 4. Look at the link:documentation/extensions.html[extensions modules] to customize your setup! 5. Enjoy! http://git-wip-us.apache.org/repos/asf/incubator-tamaya-site/blob/15c355a8/templates/blog.thyme ---------------------------------------------------------------------- diff --git a/templates/blog.thyme b/templates/blog.thyme new file mode 100644 index 0000000..95deaf6 --- /dev/null +++ b/templates/blog.thyme @@ -0,0 +1,27 @@ +<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> + <head th:replace="header.thyme::head"/> + <body onload="prettyPrint()"> + <div id="wrap"> + <div th:replace="menu.thyme::menu"/> + <div class="container"> + <div class="page-header"> + <h1>Blog</h1> + </div> + + <div th:each="post : ${published_posts}"> + <a th:href='${post.uri}' href='href'><h1 th:text='${post.title}'>title</h1></a> + <p th:text='${#dates.format(post.date,"yyyy-MM-dd")}'>date</p> + <p th:utext='${post.body}'>body</p> + </div> + + <hr /> + + <p>Older posts are available via the <a th:href='${content.rootpath+config.archive_file}' href='href'>archive</a>.</p> + </div> + </div> + + <div th:replace="footer.thyme::footer"></div> + </body> +</html> http://git-wip-us.apache.org/repos/asf/incubator-tamaya-site/blob/15c355a8/templates/footer.thyme ---------------------------------------------------------------------- diff --git a/templates/footer.thyme b/templates/footer.thyme index 0a91f5f..1113845 100644 --- a/templates/footer.thyme +++ b/templates/footer.thyme @@ -26,10 +26,7 @@ the code, it does indicate that the project has yet to be fully endorsed by the ASF. Apache, Apache Tamaya, and the Apache Tamaya logo are registered trademarks or trademarks of The Apache Software Foundation in the U.S. and/or other countries.<br /> - <a href="https://incubator.apache.org/guides/website.html" style="border:0px;" target="_target"> - <img th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" class="incubator-logo" th:src="${rootpath} + 'logos/apache-incubator.png'"/> - </a> - </p> + </p> </div> </div> http://git-wip-us.apache.org/repos/asf/incubator-tamaya-site/blob/15c355a8/templates/index.thyme ---------------------------------------------------------------------- diff --git a/templates/index.thyme b/templates/index.thyme index 95deaf6..ed228ac 100644 --- a/templates/index.thyme +++ b/templates/index.thyme @@ -7,18 +7,60 @@ <div th:replace="menu.thyme::menu"/> <div class="container"> <div class="page-header"> - <h1>Blog</h1> - </div> - - <div th:each="post : ${published_posts}"> - <a th:href='${post.uri}' href='href'><h1 th:text='${post.title}'>title</h1></a> - <p th:text='${#dates.format(post.date,"yyyy-MM-dd")}'>date</p> - <p th:utext='${post.body}'>body</p> + <h1><img class="front-logo" src="/logos/tamaya.png"/>Apache Tamaya (Incubating)</h1> </div> + <div> + <table class="table table-striped"> + <tbody> + <tr> + <td class="front-cell"> + <h3>What is Tamaya?</h3> + <p>Tamaya is a powerful, flexible but simple configuration API that decouples your application + from your configuration backend sources.</p> + <p><a th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+'about.html'">Learn more about Tamaya</a></p> + </td> + <td class="front-cell"> + <h3>Challenge it: Why you should use Tamaya?</h3> + <p>Configuration is one of the most important cross-cutting concerns. Nevertheless + most people rewrite similar logic again and again. It's time to rely on a standard + compliant solution that allows to plug-in any configuration resources?</p> + <p><a th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+'documentation/usecases.html'">Look at Tamaya's Use Cases</a></p> + </td> + <td class="front-cell"> + <h3>Try it: Get started!</h3> + <p>Get started is easy. Look at our examples, add Tamaya's runtime dependency and + there you go. Tamaya is plain Java SE in it's core. Lean and effective. And if you have + a question, let us know. We are happy to help!</p> + <p><a th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+'documentation/quickstart.html'">"Getting started" right away!</a></p> + </td> + </tr> + <tr> + <td class="front-cell"> + <h3>Use it: Add more Features!</h3> + <p>Did we already have mentioned features? There are a lot of them. Read this + overview about current and upcoming features to see what matches your + requirements. Tamaya is modular, you only depend on what you like.</p> + <p><a th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+'features.html'">Checkout our outstanding features</a></p> + </td> + <td class="front-cell"> + <h3>Rely on it: Tamaya as a standard</h3> + <p>Tamaya is not only a flexible configuration solution, it is also future proof. + With Tamaya you get an indepepdent implementation of the current Microprofile + Config and JSR 310 API.</p> + <p><a th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+'documentation/tamayaasastandard.html'">Learn more</a></p> + </td> + <td class="front-cell"> + <h3>Improve it: Get involved...</h3> + <p>Tell us your story and help us making Tamaya even better. + We are happy to support you and discuss further features or improvements.</p> + <p><a th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+'development/community.html'">Get involved!</a></p> + </td> + </tr> + </tbody> + </table> + </div> <hr /> - - <p>Older posts are available via the <a th:href='${content.rootpath+config.archive_file}' href='href'>archive</a>.</p> </div> </div> http://git-wip-us.apache.org/repos/asf/incubator-tamaya-site/blob/15c355a8/templates/menu.thyme ---------------------------------------------------------------------- diff --git a/templates/menu.thyme b/templates/menu.thyme index d3bcfa8..1aaba7b 100644 --- a/templates/menu.thyme +++ b/templates/menu.thyme @@ -14,7 +14,7 @@ <span class="icon-bar"></span> <span class="icon-bar"></span> </button> - <a class="navbar-brand" th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+'index.html'">Apache Tamaya (incubating)</a> + <a class="navbar-brand" th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+'index.html'">Tamaya Home</a> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> @@ -67,9 +67,12 @@ </ul> </li> --> - <li><a th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+'sitemap.xml'">Sitemap</a></li> - <li><a th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+${config.feed_file}">Subscribe</a></li> + <li><a th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+'sitemap.xml'">Sitemap</a></li> + <li><a th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" th:href="${rootpath}+${config.feed_file}">Subscribe</a></li> + <li><a href="https://incubator.apache.org/guides/website.html" style="border:0px;" target="_target"> + <img th:with="rootpath=(${content.rootpath != null} ? ${content.rootpath} : '')" class="incubator-logo" th:src="${rootpath} + 'logos/apache-incubator.png'"/></a></li> </ul> + </div><!--/.nav-collapse --> </div> </div>
