title: How can I configure data source and jdbc driver using project-stages.yml?
body: <p>I'm trying to using wildfly-swarm with <code>project-stages.yml</code></p>
  
  <h3>src/main/resources/META-INF/persistence.xml</h3>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
               version="2.1"&gt;
    &lt;persistence-unit name="somePU" transaction-type="JTA"&gt;
      &lt;jta-data-source&gt;someDS&lt;/jta-data-source&gt;
      &lt;exclude-unlisted-classes&gt;false&lt;/exclude-unlisted-classes&gt;
      &lt;properties&gt;
        &lt;property name="javax.persistence.validation.mode" value="CALLBACK" /&gt;
      &lt;/properties&gt;
    &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <h3>src/main/resources/project-stages.yml</h3>
  
  <pre><code>project:
    stage: default
  ---
  project:
    stage: development
  logger:
    level: DEBUG
  swarm:
    jdbc:
      driver: org.apache.derby.jdbc.EmbeddedDriver
    ds:
      name: someDS
      connection:
        url: jdbc:derby:memory:someDB;create=true
    port:
      offset: 200
  ---
  project:
    stage: integration
  ---
  project:
    stage: staging
  ---
  project:
    stage: production
  </code></pre>
  
  <h3>mvn -Dswarm.project.stage=development -jar target/some-server-swarm.jar</h3>
  
  <pre><code>2017-01-07 18:09:48,782 ERROR [stderr] (main) java.lang.reflect.InvocationTargetException
  2017-01-07 18:09:48,782 ERROR [stderr] (main)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  2017-01-07 18:09:48,782 ERROR [stderr] (main)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  2017-01-07 18:09:48,783 ERROR [stderr] (main)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  2017-01-07 18:09:48,783 ERROR [stderr] (main)   at java.lang.reflect.Method.invoke(Method.java:498)
  2017-01-07 18:09:48,783 ERROR [stderr] (main)   at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:37)
  2017-01-07 18:09:48,783 ERROR [stderr] (main)   at org.wildfly.swarm.bootstrap.Main.run(Main.java:44)
  2017-01-07 18:09:48,783 ERROR [stderr] (main)   at org.wildfly.swarm.bootstrap.Main.main(Main.java:35)
  2017-01-07 18:09:48,784 ERROR [stderr] (main) Caused by: org.wildfly.swarm.container.DeploymentException: WFSWARM0007: Deployment failed: {"WFLYCTL0412: Required services that are not installed:" =&gt; ["jboss.naming.context.java.jboss.datasources.someDS"],"WFLYCTL0180: Services with missing/unavailable dependencies" =&gt; ["jboss.persistenceunit.\"some-server.war#somePU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.someDS]","jboss.persistenceunit.\"some-server.war#somePU\" is missing [jboss.naming.context.java.jboss.datasources.someDS]"]}
  2017-01-07 18:09:48,784 ERROR [stderr] (main)   at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:280)
  2017-01-07 18:09:48,784 ERROR [stderr] (main)   at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:95)
  2017-01-07 18:09:48,784 ERROR [stderr] (main)   at org.wildfly.swarm.Swarm.deploy(Swarm.java:475)
  2017-01-07 18:09:48,784 ERROR [stderr] (main)   at org.wildfly.swarm.Swarm.main(Swarm.java:612)
  2017-01-07 18:09:48,784 ERROR [stderr] (main)   ... 7 more
  2017-01-07 18:09:48,784 ERROR [stderr] (main) Exception in thread "main" java.lang.reflect.InvocationTargetException
  2017-01-07 18:09:48,785 ERROR [stderr] (main)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  2017-01-07 18:09:48,785 ERROR [stderr] (main)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  2017-01-07 18:09:48,785 ERROR [stderr] (main)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  2017-01-07 18:09:48,785 ERROR [stderr] (main)   at java.lang.reflect.Method.invoke(Method.java:498)
  2017-01-07 18:09:48,785 ERROR [stderr] (main)   at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:37)
  2017-01-07 18:09:48,785 ERROR [stderr] (main)   at org.wildfly.swarm.bootstrap.Main.run(Main.java:44)
  2017-01-07 18:09:48,785 ERROR [stderr] (main)   at org.wildfly.swarm.bootstrap.Main.main(Main.java:35)
  2017-01-07 18:09:48,785 ERROR [stderr] (main) Caused by: org.wildfly.swarm.container.DeploymentException: WFSWARM0007: Deployment failed: {"WFLYCTL0412: Required services that are not installed:" =&gt; ["jboss.naming.context.java.jboss.datasources.someDS"],"WFLYCTL0180: Services with missing/unavailable dependencies" =&gt; ["jboss.persistenceunit.\"some-server.war#somePU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.someDS]","jboss.persistenceunit.\"some-server.war#somePU\" is missing [jboss.naming.context.java.jboss.datasources.someDS]"]}
  2017-01-07 18:09:48,785 ERROR [stderr] (main)   at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:280)
  2017-01-07 18:09:48,786 ERROR [stderr] (main)   at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:95)
  2017-01-07 18:09:48,786 ERROR [stderr] (main)   at org.wildfly.swarm.Swarm.deploy(Swarm.java:475)
  2017-01-07 18:09:48,786 ERROR [stderr] (main)   at org.wildfly.swarm.Swarm.main(Swarm.java:612)
  2017-01-07 18:09:48,786 ERROR [stderr] (main)   ... 7 more
  </code></pre>