Skip to content
rsutphin edited this page Mar 2, 2011 · 2 revisions

Maven 2 plugin

Bering provides a plugin to integrate it with your maven builds.

30 second version

  1. Modify your POM:
<project>
  <pluginRepositories>
    ...
    <!-- bering is not yet in the main public repo -->
    <pluginRepository>
      <id>download.bioinformatics.northwestern.edu</id>
      <name>Northwestern RHLCCC Bioinformatics</name>
      <url>http://download.bioinformatics.northwestern.edu/download/maven2</url>
      <!-- If you want to use the bleeding-edge version:
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      -->
    </pluginRepository>
    ...
  </pluginRepositories>
  ...
  <build>
    ...
    <plugins>
      ...
      <plugin>
        <groupId>edu.northwestern.bioinformatics</groupId>
        <artifactId>bering-maven-plugin</artifactId>
        <configuration>
          <url>jdbc:postgresql:etc</url>
          <dialect>edu.northwestern.bioinformatics.bering.dialect.PostgreSQL</dialect>
          <driver>org.postgresql.Driver</driver>
          <username>etc</username>
          <password></password>
        </configuration>
        <!-- Make your JDBC driver available to the plugin -->
        <dependencies>
          <dependency>
            <groupId>postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>8.2-504.jdbc3</version>
            <scope>runtime</scope>
          </dependency>
        </dependencies>
      </plugin>
      ...
    </plugins>
    ...
  </build>
</project>
  1. Modify your settings.xml:
<settings>
  ...
  <pluginGroups>
    <pluginGroup>edu.northwestern.bioinformatics</pluginGroup>
  </pluginGroups>
  ...
</settings>
  1. Execute:
$ mvn bering:migrate
Clone this wiki locally