-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Header is added instead of being replaced, if formats differ #242
Comments
This reverts commit 8c6c33b.
Fixed in PR #243 by introducing a new optional regex. |
Ok I understand a bit more... Let me review... |
Hi, I have the same problem even when the formatting is exactly the same. /*
* SWIFT (c) 2022. All rights reserved.
*
* This software and its associated documentation contain
* proprietary, confidential and trade secret information of
* S.W.I.F.T. SCRL, and except as provided in your contractual
* arrangements with S.W.I.F.T. SCRL.
* a) no part may be reproduced, made available,
* adapted or translated in any form or by any means, and
* b) this software may only be installed and used by a duly
* registered SWIFT User, SWIFT Partner or Service Bureau
* in compliance with the terms of the licence with SWIFT.
* This software may only be used to access and use the
* SWIFT services and products.
* For more information about what you may or may not do with
* this software and any related documentation, including any
* limitations on warranties and/or remedies, refer to your
* relevant contractual arrangements with SWIFT.
*/
/*
* SWIFT (c) 2021. All rights reserved.
*
* This software and its associated documentation contain
* proprietary, confidential and trade secret information of
* S.W.I.F.T. SCRL, and except as provided in your contractual
* arrangements with S.W.I.F.T. SCRL.
* a) no part may be reproduced, made available,
* adapted or translated in any form or by any means, and
* b) this software may only be installed and used by a duly
* registered SWIFT User, SWIFT Partner or Service Bureau
* in compliance with the terms of the licence with SWIFT.
* This software may only be used to access and use the
* SWIFT services and products.
* For more information about what you may or may not do with
* this software and any related documentation, including any
* limitations on warranties and/or remedies, refer to your
* relevant contractual arrangements with SWIFT.
*/ And I have the below configuration : <plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>4.1</version>
<configuration>
<header>license-header.txt</header>
<properties>
<license.year>2022</license.year>
</properties>
<includes>
<include>src/*/java/**/*.java</include>
</includes>
</configuration>
<executions>
<execution>
<id>first</id>
<goals>
<goal>format</goal>
</goals>
<phase>process-resources</phase>
</execution>
</executions>
</plugin> |
Please use 4.2.rc3 instead as this issue I believe was fixed. I haven't seen it in a long time myself and used to regularly. |
@AdrienHorgnies : copyright section detection is done by using keywords like "copyright". I think this is configurable with the licenseSet.keyworkds config |
Indeed, that's what it. Thanks; So my issue was only bad usage after all. |
If in multi line patterns the before pattern changes, the header is added instead of being replaced.
If the custom header style looks like this:
and the current header is
then only the first line is replaced with the new header (because the second line does not start with "**").
The text was updated successfully, but these errors were encountered: