createGeneratePomTask function
Task
createGeneratePomTask(
- Result<
Artifact> artifact, - Iterable<
MapEntry< dependencies,String, DependencySpec> > - ResolvedLocalDependencies localDependencies
Create the generatePom task.
Implementation
Task createGeneratePomTask(
Result<Artifact> artifact,
Iterable<MapEntry<String, DependencySpec>> dependencies,
ResolvedLocalDependencies localDependencies) {
return Task(
(List<String> args) => _pom(
args,
createPom(
switch (artifact) {
Ok(value: var theArtifact) => theArtifact,
Fail(exception: var e) => throw e,
},
dependencies,
localDependencies)),
name: createPomTaskName,
phase: publishPhase,
runCondition: artifact.runCondition(),
argsValidator: const OptionalArgValidator(
'One argument may be provided: the POM destination'),
description: 'Generate Maven POM for publishing the project');
}