Maven许可证插件:参数'organizationName',...缺失或无效

时间:2016-10-04 18:35:17

标签: maven pom.xml maven-plugin license-maven-plugin

我正在尝试使用maven license plugin版本1.9。我正在运行目标 update-license-header 但是我收到以下错误:

[ERROR] Failed to execute goal org.codehaus.mojo:license-maven-plugin:1.9:update-file-header (default-cli) on project myproject: The parameters 'organizationName', 'inceptionYear' for goal org.codehaus.mojo:license-maven-plugin:1.9:update-file-header are missing or invalid -> [Help 1]

我的pom.xml看起来像这样

<project>
    ...
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>1.9</version>
                <configuration>
                    <verbose>false</verbose>
                    <addSvnKeyWords>true</addSvnKeyWords>
                </configuration>
                <executions>
                    <execution>
                        <id>first</id>
                        <goals>
                            <goal>update-file-header</goal>
                        </goals>
                        <phase>process-sources</phase>
                        <configuration>
                            <licenseName>gpl_v3</licenseName>
                            <organizationName>My Organization</organizationName>
                            <inceptionYear>2017</inceptionYear>
                            <roots>
                                <root>src/main/java</root>
                                <root>src/test</root>
                            </roots>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

1 个答案:

答案 0 :(得分:1)

您可以通过添加

来解决此问题
<organizationName>My Organization</organizationName>
<inceptionYear>2017</inceptionYear>

pom.xml

的项目标记
相关问题