Skip to content

Commit

Permalink
CLDR-16466 move unicode-license.txt to LICENSE
Browse files Browse the repository at this point in the history
- this is the standard name for this file, gets prominent display on github.com etc.
- fixup some issues with the LICENSE file's inclusion in the cldr-code jar
  • Loading branch information
srl295 committed Apr 11, 2023
1 parent 1ccdfcb commit 10bb919
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ begin with the accepted Jira ticket number.

### Licenses

- Usage of CLDR data and software is governed by the Unicode [Terms of use][] a copy of which is included as [unicode-license.txt][]
- Usage of CLDR data and software is governed by the Unicode [Terms of use][] a copy of which is included as [LICENSE][]
- Some CLDR tools depend on libraries in tools/cldr-code/libs/; use of these libraries is governed by separate license agreements.
- For example, use of the Guava, Xerces, and Myanmar Tools libraries is subject to the Apache License included as [apache-license.txt](./apache-license.txt)
- Use of the ICU libraries is subject to the ICU License, included as [ICU-LICENSE](./ICU-LICENSE).
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ For details about code and other contributions, see [CONTRIBUTING.md](./CONTRIBU
### Licenses

- Usage of CLDR data and software is governed by the [Unicode Terms of Use](https://www.unicode.org/copyright.html)
a copy of which is included as [unicode-license.txt](./unicode-license.txt).
a copy of which is included as [LICENSE](./LICENSE).

- Some CLDR tools depend on library dependencies managed via Maven,
use of these libraries is governed by separate license agreements.
Expand Down
2 changes: 1 addition & 1 deletion readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h3>ReadMe for Unicode <abbr title="Common Locale Data Repository">CLDR</abbr> v
<p>Licenses:</p>
<ul>
<li>Usage of CLDR data and software is governed by the <a href="http://www.unicode.org/copyright.html">Unicode Terms of Use</a>,
a copy of which is included as unicode-license.txt.</li>
a copy of which is included as LICENSE.</li>
<li>Some CLDR tools depend on libraries in tools/cldr-code/libs/; use of these libraries is governed by separate license agreements.
<ul>
<li>Use of the ICU libraries is subject to the
Expand Down
2 changes: 1 addition & 1 deletion tools/cldr-apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ CLDR_MAIL_DELAY_BATCH_ITEM=0
### Licenses

- Usage of CLDR data and software is governed by the [Unicode Terms of Use](https://www.unicode.org/copyright.html)
a copy of which is included as [unicode-license.txt](../../unicode-license.txt).
a copy of which is included as [LICENSE](../../LICENSE).

For more details, see the main [README.md](../../README.md).

Expand Down
21 changes: 15 additions & 6 deletions tools/cldr-code/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,19 @@
</resource>
<resource>
<directory>${project.basedir}/../..</directory>
<!-- This is put here so that it can be read by CldrUtility, even outside of a jar -->
<targetPath>${project.build.directory}/classes/org/unicode/cldr/util/data</targetPath>
<includes>
<include>unicode-license.txt</include>
<include>LICENSE</include>
</includes>
</resource>
<resource>
<directory>${project.basedir}/../..</directory>
<!-- This is put here so that it shows up in the final .jar in an expected spot -->
<!-- Note: icu4j keeps its license file at the root, /LICENSE. We won't conflict. -->
<targetPath>META-INF</targetPath>
<includes>
<include>LICENSE</include>
</includes>
</resource>
</resources>
Expand All @@ -91,7 +101,7 @@
exclude the "for-cldr" dependencies.
see https://unicode-org.atlassian.net/browse/ICU-21425
these are actually under Unicode-DFS-2016 the same as CLDR is.
The ICU license file itself is pulled in during assembly, which contains
The ICU license file itself is pulled in during assembly (into /LICENSE), which contains
all of ICU's third party license information.
-->
<excludedArtifacts>.*-for-cldr.*</excludedArtifacts>
Expand Down Expand Up @@ -151,14 +161,13 @@
<CLDR-Code-Git-Branch>${scmBranch}</CLDR-Code-Git-Branch>
</manifestEntries>
</transformer>
<!-- this will have any other found licenses included -->
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<file>${project.basedir}/target/generated-sources/license/THIRD-PARTY.txt</file>
<resource>CLDR-THIRD-PARTY.txt</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<file>${project.basedir}/../../unicode-license.txt</file>
<resource>unicode-license.txt</resource>
</transformer>
<!-- prevent any possible duplication of LICENSE files -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
</transformers>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -985,11 +985,10 @@ public void writeReadme(String outputDir, String packageName) throws IOException
writeReadmeSection(outf);
}
try (PrintWriter outf = FileUtilities.openUTF8Writer(outputDir + "/" + packageName, "LICENSE");) {
FileCopier.copy(CldrUtility.getUTF8Data("unicode-license.txt"), outf);
FileCopier.copy(CldrUtility.getUTF8Data(CldrUtility.LICENSE), outf);
}
}


String getBasePackageName(final String packageName) {
String basePackageName = packageName;
if (basePackageName.startsWith(CLDR_PKG_PREFIX)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,11 @@ public static BufferedReader getUTF8Data(String name) {
return FileReaders.openFile(CldrUtility.class, "data/" + name);
}

/**
* License file
*/
public static final String LICENSE = "LICENSE";

/**
* Fetch data from jar
*
Expand Down Expand Up @@ -1399,7 +1404,7 @@ public static String getCopyrightString() {

private static final class CopyrightHelper {
public static final CopyrightHelper INSTANCE = new CopyrightHelper();
public final String COPYRIGHT_SHORT =
public final String COPYRIGHT_SHORT =
"Copyright \u00A9 1991-" + Calendar.getInstance().get(Calendar.YEAR) + " Unicode, Inc.";
}

Expand All @@ -1415,7 +1420,7 @@ public static String getCopyrightString(String linePrefix) {
* Returns the '## License' section in markdown.
*/
public static String getCopyrightMarkdown() {
return "## License\n" +
return "## License\n" +
"\n" +
getCopyrightShort() + "\n" +
"[Terms of Use](http://www.unicode.org/copyright.html)\n\n" +
Expand Down
2 changes: 1 addition & 1 deletion tools/st-prom-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ And here is an alert rule to make sure the exporter itself is up.
For license and copyright see
https://www.unicode.org/copyright.html
or [../../unicode-license.txt](../../unicode-license.txt)
or [../../LICENSE](../../LICENSE)

0 comments on commit 10bb919

Please sign in to comment.