Available Packaging Types
NPanday defines a couple of .NET-related packaging types that can both be used in primary or secondary project outputs or dependencies.
Certain plugins bind so called Lifecycle Mappings (goal executions per Maven Lifecycle) to corresponding packaging types; this means, that if your pom has a specific packaging, and one of these special plugins is configured with <extensions>true</extensions>, Maven will automatically trigger the needed goals to create and attach the wanted artifact(s).
Maven Compile Plugin
To make types and lifecycles for the Maven Compile Plugin available, add the following declaration to your pom file.
The maven-compile-plugin provides the following main packaging types:
- dotnet-library - builds and packages a DLL assembly file. (Deprecated naming: library)
- dotnet-executable - builds and packages an EXE assembly file (Deprecated naming: exe)
- dotnet-windows-executable - builds and packages an EXE assembly file using the winexe target type (Deprecated naming: winexe)
- dotnet-module - builds a module file, which can be linked into assemblies using the link plugin (Deprecated naming: netmodule)
- dotnet-maven-plugin - creates a .NET-based Maven Plugin and generates the corresponding java binding (Deprecated naming: netplugin)
- It will further handle visual-studio-addin and sharp-develop-addin, and in the same way as it handles dotnet-library.
Azure Maven Plugin
The Azure Maven Plugin defines following types:
- azure-cloud-service - packages an Azure application as *.cspkg * azure-cloud-service-configuration - dependency type used for attaching configurations to be deployed along with the main Azure package (cspkg).
Web pages and "real" packaging
In addition to the compiled assembly you might also want to publish "runnable" applications. Currently NPanday offers three packaging types for that:
- dotnet-application - Package executables or plugin assemblies with all dependencies and other needed runtime files application-maven-plugin
- msdeploy-package - Package MSDeploy-enabled web-applications using the aspnet-maven-plugin
- asp - uses the ASPX plugin to assemble and possibly precompile an ASP.NET project
Read more about packaging applications.
Custom Lifecycle Maven Plugin
If none of the available default packaging lifecycles match your needs, you may use the Custom Lifecycle Maven Plugin, which allows you to install, deploy and resolve all types known to NPanday.
- dotnet-archive - just a zip-file; can be used, if none of the other types fit you. It is recommended to create the zip using the Maven Assembly Plugin, then.
- When you resolve a dotnet-archive you might want to use depencendy:unpack-dependencies to unpack it before you compile against your dependencies.
Further Dependency Types
When attaching or resolving various .NET-related artifacts, these dependency types may be helpful:
- dotnet-executable-config and dotnet-library-config - references to .NET configuration files
- dotnet-symbols - PDB debug information for libraries or executables
- ole-type-library - TLB-files containing type descriptors for .NET COM Interop
- dotnet-vsdocs - XML-file containing intellisense information for libraries or executables
- dotnet-gac, gac_32 - dependencies in the respective GAC types variants (Deprecated: gac, gac_generic, gac_msil)
All packaging/dependency types and their corresponding file extensions known to NPandays plugins are also declared here: ArtifactType.java