title: Jooq Maven and multiple schemas
body: <p>I'm trying to use maven to auto generate pojo for my postgres database.  Though even if I take maven out of the equation I have the issue.</p>
  
  <p>My data is split upon multiple schemas, and I'll need to work with all of them in my code base.  I'd like to know how I can accomplish this short of setting up a task for each one of them in maven.  This is what I have so far.</p>
  
  <p>Obviously this only seems to work for a single schema.  I'd like to be able to generate POJOs for multiple ones.  I tried multiple xml elements, or comma delimited but it just errors out.</p>
  
  <p><code>
      mvn -PDBGen generate-sources #is the command i use
  </code></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.foobar.sandbox&lt;/groupId&gt;
      &lt;artifactId&gt;playBox&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;properties&gt;
          &lt;jooq-version&gt;3.4.4&lt;/jooq-version&gt;
          &lt;psql-version&gt;9.1-901-1.jdbc4&lt;/psql-version&gt;
      &lt;/properties&gt;
  
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;DBGen&lt;/id&gt;
  
              &lt;build&gt;
                  &lt;plugins&gt;
  
                      &lt;!-- Maven Auto Generation --&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.jooq&lt;/groupId&gt;
                          &lt;artifactId&gt;jooq-codegen-maven&lt;/artifactId&gt;
                          &lt;version&gt;${jooq-version}&lt;/version&gt;
  
                          &lt;!-- The plugin should hook into the generate goal --&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;generate&lt;/goal&gt;
                                  &lt;/goals&gt;
                              &lt;/execution&gt;
                          &lt;/executions&gt;
  
                          &lt;!-- Manage the plugin's dependency. In this example, we'll use a PostgreSQL database --&gt;
                          &lt;dependencies&gt;
                              &lt;dependency&gt;
                                  &lt;groupId&gt;postgresql&lt;/groupId&gt;
                                  &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
                                  &lt;version&gt;${psql-version}&lt;/version&gt;
                              &lt;/dependency&gt;
                          &lt;/dependencies&gt;
  
                          &lt;!-- Specify the plugin configuration.
                               The configuration format is the same as for the standalone code generator --&gt;
                          &lt;configuration&gt;
  
                              &lt;!-- JDBC connection parameters --&gt;
                              &lt;jdbc&gt;
                                  &lt;driver&gt;org.postgresql.Driver&lt;/driver&gt;
                                  &lt;url&gt;jdbc:postgresql://localhost:5433/mydb&lt;/url&gt;
                                  &lt;user&gt;user&lt;/user&gt;
                                  &lt;password&gt;s3cret&lt;/password&gt;
                              &lt;/jdbc&gt;
  
                              &lt;!-- Generator parameters --&gt;
                              &lt;generator&gt;
                                  &lt;name&gt;org.jooq.util.DefaultGenerator&lt;/name&gt;
                                  &lt;database&gt;
                                      &lt;name&gt;org.jooq.util.postgres.PostgresDatabase&lt;/name&gt;
                                      &lt;includes&gt;.*&lt;/includes&gt;
                                      &lt;inputSchema&gt;ui&lt;/inputSchema&gt;
                                      &lt;excludes&gt;&lt;/excludes&gt;
                                  &lt;/database&gt;
                                  &lt;target&gt;
                                      &lt;packageName&gt;com.foobar.playbox.jooq.generated&lt;/packageName&gt;
                                      &lt;directory&gt;target/generated-sources/jooq&lt;/directory&gt;
                                  &lt;/target&gt;
                              &lt;/generator&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
  
      &lt;/profiles&gt;
  
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;!-- compiler --&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.7&lt;/source&gt;
                      &lt;target&gt;1.7&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;build-helper-maven-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;generate-sources&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;add-source&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;sources&gt;
                                  &lt;source&gt;target/generated-sources/jooq&lt;/source&gt;
                              &lt;/sources&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
  
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  
      &lt;dependencies&gt;
          &lt;!-- postgres --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;postgresql&lt;/groupId&gt;
              &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
              &lt;version&gt;${psql-version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- mysql --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;mysql&lt;/groupId&gt;
              &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
              &lt;version&gt;5.1.33&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- DataBase --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jooq&lt;/groupId&gt;
              &lt;artifactId&gt;jooq&lt;/artifactId&gt;
              &lt;version&gt;${jooq-version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jooq&lt;/groupId&gt;
              &lt;artifactId&gt;jooq-meta&lt;/artifactId&gt;
              &lt;version&gt;${jooq-version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jooq&lt;/groupId&gt;
              &lt;artifactId&gt;jooq-codegen&lt;/artifactId&gt;
              &lt;version&gt;${jooq-version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- Logging --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
              &lt;version&gt;1.7.7&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
              &lt;version&gt;1.7.7&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j&lt;/artifactId&gt;
              &lt;version&gt;1.2.16&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- Test --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mockito&lt;/groupId&gt;
              &lt;artifactId&gt;mockito-all&lt;/artifactId&gt;
              &lt;version&gt;1.9.5&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>