Project Dependencies

A typical dependency would look like the following:

<dependency>
  <groupId>NMaven.Its</groupId>
  <artifactId>NMaven.It.It0004</artifactId>
  <version>1.0.0</version>
  <type>dotnet:library</type>
</dependency>

dotnet:winexe and dotnet:exe can also be used as dependency types. dotnet:module can also be used but will not be transitive.

Dependencies in the Global Assembly Cache (GAC)

To use a GAC dependency, you will need to set a GAC_ROOT environment variable to point to either the Microsoft or Mono GAC root location. Then use the system scope as shown below. You can also use types: dotnet:gac_32 and dotnet:gac.

<dependency>
  <groupId>System.Windows.Forms</groupId>
  <artifactId>System.Windows.Forms</artifactId>
  <version>2.0.0.0</version>
  <type>dotnet:gac_msil</type>
  <scope>system</scope>
  <classifier>b77a5c561934e089</classifier>
  <systemPath>${env.GAC_ROOT}\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll</systemPath>
</dependency>

Artifact Conventions

The agreed upon conventions for NMaven artifacts are as follows:

  • standard Maven notation for group IDs, ie org.nunit, org.apache.maven.dotnet
  • CamelCase notation for artifact IDs, ie NUnit.Framework, System.DirectoryServices

For artifacts that need a different name on the filesystem, the finalName element of the POM can be used to override the artifact ID, eg fornunit.framework. This is often needed for files where the version is not to be included in the file name when the assembly is reused.