NPanday Conventions

The following sections describe the conventions used within NPanday itself. This section is useful for developers wishing to contribute to NPanday, as well as developers looking for a baseline for their own projects. These conventions are evolving and subject to change as better ideas emerge.

Identifier Conventions

  • Artifact ID - specified within the pom - is equivalent to the project's module name.

    Project Structure

     |-- NPanday.Artifact
     |   `-- src
     |       `-- main
     |           `-- csharp
     |               `-- NPanday
     |                   `-- Artifact
     |                       |-- ArtifactContext.cs
     |                       `-- Artifact.cs
     `-- pom.xml
    

    pom.xml file

    <project xmlns="http://maven.apache.org/POM/4.0.0">
      <modelVersion>4.0.0</modelVersion>
      <groupId>org.apache.npanday</groupId>
      <artifactId>NPanday.Artifact</artifactId>
      <packaging>library</packaging>
      <version>0.9</version>
      <name>NPanday.Artifact</name>
    </project>
    
  • We use three Group IDs: org.apache.npanday, org.apache.npanday.plugins and org.apache.npanday.visualstudio. org.apache.npanday.plugins is for mojos or other plugin-related artifacts. org.apache.npanday.visualstudio groups Visual Studio Integration. And org.apache.npanday is for everything else.
    <project xmlns="http://maven.apache.org/POM/4.0.0">
      <modelVersion>4.0.0</modelVersion>
      <groupId>org.apache.npanday</groupId>
      <artifactId>NPanday.Artifact<artifactId>
      <packaging>library</packaging>
      <version>0.9</version>
      <name>NPanday.Artifact</name>
    </project>
    

Plugin Naming Convention

For plugins going forward, NPanday will use the normal convention of subject-maven-plugin, e.g. wix-maven-plugin.

Platform-specific Plugins

  • If an assembly will only compile under a specific platform, those values should be specified within the compiler-config.
     <project xmlns="http://maven.apache.org/POM/4.0.0">
      <modelVersion>4.0.0</modelVersion>
      <groupId>org.apache.npanday.pluginss</groupId>
      <artifactId>NPanday.Plugins</artifactId>
      <packaging>pom</packaging>
      <version>0.9</version>
      <name>NPanday.Plugins</name>
      <build>
        <sourceDirectory>src/main/csharp</sourceDirectory>
        <testSourceDirectory>src/test/csharp</testSourceDirectory>
        <plugins>
          <plugin>
            <groupId>org.apache.npanday.plugins</groupId>
            <artifactId>maven-compile-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
              <vendor>MONO</vendor>
              <frameworkVersion>2.0.50727</frameworkVersion>
              <vendorVersion>1.2.3.1</vendorVersion>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </project>