license-maven-plugin
license-maven-plugin copied to clipboard
Remove / modify custom license not possible
Version affected
4.1. and 4.2.rc3
Describe the bug
I have added a custom license text header, unfortunately I cannot remove it using the "remove" function.
If I change the license text and call the function "format" again, the old header is not overwritten but extended by the new license text.
If I use a standard license, the functions "remove" and "format" work normally.
How to Reproduce
License-file: LICENSE
My Licenseinfo
Downloadlink: com.foo.bar
My maven-pom:
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>4.2.rc3</version>
<configuration>
<header>LICENSE</header>
<includes>
<include>src/main/**</include>
</includes>
</configuration>
<dependencies>
<dependency>
<groupId>com.foo.bar</groupId>
<artifactId>my-license</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
1st step:
mvn license:format
result in java-class:
/*
* My Licenseinfo
*
* Downloadlink: com.foo.bar
*/
package com.foo.bar;
import ...
2nd step:
mvn license:remove
expected behaviour: License will be removed
actual behaviour: License is still present in header
console log:
[INFO] --- license-maven-plugin:4.2.rc3:remove (default-cli) @ example-core ---
[INFO] Removing license headers...
[INFO] Removing license header from: C:\example\core\src\main\java\com\foo\bar\bar.java
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Yes, it is still relevant :)
Yes it is
stale[bot] @.***> schrieb am Mo., 18. Juli 2022, 21:11:
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
— Reply to this email directly, view it on GitHub https://github.com/mathieucarbou/license-maven-plugin/issues/372#issuecomment-1188156557, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASJEZC2EMAUWZX7SQ5MAZF3VUWT4VANCNFSM5WMNNPRA . You are receiving this because you authored the thread.Message ID: @.***>
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
@mathieucarbou that feature was previously working and it should hopefully be a simple regression. Do you think you can tackle this one???
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
yes it is
Yes it is
Philip Helger @.***> schrieb am Mi., 16. Nov. 2022, 00:53:
yes it is
— Reply to this email directly, view it on GitHub https://github.com/mathieucarbou/license-maven-plugin/issues/372#issuecomment-1316044186, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASJEZC2H2P35Z63JRBBRYZLWIQO7NANCNFSM5WMNNPRA . You are receiving this because you authored the thread.Message ID: @.***>
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Yes
stale[bot] @.***> schrieb am So., 15. Jan. 2023, 13:11:
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
— Reply to this email directly, view it on GitHub https://github.com/mathieucarbou/license-maven-plugin/issues/372#issuecomment-1383134936, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASJEZC2ETZMVZQ63WGRKILDWSPSOVANCNFSM5WMNNPRA . You are receiving this because you authored the thread.Message ID: @.***>
Patiently waiting
@sonicsdoom @phax @CatPlanet : this works as expected. License removal is not linked to the configured license: it is based on header patterns and keywords. There is a keyword parameter you can use so that MLP can detect a header to remove. The default keyword is copyright
.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
I think the main problem on my side was, that I was using the legacy configuration. After changing to the new configuration layout it seems to work. So my assumption is, that the backporting of the configuration params jn this matter is not 100% clean. But I stopped digging into it.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.