1

我正在尝试使用maven 许可证插件版本 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>
4

1 回答 1

1

您可以通过添加解决此问题

<organizationName>My Organization</organizationName>
<inceptionYear>2017</inceptionYear>

到你的pom.xml的项目标签

于 2016-10-04T20:36:23.217 回答