dotnet:pack
Full name:
de.eitco.cicd:dotnet-maven-plugin:0.0.6:pack
Description:
This goal calls dotnet pack
creating nuget packages (*.nupgk
). The goal will call dotnet with --no-build
as the project was already built in the compile
phase by the {@code build
goal}.
Attributes:
- Requires a Maven project to be executed.
- The goal is not marked as thread-safe and thus does not support parallel builds.
- Binds by default to the lifecycle phase:
package
.
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<assemblyVersion> |
String |
- |
This parameter specifies the assembly version of this project. Keep in mind that the assembly version needs to consist of up to 4 numeric values separated by '.' e.g.: <major>.<minor>.<patch>.<build> . |
<customProperties> |
Map<String,String> |
- |
This parameter specifies custom properties given to dotnet via '-p:'. Keep in mind that the 'Version', 'Company', 'Description', 'RepositoryUrl' and 'AssemblyVersion' properties will be overwritten by their respective parameters, when specified. |
<description> |
String |
- |
This parameter specifies a description for the package created. Default: ${project.description} |
<dotnetExecutable> |
File |
- |
This parameter specifies the location of the dotnet executable. If not set dotnet being available by the PATH environment variable is assumed. |
<environmentVariables> |
Map<String,String> |
- |
This parameter specifies additional environment variables to be added to the dotnet process.
Note that the DOTNET_CLI_TELEMETRY_OPTOUT will be set to TRUE if not overwritten with this parameter. |
<localMavenNugetRepositoryBaseDirectory> |
String |
- |
This parameter specifies the location of the local nuget repository. The local nuget repository is a special file system repository this plugin copies the generated packages in the install phase to. This simulates mavens local repository.Default: ${settings.localRepository} |
<localMavenNugetRepositoryName> |
String |
- |
This parameter specifies the symbolic name of the local nuget repository. The local nuget repository is a special file system repository this plugin copies the generated packages in the install phase to. This simulates mavens local repository.
The location of the local nuget repository can be configured by localMavenNugetRepositoryBaseDirectory .Default: maven-nuget-local |
<nugetSources> |
Map<String,String> |
- |
This parameter specifies nuget sources to be added to the project. These are the locations where nuget will read dependencies from. The value of each entry is the url of the remote repository. The key is a unique name nuget will use to identify the repository by. It can also be used to add credentials to using <server> elements in the settings.xml .
Consider to encrypt passwords in your Note that crendentials added this way will be written to your nuget configuration file. On windows systems the credentials will be encrypted, however on linux systems password encryption is not supported by |
<projectVersion> |
String |
- |
This parameter specifies the version of this project given to dotnet by the -p:Version= command line parameter.Default: ${project.version} |
<repositoryUrl> |
String |
- |
This parameter specifies a URL to be added tp the package as its source. Default: ${project.scm.url} |
<snapshotReplacement> |
String |
- |
This parameter specifies the replacement of the suffix '-SNAPSHOT' in version properties Default: -build.%c |
<targetDirectory> |
File |
- |
This parameter specifies the directory where dotnet writes its generated package(s) to.Default: ${project.build.directory}/dotnet |
<vendor> |
String |
- |
This parameter specifies the Company added to the compiles executables or libraries.Default: ${project.organization.name} |
<versionProperties> |
Map<String,String> |
- |
This parameter specifies properties that contain versions. They will be handled differently than normal properties to honour '-SNAPSHOT' dependencies. This happens in two steps per property:
For example this configuration:
would result in two dotnet properties, referable with '$()' so that
|
<workingDirectory> |
File |
- |
This parameter specifies the directory where to execute dotnet and thus where the project files are locatedDefault: ${project.basedir} |
Parameter Details
<assemblyVersion>
<major>.<minor>.<patch>.<build>
.- Type:
java.lang.String
- Required:
No
<customProperties>
- Type:
java.util.Map<java.lang.String, java.lang.String>
- Required:
No
<description>
- Type:
java.lang.String
- Required:
No
- Default:
${project.description}
<dotnetExecutable>
dotnet
executable. If not set dotnet
being available by the PATH
environment variable is assumed.- Type:
java.io.File
- Required:
No
<environmentVariables>
dotnet
process.
Note that the
DOTNET_CLI_TELEMETRY_OPTOUT
will be set to TRUE
if not overwritten with this parameter.- Type:
java.util.Map<java.lang.String, java.lang.String>
- Required:
No
<localMavenNugetRepositoryBaseDirectory>
install
phase to. This simulates mavens local repository.- Type:
java.lang.String
- Required:
No
- Default:
${settings.localRepository}
<localMavenNugetRepositoryName>
install
phase to. This simulates mavens local repository.
The location of the local nuget repository can be configured by
localMavenNugetRepositoryBaseDirectory
.- Type:
java.lang.String
- Required:
No
- Default:
maven-nuget-local
<nugetSources>
nuget
will read dependencies from. The value of each entry is the url of the remote repository. The key is a unique name nuget
will use to identify the repository by. It can also be used to add credentials to using <server>
elements in the settings.xml
.
Consider to encrypt passwords in your settings.xml
Note that crendentials added this way will be written to your nuget configuration file. On windows systems the credentials will be encrypted, however on linux systems password encryption is not supported by nuget
- so the credentials will be written to the {code nuget} config way unencrypted.
- Type:
java.util.Map<java.lang.String, java.lang.String>
- Required:
No
<projectVersion>
dotnet
by the -p:Version=
command line parameter.- Type:
java.lang.String
- Required:
No
- Default:
${project.version}
<repositoryUrl>
- Type:
java.lang.String
- Required:
No
- Default:
${project.scm.url}
<snapshotReplacement>
version properties
- Type:
java.lang.String
- Required:
No
- Default:
-build.%c
<targetDirectory>
dotnet
writes its generated package(s) to.- Type:
java.io.File
- Required:
No
- Default:
${project.build.directory}/dotnet
<vendor>
Company
added to the compiles executables or libraries.- Type:
java.lang.String
- Required:
No
- Default:
${project.organization.name}
<versionProperties>
- it is checked whether the property value ends with '-SNAPSHOT'
- if not the value of the property is used
- if it does end with '-SNAPSHOT' the ending substring '-SNAPSHOT' is replaced with the value of the parameter
snapshotReplacement
- it is checked if the resulting string contains the string '%c'
- if not this is the value used
- if yes, the string will represent a version range: the minimum element is the string with every occurrence of '%c' replaced by '0', the (excluded) upper bound will be the string with every occurrence of '%c' replaced by 'A'
For example this configuration:
<versionProperties>
<apacheVersion>3.1.4</apacheVersion>
<someMavenDependencyVersion>1.5.6-dev-version-addendum-SNAPSHOT</someMavenDependencyVersion>
</versionProperties>
would result in two dotnet properties, referable with '$()' so that
$(apacheVersion) = 3.1.4
$(someMavenDependencyVersion) = [1.5.6-dev-version-addendum-build.0,1.5.6-dev-version-addendum-build.A)
- Type:
java.util.Map<java.lang.String, java.lang.String>
- Required:
No
<workingDirectory>
dotnet
and thus where the project files are located- Type:
java.io.File
- Required:
No
- Default:
${project.basedir}