Added documentation for the jOOQ Maven plugin

This commit is contained in:
Lukas Eder 2011-09-26 18:09:10 +00:00
parent d4414bca4d
commit 67836af4df
7 changed files with 235 additions and 6 deletions

View File

@ -1,7 +1,7 @@
<?php
require 'frame.php';
function printH1() {
print 'Be part of jOOQ!<br/>Become a jOOQer';
print 'Be a part of jOOQ! Become a jOOQer';
}
function getSlogan() {
return "jOOQ can only be as great as its community. You can make the change happen! jOOQ needs
@ -18,7 +18,7 @@ function printContent() {
<ul>
<li>Lukas Eder: Project lead</li>
<li>Espen Stromsnes: DB2, H2, Sybase, and partial HSQLDB support, lots of helpful support</li>
<li>Sander Plas: jOOQ-wicket contribution</li>
<li>Sander Plas: jOOQ-codegen-maven, jOOQ-wicket contribution</li>
<li>Christopher Klewes: Maven integration, good ideas to enhance the code generator</li>
<li>Vladislav "FractalizeR" Rastrusny: Lots of constructive feedback, especially from the MySQL user perspective.</li>
<li>You: ...</li>

View File

@ -4,13 +4,18 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>jOOQ</title>
<title>jOOQ - <?php printH1(); ?></title>
<meta property="og:title" content="jOOQ" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://www.jooq.org" />
<meta property="og:image" content="http://www.jooq.org/img/logo.png" />
<meta property="og:site_name" content="jOOQ" />
<meta property="fb:admins" content="649865547" />
<meta name="description" content="jOOQ effectively combines complex SQL, typesafety, source code generation, active records, stored procedures, UDTs, and Java in a fluent API. Supported DBs are DB2, Derby, Ingres, H2, HSQLDB, MySQL, Oracle, Postgres, SQLite, SQL Server, Sybase"/>
<meta name="author" content="Lukas Eder"/>
<meta name="keywords" content="jOOQ, JDBC, database abstraction, source code generation, SQL, stored procedures, stored functions, UDT, UDF, typesafe, fluentAPI"/>
<link href="<?=$root?>/css/jooq.css" type="text/css" rel="stylesheet">
<link href="<?=$root?>/js/prettify/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<?=$root?>/js/prettify/prettify.js"></script>

View File

@ -28,7 +28,7 @@ function printContent() {
<a href="<?=$root?>/manual" title="The jOOQ Manual on multiple pages">A multi-paged HTML manual</a>
</li>
<li>A downloadable PDF manual</li>
<li>A downloadable PDF manual (coming soon)</li>
</ul>
<h3>Overview</h3>
@ -1604,7 +1604,81 @@ org.jooq.util.GenerationTool /jooq-config.properties</pre>
generatortargetpackage="org.jooq.test.generatedclasses"
generatortargetdirectory="${basedir}/src"/&gt;
&lt;/target&gt;</pre>
<h3>Integrate generation with Maven</h3>
<p>Using the official jOOQ-codegen-maven plugin, you can integrate
source code generation in your Maven build process: </p>
<pre class="prettyprint lang-xml">
&lt;plugin&gt;
&lt;!-- Specify the maven code generator plugin --&gt;
&lt;groupId&gt;org.jooq&lt;/groupId&gt;
&lt;artifactId&gt;jooq-codegen-maven&lt;/artifactId&gt;
&lt;version&gt;1.6.7&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 Postgres 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;8.4-702.jdbc4&lt;/version&gt;
&lt;/dependency&gt;
&lt;/dependencies&gt;
&lt;!-- Specify the plugin configuration --&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:postgres&lt;/url&gt;
&lt;schema&gt;public&lt;/schema&gt;
&lt;user&gt;postgres&lt;/user&gt;
&lt;password&gt;test&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;excludes&gt;&lt;/excludes&gt;
&lt;/database&gt;
&lt;generate&gt;
&lt;relations&gt;true&lt;/relations&gt;
&lt;deprecated&gt;false&lt;/deprecated&gt;
&lt;/generate&gt;
&lt;target&gt;
&lt;packageName&gt;org.jooq.util.maven.example&lt;/packageName&gt;
&lt;directory&gt;target/generated-sources/jooq&lt;/directory&gt;
&lt;/target&gt;
&lt;masterDataTables&gt;
&lt;masterDataTable&gt;
&lt;name&gt;t_language&lt;/name&gt;
&lt;literal&gt;cd&lt;/literal&gt;
&lt;description&gt;description&lt;/description&gt;
&lt;/masterDataTable&gt;
&lt;/masterDataTables&gt;
&lt;/generator&gt;
&lt;/configuration&gt;
&lt;/plugin&gt;
</pre>
<p>See the full example of a pom.xml including the jOOQ-codegen artefact here:
<a href="https://github.com/lukaseder/jOOQ/blob/master/jOOQ-codegen-maven-example/pom.xml" title="jOOQ-codegen-maven example pom.xml file">https://github.com/lukaseder/jOOQ/blob/master/jOOQ-codegen-maven-example/pom.xml</a>
</p>
<h3>Use jOOQ generated classes in your application</h3>
<p>Be sure, both jOOQ.jar and your generated package (see
configuration) are located on your classpath. Once this is done, you

View File

@ -212,7 +212,81 @@ org.jooq.util.GenerationTool /jooq-config.properties</pre>
generatortargetpackage="org.jooq.test.generatedclasses"
generatortargetdirectory="${basedir}/src"/&gt;
&lt;/target&gt;</pre>
<h3>Integrate generation with Maven</h3>
<p>Using the official jOOQ-codegen-maven plugin, you can integrate
source code generation in your Maven build process: </p>
<pre class="prettyprint lang-xml">
&lt;plugin&gt;
&lt;!-- Specify the maven code generator plugin --&gt;
&lt;groupId&gt;org.jooq&lt;/groupId&gt;
&lt;artifactId&gt;jooq-codegen-maven&lt;/artifactId&gt;
&lt;version&gt;1.6.7&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 Postgres 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;8.4-702.jdbc4&lt;/version&gt;
&lt;/dependency&gt;
&lt;/dependencies&gt;
&lt;!-- Specify the plugin configuration --&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:postgres&lt;/url&gt;
&lt;schema&gt;public&lt;/schema&gt;
&lt;user&gt;postgres&lt;/user&gt;
&lt;password&gt;test&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;excludes&gt;&lt;/excludes&gt;
&lt;/database&gt;
&lt;generate&gt;
&lt;relations&gt;true&lt;/relations&gt;
&lt;deprecated&gt;false&lt;/deprecated&gt;
&lt;/generate&gt;
&lt;target&gt;
&lt;packageName&gt;org.jooq.util.maven.example&lt;/packageName&gt;
&lt;directory&gt;target/generated-sources/jooq&lt;/directory&gt;
&lt;/target&gt;
&lt;masterDataTables&gt;
&lt;masterDataTable&gt;
&lt;name&gt;t_language&lt;/name&gt;
&lt;literal&gt;cd&lt;/literal&gt;
&lt;description&gt;description&lt;/description&gt;
&lt;/masterDataTable&gt;
&lt;/masterDataTables&gt;
&lt;/generator&gt;
&lt;/configuration&gt;
&lt;/plugin&gt;
</pre>
<p>See the full example of a pom.xml including the jOOQ-codegen artefact here:
<a href="https://github.com/lukaseder/jOOQ/blob/master/jOOQ-codegen-maven-example/pom.xml" title="jOOQ-codegen-maven example pom.xml file">https://github.com/lukaseder/jOOQ/blob/master/jOOQ-codegen-maven-example/pom.xml</a>
</p>
<h3>Use jOOQ generated classes in your application</h3>
<p>Be sure, both jOOQ.jar and your generated package (see
configuration) are located on your classpath. Once this is done, you

View File

@ -34,7 +34,7 @@ function printContent() {
<a href="<?=$root?>/manual" title="The jOOQ Manual on multiple pages">A multi-paged HTML manual</a>
</li>
<li>A downloadable PDF manual</li>
<li>A downloadable PDF manual (coming soon)</li>
</ul>
<h3>Overview</h3>

3
jOOQ-website/robots.txt Normal file
View File

@ -0,0 +1,3 @@
User-agent: *
Allow: /

View File

@ -11,7 +11,7 @@
<ul>
<li><a href="&lt;?=$root?&gt;/manual-single-page" title="The jOOQ Manual on one single page">A single-paged HTML manual</a></li>
<li><a href="&lt;?=$root?&gt;/manual" title="The jOOQ Manual on multiple pages">A multi-paged HTML manual</a></li>
<li>A downloadable PDF manual</li>
<li>A downloadable PDF manual (coming soon)</li>
</ul>
<h3>Overview</h3>
<p>This manual is divided into four main sections:</p>
@ -1410,7 +1410,80 @@ org.jooq.util.GenerationTool /jooq-config.properties</config>
generatortargetpackage="org.jooq.test.generatedclasses"
generatortargetdirectory="${basedir}/src"/&gt;
&lt;/target&gt;</xml>
<h3>Integrate generation with Maven</h3>
<p>Using the official jOOQ-codegen-maven plugin, you can integrate
source code generation in your Maven build process: </p>
<xml><![CDATA[
<plugin>
<!-- Specify the maven code generator plugin -->
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen-maven</artifactId>
<version>1.6.7</version>
<!-- The plugin should hook into the generate goal -->
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<!-- Manage the plugin's dependency. In this example, we'll use a Postgres database -->
<dependencies>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>8.4-702.jdbc4</version>
</dependency>
</dependencies>
<!-- Specify the plugin configuration -->
<configuration>
<!-- JDBC connection parameters -->
<jdbc>
<driver>org.postgresql.Driver</driver>
<url>jdbc:postgresql:postgres</url>
<schema>public</schema>
<user>postgres</user>
<password>test</password>
</jdbc>
<!-- Generator parameters -->
<generator>
<name>org.jooq.util.DefaultGenerator</name>
<database>
<name>org.jooq.util.postgres.PostgresDatabase</name>
<includes>.*</includes>
<excludes></excludes>
</database>
<generate>
<relations>true</relations>
<deprecated>false</deprecated>
</generate>
<target>
<packageName>org.jooq.util.maven.example</packageName>
<directory>target/generated-sources/jooq</directory>
</target>
<masterDataTables>
<masterDataTable>
<name>t_language</name>
<literal>cd</literal>
<description>description</description>
</masterDataTable>
</masterDataTables>
</generator>
</configuration>
</plugin>
]]></xml>
<p>See the full example of a pom.xml including the jOOQ-codegen artefact here:
<a href="https://github.com/lukaseder/jOOQ/blob/master/jOOQ-codegen-maven-example/pom.xml" title="jOOQ-codegen-maven example pom.xml file">https://github.com/lukaseder/jOOQ/blob/master/jOOQ-codegen-maven-example/pom.xml</a></p>
<h3>Use jOOQ generated classes in your application</h3>
<p>Be sure, both jOOQ.jar and your generated package (see
configuration) are located on your classpath. Once this is done, you