You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by rm...@apache.org on 2016/10/27 08:21:29 UTC
svn commit: r1766782 - in /openwebbeans/microwave/trunk:
microwave-core/src/main/java/org/apache/microwave/ microwave-doc/
microwave-doc/src/main/java/org/apache/microwave/doc/
microwave-doc/src/main/java/org/apache/microwave/doc/generator/
microwave-d...
Author: rmannibucau
Date: Thu Oct 27 08:21:28 2016
New Revision: 1766782
URL: http://svn.apache.org/viewvc?rev=1766782&view=rev
Log:
finally pushing the doc generation
Added:
openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/ArquillianConfiguration.java
openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/MavenConfiguration.java
openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/community.adoc
Modified:
openwebbeans/microwave/trunk/microwave-core/src/main/java/org/apache/microwave/Microwave.java
openwebbeans/microwave/trunk/microwave-doc/pom.xml
openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/JBake.java
openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/BaseGenerator.java
openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/CliConfiguration.java
openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/Configuration.java
openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/microwave-core/configuration.adoc
openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/microwave-maven/index.adoc
openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/testing/index.adoc
openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/templates/page.gsp
openwebbeans/microwave/trunk/microwave-junit/src/main/java/org/apache/microwave/junit/MonoMicrowave.java
Modified: openwebbeans/microwave/trunk/microwave-core/src/main/java/org/apache/microwave/Microwave.java
URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/microwave-core/src/main/java/org/apache/microwave/Microwave.java?rev=1766782&r1=1766781&r2=1766782&view=diff
==============================================================================
--- openwebbeans/microwave/trunk/microwave-core/src/main/java/org/apache/microwave/Microwave.java (original)
+++ openwebbeans/microwave/trunk/microwave-core/src/main/java/org/apache/microwave/Microwave.java Thu Oct 27 08:21:28 2016
@@ -632,6 +632,10 @@ public class Microwave implements AutoCl
return file.getAbsolutePath();
}
+ public void await() {
+ tomcat.getServer().await();
+ }
+
public static class Builder {
@CliOption(name = "http", description = "HTTP port")
private int httpPort = 8080;
@@ -1149,8 +1153,8 @@ public class Microwave implements AutoCl
return this;
}
- public void addCustomizer(final ConfigurationCustomizer configurationCustomizer) {
- configurationCustomizer.customize(this);
+ public void addCustomizer(final Consumer<Builder> configurationCustomizer) {
+ configurationCustomizer.accept(this);
}
public void loadFromProperties(final Properties config) {
@@ -1248,18 +1252,14 @@ public class Microwave implements AutoCl
}
}
securityConstraints.add(SecurityConstaintBuilder.class.cast(recipe.create()));
- } else if (prop.equals("configurationCustomizer.")) {
- final String next = prop.substring("configurationCustomizer.".length());
- if (next.contains(".")) {
- continue;
- }
- final ObjectRecipe recipe = new ObjectRecipe(properties.getProperty(prop + ".class"));
+ } else if (prop.equals("configurationCustomizer")) {
+ final ObjectRecipe recipe = new ObjectRecipe(properties.getProperty(prop));
for (final String nestedConfig : config.stringPropertyNames()) {
- if (nestedConfig.startsWith(prop) && !prop.endsWith(".class")) {
- recipe.setProperty(nestedConfig.substring(prop.length() + 1 /*dot*/), config.getProperty(nestedConfig));
+ if (nestedConfig.startsWith(prop + '.')) {
+ recipe.setProperty(nestedConfig.substring(prop.length() + 2 /*dot*/), config.getProperty(nestedConfig));
}
}
- addCustomizer(ConfigurationCustomizer.class.cast(recipe.create()));
+ addCustomizer(Consumer.class.cast(recipe.create()));
}
}
}
@@ -1389,10 +1389,6 @@ public class Microwave implements AutoCl
}
}
- public interface ConfigurationCustomizer {
- void customize(Builder configuration);
- }
-
private static class InternalTomcat extends Tomcat {
private void server(final Server s) {
server = s;
@@ -1558,4 +1554,8 @@ public class Microwave implements AutoCl
this.consumer = consumer;
}
}
+
+ // just to type it and allow some extensions to use a ServiceLoader
+ public interface ConfigurationCustomizer extends Consumer<Microwave.Builder> {
+ }
}
Modified: openwebbeans/microwave/trunk/microwave-doc/pom.xml
URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/microwave-doc/pom.xml?rev=1766782&r1=1766781&r2=1766782&view=diff
==============================================================================
--- openwebbeans/microwave/trunk/microwave-doc/pom.xml (original)
+++ openwebbeans/microwave/trunk/microwave-doc/pom.xml Thu Oct 27 08:21:28 2016
@@ -59,6 +59,20 @@
<groupId>org.apache.tomee</groupId>
<artifactId>ziplock</artifactId>
<version>7.0.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.tomee</groupId>
+ <artifactId>javaee-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.tomee</groupId>
+ <artifactId>openejb-jee</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.shrinkwrap</groupId>
+ <artifactId>shrinkwrap-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.microwave</groupId>
@@ -66,6 +80,21 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.microwave</groupId>
+ <artifactId>microwave-maven-plugin</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.microwave</groupId>
+ <artifactId>microwave-gradle-plugin</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.microwave</groupId>
+ <artifactId>microwave-arquillian</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jbake</groupId>
<artifactId>jbake-core</artifactId>
<version>2.4.0</version>
Modified: openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/JBake.java
URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/JBake.java?rev=1766782&r1=1766781&r2=1766782&view=diff
==============================================================================
--- openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/JBake.java (original)
+++ openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/JBake.java Thu Oct 27 08:21:28 2016
@@ -22,8 +22,10 @@ import com.orientechnologies.orient.core
import org.apache.commons.configuration.CompositeConfiguration;
import org.apache.commons.configuration.MapConfiguration;
import org.apache.microwave.Microwave;
+import org.apache.microwave.doc.generator.ArquillianConfiguration;
import org.apache.microwave.doc.generator.CliConfiguration;
import org.apache.microwave.doc.generator.Configuration;
+import org.apache.microwave.doc.generator.MavenConfiguration;
import org.jbake.app.ConfigUtil;
import org.jbake.app.Oven;
@@ -64,6 +66,8 @@ public class JBake {
// generation of dynamic content
new Configuration().run();
new CliConfiguration().run();
+ new ArquillianConfiguration().run();
+ new MavenConfiguration().run();
final Runnable build = () -> {
System.out.println("Building Microwave website in " + destination);
Added: openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/ArquillianConfiguration.java
URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/ArquillianConfiguration.java?rev=1766782&view=auto
==============================================================================
--- openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/ArquillianConfiguration.java (added)
+++ openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/ArquillianConfiguration.java Thu Oct 27 08:21:28 2016
@@ -0,0 +1,80 @@
+/*
+ * 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.microwave.doc.generator;
+
+import org.apache.microwave.arquillian.MicrowaveConfiguration;
+
+import java.lang.reflect.Field;
+import java.util.stream.Stream;
+
+import static java.util.Optional.ofNullable;
+import static java.util.stream.Collectors.joining;
+
+public class ArquillianConfiguration extends BaseGenerator {
+ @Override
+ protected String generate() {
+ return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+ "<arquillian xmlns=\"http://jboss.org/schema/arquillian\"\n" +
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
+ " xsi:schemaLocation=\"http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd\">\n" +
+ " <container qualifier=\"tomee-embedded\" default=\"true\">\n" +
+ " <configuration>\n" +
+ Stream.of(MicrowaveConfiguration.class.getDeclaredFields())
+ .sorted((o1, o2) -> o1.getName().compareTo(o2.getName()))
+ .map(opt -> " <property name=\"" + opt.getName() + "\">" + valueFor(opt) + "</property>")
+ .collect(joining("\n")) +
+ "\n </configuration>\n" +
+ " </container>\n" +
+ "</arquillian>\n";
+ }
+
+ private String valueFor(final Field opt) {
+ switch (opt.getName()) {
+ case "properties":
+ return "\n jpa.property.openjpa.RuntimeUnenhancedClasses=supported\n" +
+ " jpa.property.openjpa.jdbc.SynchronizeMappings=buildSchema\n" +
+ " ";
+ case "users":
+ return "\n admin=adminpwd\n" +
+ " other=secret\n" +
+ " ";
+ case "roles":
+ return "\n admin=admin\n" +
+ " limited=admin,other\n" +
+ " ";
+ case "cxfServletParams":
+ return "\n hide-service-list-page=true\n" +
+ " ";
+ case "realm":
+ return "org.apache.catalina.realm.JAASRealm:configFile=jaas.config;appName=app";
+ case "securityConstraints":
+ return "collection=sc1:/api/*:POST;authRole=**|collection=sc2:/priv/*:GET;authRole=*";
+ case "loginConfig":
+ return "authMethod=BASIC;realmName=app";
+ default:
+ }
+
+ opt.setAccessible(true);
+ try {
+ return ofNullable(opt.get(new MicrowaveConfiguration())).map(v -> v == null ? "" : v.toString()).orElse("");
+ } catch (final IllegalAccessException e) {
+ throw new IllegalStateException(e);
+ }
+ }
+}
Modified: openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/BaseGenerator.java
URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/BaseGenerator.java?rev=1766782&r1=1766781&r2=1766782&view=diff
==============================================================================
--- openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/BaseGenerator.java (original)
+++ openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/BaseGenerator.java Thu Oct 27 08:21:28 2016
@@ -38,4 +38,8 @@ public abstract class BaseGenerator impl
}
protected abstract String generate();
+
+ protected String tableConfig() {
+ return "[opts=\"header\",role=\"table table-bordered\"]\n";
+ }
}
Modified: openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/CliConfiguration.java
URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/CliConfiguration.java?rev=1766782&r1=1766781&r2=1766782&view=diff
==============================================================================
--- openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/CliConfiguration.java (original)
+++ openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/CliConfiguration.java Thu Oct 27 08:21:28 2016
@@ -28,7 +28,7 @@ import static java.util.stream.Collector
public class CliConfiguration extends BaseGenerator {
@Override
protected String generate() {
- return "[opts=\"header\"]\n|===\n|Name|Description\n" +
+ return super.tableConfig() + "|===\n|Name|Description\n" +
Stream.of(Microwave.Builder.class.getDeclaredFields())
.sorted((o1, o2) -> o1.getName().compareTo(o2.getName()))
.map(f -> f.getAnnotation(CliOption.class))
Modified: openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/Configuration.java
URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/Configuration.java?rev=1766782&r1=1766781&r2=1766782&view=diff
==============================================================================
--- openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/Configuration.java (original)
+++ openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/Configuration.java Thu Oct 27 08:21:28 2016
@@ -28,7 +28,7 @@ import static java.util.stream.Collector
public class Configuration extends BaseGenerator {
@Override
protected String generate() {
- return "[opts=\"header\"]\n|===\n|Name|Description\n" +
+ return super.tableConfig() + "|===\n|Name|Description\n" +
Stream.of(Microwave.Builder.class.getDeclaredFields())
.sorted((o1, o2) -> o1.getName().compareTo(o2.getName()))
.map(f -> "|" + f.getName() + "|" + f.getAnnotation(CliOption.class).description())
Added: openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/MavenConfiguration.java
URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/MavenConfiguration.java?rev=1766782&view=auto
==============================================================================
--- openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/MavenConfiguration.java (added)
+++ openwebbeans/microwave/trunk/microwave-doc/src/main/java/org/apache/microwave/doc/generator/MavenConfiguration.java Thu Oct 27 08:21:28 2016
@@ -0,0 +1,117 @@
+/*
+ * 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.microwave.doc.generator;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.stream.Stream;
+
+import static java.util.Optional.ofNullable;
+import static java.util.stream.Collectors.joining;
+import static org.apache.ziplock.JarLocation.jarLocation;
+
+public class MavenConfiguration extends BaseGenerator {
+ @Override
+ protected String generate() {
+ return super.tableConfig() + "|===\n|Name|Default|Property\n" +
+ loadConfiguration()
+ .sorted((o1, o2) -> o1.name.compareTo(o2.name))
+ .map(opt -> "|--" + opt.name + "|" + ofNullable(opt.defaultValue).orElse("-") + '|' + opt.property)
+ .collect(joining("\n")) + "\n|===\n";
+ }
+
+ private Stream<Config> loadConfiguration() {
+ try (final InputStream stream = new FileInputStream(new File(
+ jarLocation(MavenConfiguration.class).getParentFile().getParentFile().getParentFile(),
+ "microwave-maven-plugin/target/classes/META-INF/maven/plugin.xml"))) {
+ final SAXParserFactory factory = SAXParserFactory.newInstance();
+ factory.setNamespaceAware(true);
+ factory.setValidating(false);
+ final SAXParser parser = factory.newSAXParser();
+ final Collection<Config> configs = new ArrayList<>();
+ parser.parse(stream, new DefaultHandler() {
+ public Config config;
+ private boolean inMojo;
+ private boolean inConfiguration;
+ private StringBuilder builder;
+ private String goal;
+
+ @Override
+ public void startElement(final String uri, final String localName,
+ final String qName, final Attributes attributes) throws SAXException {
+ if ("mojo".equals(localName)) {
+ inMojo = true;
+ } else if ("goal".equals(localName)) {
+ builder = new StringBuilder();
+ } else if ("run".equals(goal) && "configuration".equals(localName)) {
+ inConfiguration = true;
+ } else if (inConfiguration) {
+ config = new Config();
+ configs.add(config);
+ config.name = localName;
+ config.defaultValue = attributes.getValue("default-value");
+ builder = new StringBuilder();
+ }
+ }
+
+ @Override
+ public void characters(final char[] ch, final int start, final int length) throws SAXException {
+ if (builder != null) {
+ builder.append(ch, start, length);
+ }
+ }
+
+ @Override
+ public void endElement(final String uri, final String localName, final String qName) throws SAXException {
+ if ("mojo".equals(localName)) {
+ inMojo = false;
+ goal = null;
+ } else if ("goal".equals(localName)) {
+ goal = builder.toString();
+ builder = null;
+ } else if ("run".equals(goal) && "configuration".equals(localName)) {
+ inConfiguration = false;
+ } else if (inConfiguration) {
+ config.property = builder.toString();
+ builder = null;
+ config = null;
+ }
+ }
+ });
+ return configs.stream();
+ } catch (final Exception e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ public static final class Config {
+ private String name;
+ private String defaultValue;
+ private String property;
+ }
+}
Added: openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/community.adoc
URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/community.adoc?rev=1766782&view=auto
==============================================================================
--- openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/community.adoc (added)
+++ openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/community.adoc Thu Oct 27 08:21:28 2016
@@ -0,0 +1,12 @@
+= Community
+:jbake-date: 2016-10-27
+:jbake-type: page
+:jbake-status: published
+:jbake-microwavepdf:
+:jbake-microwavetitleicon: icon icon_puzzle_alt
+:jbake-microwavecolor: body-pink
+:icons: font
+
+For now please use OpenWebBeans mailing-lists, JIRA and IRC channel.
+
+See http://openwebbeans.apache.org/community.html[OpenWebBeans Community] page for more details.
Modified: openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/microwave-core/configuration.adoc
URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/microwave-core/configuration.adoc?rev=1766782&r1=1766781&r2=1766782&view=diff
==============================================================================
--- openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/microwave-core/configuration.adoc (original)
+++ openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/microwave-core/configuration.adoc Thu Oct 27 08:21:28 2016
@@ -7,4 +7,55 @@
:jbake-microwavecolor: body-pink
:icons: font
+Microwave configuration is centralized in `org.apache.microwave.Microwave$Builder` class.
+
+Here are the main properties:
+
include::../../../../../target/generated-doc/Configuration.adoc[]
+
+NOTE: the class also provides some helper methods for programamtic use case like `randomHttpPort()`
+to automatically set an available port to `httpPort`.
+
+You can also write a `Consumer<Builder>` to configure programmatically the `Builder`
+and make it active using `addCustomizer(Consumer<Builder>)`.
+
+Example:
+
+[source,java]
+----
+new Microwave(new Builder()
+ .randomHttpPort()
+ .setTomcatScanning(false)
+ .setTomcatAutoSetup(false)
+ .setRealm(new JAASRealm())
+ .user("admin", "secret"))
+ .bake()
+ .await();
+----
+
+== Automatic configuration
+
+The `org.apache.microwave.Microwave$Builder` class also provides `loadFromProperties(Properties)`
+and `loadFrom(String)`. The last one uses the parameter to locate a propertiers file (file path or at classpath)
+and delegate the processing to the first one.
+
+`loadFromProperties(Propertiers)` loads the configuraton from the properties. The matching is alsmot
+1-1 with previous table excepted for these entries:
+
+- if `httpPort` is `-1` then `randomHttpPort` is called
+- `properties.x=y` will set the property (`properties` entry) `x` with the value `y`
+- `users.x=y` will create the user `x` with the password `y`
+- `roles.x=y` will create the role `x` with the users `y` (comma separated if multiple users)
+- `cxf.servlet.params.x=y` will force the CXF servlet init parameter `x` to be `y`
+- `connector.x=y` will pass the property `x` to be `y` on the connector
+- `connector.attributes.x=y` will use the property `x` with value `y` to create the connector (set a property on the instance of ̀`org.apache.catalina.connector.Connector`)
+- `realm=y` will create an instance of `y` (qualified name of the class) as `realm`
+- `realm.x=y` will set `x` property to `y` - needs previous property to be set
+- `login=` will create a custom `org.apache.microwave.Microwave$LoginConfigBuilder`
+- `login.x=y` will customize previous instance with `x` property
+- `securityConstraint=` will create a custom `org.apache.microwave.Microwave$SecurityConstaintBuilder`
+- `securityConstraint.x=y` will customize previous instance with `x` property
+- `configurationCustomizer=y` will create an instance of `y` to customize the configuration
+- `configurationCustomizer.x=y` will set `x` to `y` for the customizer
+
+TIP: out of the box, any `Builder` instance will read `microwave.properties`.
\ No newline at end of file
Modified: openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/microwave-maven/index.adoc
URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/microwave-maven/index.adoc?rev=1766782&r1=1766781&r2=1766782&view=diff
==============================================================================
--- openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/microwave-maven/index.adoc (original)
+++ openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/microwave-maven/index.adoc Thu Oct 27 08:21:28 2016
@@ -20,4 +20,6 @@ Coordinates:
TIP: most of the configuration is inherited from microwave-core.
-More coming soon, for now use gradle IDE integration or configuration documentation please.
+Here are the available options (see core configuration for the details):
+
+include::../../../../../target/generated-doc/MavenConfiguration.adoc[]
Modified: openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/testing/index.adoc
URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/testing/index.adoc?rev=1766782&r1=1766781&r2=1766782&view=diff
==============================================================================
--- openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/testing/index.adoc (original)
+++ openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/content/testing/index.adoc Thu Oct 27 08:21:28 2016
@@ -62,6 +62,9 @@ public class MonoMicrowaveRuleTest {
When using the mono runner, `@MonoMicrowave.Runner.ConfigurationInject` allows to still
access the configuration and random HTTP port.
+For the configuration, mono rule will use a global configuration shared by all tests. To load it
+it will use a standard `ServiceLoader` on type `org.apache.microwave.Microwave$ConfigurationCustomizer`.
+
== Arquillian Container
@@ -77,3 +80,10 @@ Container dependency:
----
For the configuration check link:../microwave-core/configuration.html[Core configuration].
+
+Here is a sample:
+
+[source,xml]
+----
+include::../../../../../target/generated-doc/ArquillianConfiguration.adoc[]
+----
Modified: openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/templates/page.gsp
URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/templates/page.gsp?rev=1766782&r1=1766781&r2=1766782&view=diff
==============================================================================
--- openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/templates/page.gsp (original)
+++ openwebbeans/microwave/trunk/microwave-doc/src/main/jbake/templates/page.gsp Thu Oct 27 08:21:28 2016
@@ -47,7 +47,7 @@
<ul id="doc-menu" class="nav doc-menu hidden-xs affix-top" data-spy="affix">
<li><a href="<%if (content.rootpath) {%>${content.rootpath}<% } else { %><% }%>/index.html">Home</a></li>
<li><a href="<%if (content.rootpath) {%>${content.rootpath}<% } else { %><% }%>/start.html">Quick Start</a></li>
- <li><a href="<%if (content.rootpath) {%>${content.rootpath}<% } else { %><% }%>/components.html">Extensions</a></li>
+ <li><a href="<%if (content.rootpath) {%>${content.rootpath}<% } else { %><% }%>/components.html">Components</a></li>
<li><a href="<%if (content.rootpath) {%>${content.rootpath}<% } else { %><% }%>/download.html">Download</a></li>
</ul><!--//doc-menu-->
</nav>
Modified: openwebbeans/microwave/trunk/microwave-junit/src/main/java/org/apache/microwave/junit/MonoMicrowave.java
URL: http://svn.apache.org/viewvc/openwebbeans/microwave/trunk/microwave-junit/src/main/java/org/apache/microwave/junit/MonoMicrowave.java?rev=1766782&r1=1766781&r2=1766782&view=diff
==============================================================================
--- openwebbeans/microwave/trunk/microwave-junit/src/main/java/org/apache/microwave/junit/MonoMicrowave.java (original)
+++ openwebbeans/microwave/trunk/microwave-junit/src/main/java/org/apache/microwave/junit/MonoMicrowave.java Thu Oct 27 08:21:28 2016
@@ -112,7 +112,7 @@ public class MonoMicrowave {
private static void doBoot() {
final Microwave.Builder configuration = new Microwave.Builder().randomHttpPort().noShutdownHook(/*the rule does*/);
StreamSupport.stream(ServiceLoader.load(Microwave.ConfigurationCustomizer.class).spliterator(), false)
- .forEach(c -> c.customize(configuration));
+ .forEach(c -> c.accept(configuration));
CONFIGURATION.compareAndSet(null, configuration);
final Microwave microwave = new Microwave(CONFIGURATION.get());