Hi,

this PR includes the LICENSE.txt file in the META-INF directory when a jar is built. This should fix #15643 .

Let me know what you think. Cheers, Christoph

Comment From: dreis2211

I've added a test, @snicoll . Deciding what LICENSE.txt and/or if a notice.txt should be added, seems to be outside of my hands at the moment, but I'm happy to add anything after you made a decision.

Comment From: snicoll

Thanks Christoph. I've added this one for team attention so that we figure it out during our next meeting.

Comment From: wilkinsona

We discussed this today and concluded that:

  • We should include a LICENSE.txt file in the deployed jars with the same contents as the file in the root of the repo
  • Rather than using the file in the root of the repo, we'd like to use a file in src/main/resources of the buildSrc plugins.
  • We should include a NOTICE.txt file in the deployed jars. The file should have the following contents:
Spring Boot ${version}
Copyright (c) 2012-${currentYear} Pivotal, Inc.

This product is licensed to you under the Apache License, Version 2.0
(the "License"). You may not use this product except in compliance with
the License.

@dreis2211 If the offer still stands, would you like to update this PR to reflect the above?

Comment From: dreis2211

Sure, @wilkinsona . Give me a minute or two.

Comment From: dreis2211

Okay it was an hour, but it should be done now. Let me know if this is what you had in mind.

BTW: I have a bit of trouble to run the tests in buildSrc from IDEA which makes it quite a bit harder to debug them. Is there any trick to it?

Comment From: wilkinsona

BTW: I have a bit of trouble to run the tests in buildSrc from IDEA which makes it quite a bit harder to debug them. Is there any trick to it?

Sorry, I'm not sure how IDEA handle's buildSrc. In Eclipse, I've just imported it alongside all the other modules and can then run its tests as usual.

Comment From: snicoll

No problem here either but I am on 2020.1 EAP. As long as you delegate to Gradle, it should just work(tm).

Comment From: wilkinsona

It's just occurred to me that the suggestion to use ${currentYear} was a bad one as it'll break the repeatability of the build. We should probably just hardcode it and update as needed. We can make that amendment as part of merging.

Comment From: wilkinsona

Thanks very much, @dreis2211.

Comment From: dreis2211

Thanks for the proper review, @wilkinsona