Assemblies

Signing Assemblies

To sign your assemblies you first need to create a key using the standard tools:

sn -k sgKey.snk

NMaven supports compile-time signing of assemblies. You can sign assemblies by using the keyfile field in the maven-dotnet-compiler-plugin. For example:

<plugin>
  <groupId>org.apache.maven.dotnet.plugins</groupId>
  <artifactId>maven-dotnet-compiler-plugin</artifactId>
  <configuration>
    <keyfile>sgKey.snk/keyfile>
  </configuration>
</plugin>

Note: Key signing is currently only supported for .NET framework 2.0.

Assembly Info

Provided that you do not have your own AssemblyInfo class in your project, NMaven will automatically generate one for you. It does the following mapping:

AssemblyDescription ${project.description}
AssemblyVersion ${project.version}
AssemblyTitle ${project.name}
AssemblyCompany ${project.organization.name}
AssemblyProduct ${project.organization.name}-${project.name}
AssemblyCopyright place a COPYRIGHT.txt file in your module directory and NMaven will pick it up and put it in the assembly

Since the POM version is mapped to the assembly manifest, you MUST follow the 0.0.0.0 version convention or the build will fail. You may, however, optionally add additional tags after the 0.0.0.0 version, such as -SNAPSHOT, alpha, etc. Valid versions would include 1.3.4 or 1.2-SNAPSHOT or 1.2-RC1.