Create Maven Plugin

15. November 2008

Here are a simple guide to create simple maven plugins

I have created a simple maven plugin to connect a java project to VDM Tools. This means that VDM files will be type checked at project buid and a vdmJava goal is added to support vdm to java code gen inside the eclipse project.

POM file for project using the plugin

<build>

<plugins>

<plugin>

           <groupId>org.overture.maven.plugin</groupId>

          <artifactId>vdmForMaven</artifactId>

           <configuration>

                      <mainVdmDirectory>src\main\vdm</mainVdmDirectory>

                      <mainJavaDirectory>src\main\java</mainJavaDirectory>

                      <javaPackage>org.overture.umltrans</javaPackage>

                      <testVdmDirectory>src\test\vdm</testVdmDirectory>

                      <testJavaDirectory>src\test\java</testJavaDirectory>

                      <vdmToolsCmd>c:\Program Files\The VDM++ Toolbox v8.1.1b\bin\vppde.exe</vdmToolsCmd>

           </configuration>

         <executions>

          <execution>

            <phase>compile</phase>

            <goals>

              <goal>typeCheck</goal>

            </goals>

          </execution>

        </executions>

</plugin>

</plugins>

</build>

Goals:

Code gen: org.overture.maven.plugin:vdmJava

Type check: .overture.maven.plugin:typeCheck

 

plugin mavn.zip (116.48 kb)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Maven

Comments

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading