Arquillian Configuration Module

discussion

#1

Hello, yesterday I was thinking in extending how arquillian extensions are configured. Currently we use this approach:

<extension qualifier="pact-consumer">
        <property name="pactReportDir">target/contracts</property>
</extension>
```

The problem is that sometimes in the extension you need to configure things that could be grouped since they have a direct relationship.

For example in case of Pact Consumer you might need to configure in one place the parameters of stub http server (binding ip, port, protocol) so all of them could be categorized as stub http configuration. But also you might want to configure which Pact version you want to generate in contracts or where you want to store the contracts.

To do it you might end with all attributes mixed:

```
<extension qualifier="pact-consumer">
        <property name="host">localhost</property> 
        <property name="pactReportDir">target/contracts</property>
        <property name="port">1233</property> 
        <property name="pactVersion">2</property>
</extension>
```

So maybe another way that we could give support is allowing grouping properties by category, something like:

```
<extension qualifier="pact-consumer">
        <property name="stub">
            host: localhost
            port: 1233
        </property> 
        <property name="pacts">
            version: 2
            reportDir: target/contracts
        </property>
</extension>
```

Notice that now each property can contain YML documents and also you don't need to qualify the attribute to pactVersion because you already know that you are configuring pacts.
For system properties you could still use them by doing `arq.extension.pact-consumer.pacts.version=3`

Another way to do would be to not mix xml and yml and just add support for arquillian.yml.

#2

I personally don’t like mixing two different formats. If we, for whatever reason, stick with XML let’s do it right. If we want more flexibility, as we don’t really leverage tooling that much for XML, let’s introduce YAML or sth else.


#3

@lordofthejars Do you expect this support on the level of arquillian-core or only on the level of extensions. I think that you use the second case in Cube. Personally, I had to introduce another format of a property (JSON) in Drone as I needed to define a map of maps there. http://arquillian.org/blog/2016/09/14/arquillian-extension-drone-2-0-1-Final/

To be honest, I cannot imagine the specification that would cover all possible use-cases mixing multiple formats in the arquillian.xml. If it was limited only for property values, then yes, then I would be feasible.