NMaven supports compiling of exe, winexe, library, and netmodule projects.
Target Type | Packaging |
exe | dotnet:exe |
winexe | dotnet:winexe |
library | dotnet:library |
netmodule | dotnet:module |
For example, the POM for compiling a library would look like:
<?xml version="1.0" encoding="UTF-8"?> <project> <modelVersion>4.0.0</modelVersion> <groupId>NMaven.Its</groupId> <artifactId>NMaven.It.It0000</artifactId> <packaging>dotnet:library</packaging> <version>1.0.0</version> <name>NMaven.It.It0000</name> <build> <sourceDirectory>.</sourceDirectory> <testSourceDirectory>Test</testSourceDirectory> <plugins> <plugin> <groupId>org.apache.maven.dotnet.plugins</groupId> <artifactId>maven-dotnet-compiler-plugin</artifactId> <extensions>true</extensions> </plugin> </plugins> </build> </project>
Note the extensions flag - this is required to make available the dotnet:* packaging types.
If you are using Mono on Windows, then set the vendor tag. If you are compiling on a non-Windows platform, then you do not need to set the tag.
<plugin> <groupId>org.apache.maven.dotnet.plugins</groupId> <artifactId>maven-dotnet-compiler-plugin</artifactId> <extensions>true</extensions> <configuration> <vendor>NOVELL</vendor> </configuration> </plugin>