license-maven-plugin icon indicating copy to clipboard operation
license-maven-plugin copied to clipboard

Remove / modify custom license not possible

Open sonicsdoom opened this issue 2 years ago • 5 comments

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

sonicsdoom avatar May 19 '22 14:05 sonicsdoom

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.

stale[bot] avatar Jul 18 '22 19:07 stale[bot]

Yes, it is still relevant :)

phax avatar Jul 18 '22 19:07 phax

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: @.***>

sonicsdoom avatar Jul 18 '22 19:07 sonicsdoom

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.

stale[bot] avatar Sep 16 '22 20:09 stale[bot]

@mathieucarbou that feature was previously working and it should hopefully be a simple regression. Do you think you can tackle this one???

phax avatar Sep 16 '22 20:09 phax

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.

stale[bot] avatar Nov 15 '22 23:11 stale[bot]

yes it is

phax avatar Nov 15 '22 23:11 phax

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: @.***>

sonicsdoom avatar Nov 16 '22 06:11 sonicsdoom

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.

stale[bot] avatar Jan 15 '23 12:01 stale[bot]

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: @.***>

sonicsdoom avatar Jan 15 '23 13:01 sonicsdoom

Patiently waiting

CatPlanet avatar Mar 09 '23 00:03 CatPlanet

@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.

mathieucarbou avatar Mar 09 '23 07:03 mathieucarbou

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.

stale[bot] avatar May 23 '23 12:05 stale[bot]

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.

phax avatar May 23 '23 19:05 phax

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.

stale[bot] avatar Jul 22 '23 21:07 stale[bot]