Maven Plugins

compared with
Current by Timo Westkämper
on Mar 17, 2010 11:05.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 1 changes. View first change.

 {section}
  
 {column:width=70%}
  
 h2. Description
  
 Maven Plugins provides common Maven 2 plugins used in our projects for any interested party.
  
 The artifacts are identified in the following form : com.mysema.maven:<plugin>:<version>
  
 {socialbookmarks}
  
 h2. Overview
  
 || plugin \\ || description \\ || goals \\ || latest version \\ ||
 | maven-apt-plugin \\ | Plugin for JDK6 APT based code generation \\ | process \\ | 0.3.1 \\ |
 | | | test-process | |
 | maven-version-plugin \\ | Plugin for version update of POM \\ | increment \\ | 0.1.0 \\ |
 | | | set (-Dversion=<version>) \\ | |
 | dbmaintain-maven-plugin\\ | Plugin for dbmaintain usage in maven\\ | | 1.0.4\\ |
  
 h2. maven-apt-plugin
  
 maven-apt-plugin provides Maven integration of the Java 6 APT functionality.
  
 The supported goals are
 * process
 * test-process
  
 Here is an example of a configuration
  
 {code}
 <plugin>
  <groupId>com.mysema.maven</groupId>
  <artifactId>maven-apt-plugin</artifactId>
  <version>0.3.1</version>
  <executions>
  <execution>
  <goals>
  <goal>process</goal>
  </goals>
  <configuration>
  <outputDirectory>target/generated-sources/java</outputDirectory>
  <processor>com.mysema.rdfbean.query.BeanAnnotationProcessor</processor>
  </configuration>
  </execution>
  </executions>
 </plugin>
 {code}
  
 h2. maven-version-plugin
  
 To use maven-version-plugin include the following configuration in your POM :
  
 {code}
  <plugin>
  <groupId>com.mysema.maven</groupId>
  <artifactId>maven-version-plugin</artifactId>
  <version>0.1.0</version>
  </plugin>
 {code}
  
 Now you can update the version of your POM and of all the children via
  
 {code}
 mvn version:set -Dversion=<NEW VERSION HERE>
 {code}
  
 h2. dbmaintain-maven-plugin
  
 dbmaintain-maven-plugin is a thin wrapper for dbmaintain Maven integration. The supported goals are
  
 * checkScriptUpdates
 * checkScriptUpdates
 * clearDatabase
 * createScriptArchive
 * disableConstraints
 * markDatabaseAsUpToDate
 * updateDatabase
 * updateSequences
  
 The semantics are the same as the methods with the same name in the org.dbmaintain.launch.DbMaintain class.
  
 Here is an example of a configuration
  
 {code}
 <plugin>
  <groupId>com.mysema.maven</groupId>
  <artifactId>dbmaintain-maven-plugin</artifactId>
  <version>1.0.4</version>
  <configuration>
  <configFile>${basedir}/src/main/sql/dbmaintain/dbmaintain.properties</configFile>
  <properties>
  <!-- place overrides here -->
  </properties>
  </configuration>
   <executions>
  <execution>
  <phase>process-classes</phase>
  <goals>
  <goal>updateDatabase</goal>
  </goals>
  </execution>
  </executions>
  <dependencies>
  <dependency>
  <groupId>mysql</groupId>
  <artifactId>mysql-connector-java</artifactId>
  <version>5.1.6</version>
  </dependency>
  </dependencies>
 </plugin>
  
 {code}
  
 h2. FAQ
  
 *Where do I get releases?*
 [here|http://source.mysema.com/maven2/releases/com/mysema/maven]
  
 *Where do I get snapshots?*
 [here|http://source.mysema.com/maven2/snapshots/com/mysema/maven]
  
 {column}
 {column}
  
 h2. In a nutshell
  
 || Name | Maven Plugins ||
 || State | {color:green}Stable{color} ||
 || License | LGPL v2.1 ||
 || Version Control | [on Mysema Source|https://source.mysema.com/svn/mysema/projects/maven/] ||
 || Maven repo | [on Mysema Source|http://source.mysema.com/maven2/releases] ||
 {column}
 {section}