Comments (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.
For sub-module projects, there is a lot of possibilities:
- 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 - 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
- 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
- Either redefine the path in your submodules (=> redefine the plugin with another path)
- Use the proposed solution above
from license-maven-plugin.
Related Issues (20)
- Large repos are slow with `${license.git.copyrightCreationYear}` HOT 7
- Missing header log message is incomplete HOT 5
- Replace dependabot with renovate HOT 14
- licenseSets do not work properly HOT 5
- Invalid plugin configuration: properties HOT 5
- Release 4.2.0 HOT 7
- Errors when importing a project into Eclipse 2023-03 that uses this plugin HOT 7
- Add suggestion to default `errorMessage` on how to fix missing/wrong license headers HOT 2
- Mandatory email in APACHE-2 template HOT 11
- Command Line flag to alter the list of included files to check HOT 7
- Support helm template comment style HOT 3
- license files should support http and https license headers HOT 8
- Support ignore the year check HOT 8
- Please update parent-pom - see PR HOT 1
- Adding Gradle related file extensions HOT 2
- Support executions on only changed files(for PR checks) HOT 5
- DefaultInlineHeaderStyles is not working HOT 2
- Make sure we use junit 5 jupiter only and start using the bom HOT 4
- plugin build setting HOT 6
- Release parent-pom to fix double 'source' runs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from license-maven-plugin.