Я пытаюсь запустить пользовательское mojo через командную строку (без файла pom)
mvn com.example.org:ei-mojos:1.0.073:apply-freemarker-template -DsrcDir=target -Dtemplate=createConfig.ftl -DoutputFile=config.json
Но я получаю сообщение об ошибке от Maven
Failed to execute goal com.example.org:ei-mojos:1.0.175:apply-freemarker-template (default-cli) on project standalone-pom: The parameters 'outputFile', 'templateName', 'srcDir' for goal com.example.org:ei-mojos:1.0.175:apply-freemarker-template are missing or invalid -> [Help 1]
Вот фрагмент mojo
@Mojo(name = "apply-freemarker-template", requiresProject = false)
public class FreeMarkerMojo extends AbstractMojo {
/**
* The source directory containing the input files.
*/
@Parameter(required = true, readonly = true)
private File srcDir;
/**
* The template file to be processed.
*/
@Parameter(alias = "template", required = true, readonly = true)
private String templateName;
/**
* The location of the output file.
*/
@Parameter(required = true, readonly = true)
private File outputFile;
/**
* Data models to be used during template processing.
*/
@Parameter(required = false, readonly = true)
private HashMap<String, String> dataModels;
Возможно ли вызвать этот плагин из командной строки? Кроме того, как бы я go о указании параметра dataModels? Это выглядит так в пом. xml
<configuration>
<template>createconfig.ftl</template>
<outputFile>${project.build.directory}/config.json</outputFile>
<dataModels>
<abc>abc.json</abc>
<def>def.json</def>
<xxx>xxx.json</xxx>
</dataModels>
</configuration>