Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin configuration to support multi-licensing scenarios #166

Merged

Conversation

adamretter
Copy link
Contributor

This adds support for source-code projects that use multi-licensing (e.g. dual-licensing).

If your source code makes use of multi-licensing, then instead of
a <header> or <inlineHeader> element in the configuration
you can use a <multi> element.

The <multi> element allows you to specify an optional preamble,
one or more header (or inlineHeader) and separators between them. These
options are concatenated together to produce a header template.

    <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>X.Y.ga</version>
        <configuration>
            <multi>
                <preamble><![CDATA[This product is dual-licensed under both the GPLv2 and Apache 2.0 License.]]></preamble>
                <header>GPL-2.txt</header>
                <separator>======================================================================</separator>
                <header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header>
            </multi>
            <properties>
                <owner>Mycila</owner>
                <email>[email protected]</email>
            </properties>
            <excludes>
                <exclude>**/README</exclude>
                <exclude>src/test/resources/**</exclude>
                <exclude>src/main/resources/**</exclude>
            </excludes>
        </configuration>
        <executions>
            <execution>
                <goals>
                    <goal>check</goal>
                </goals>
            </execution>
        </executions>
    </plugin>

Copy link
Owner

@mathieucarbou mathieucarbou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn' try the feature, didn't deeply look at the changes but this is a cool addition and they seem pretty much addition. thanks!

@mathieucarbou mathieucarbou added this to the 4.0 milestone Jun 5, 2020
@mathieucarbou mathieucarbou merged commit 126ebe6 into mathieucarbou:master Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants