Giter Site home page Giter Site logo

Comments (2)

matthesrieke avatar matthesrieke commented on June 27, 2024 2

how about disabling the plugin in the sub-modules? maybe this fits for your setup. I am currently attaching the license checking to the initialize phase, but only on the root project.

<plugin>
    <groupId>com.mycila</groupId>
    <artifactId>license-maven-plugin</artifactId>
    <version>2.2</version>
    <inherited>false</inherited>
    <configuration>
        <header>${license.header.file}</header>
        <aggregate>true</aggregate>
        <includes>
            <include>**/*.java</include>
        </includes>
        <properties>
            <inceptionYear>${project.inceptionYear}</inceptionYear>
            <latestYearOfContribution>${currentYear}</latestYearOfContribution>
        </properties>
    </configuration>
    <executions>
        <execution>
            <id>check-headers</id>
            <phase>initialize</phase>
            <goals>
                <goal>check</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Note <inherited>false</inherited> and <aggregate>true</aggregate> which are required to disable the execution in submodules and to crawl through the sub-modules src folders.

from license-maven-plugin.

mathieucarbou avatar mathieucarbou commented on June 27, 2024

For sub-module projects, there is a lot of possibilities:

  1. Either use a default header MIT, Apache 2, etc. already contained in the plugin
    http://code.mycila.com/license-maven-plugin/#license-templates
    access using: classpath:/path/to/template
  2. Either create a single jar containing your license files and add this jar as a dependency of the plugin to access the header using classpath:/path/to/header
  3. Either define the MLP in a dependency management section with the path being the path used for your submodules and just use the dependency where you need in the submodules
  4. Either redefine the path in your submodules (=> redefine the plugin with another path)
  5. Use the proposed solution above

from license-maven-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.