Skip to content

Commit c79f69f

Browse files
committed
Rename groupId and packages from o.a.l.log4j.tools to o.a.l.log4j
1 parent 18531f9 commit c79f69f

25 files changed

+65
-69
lines changed

log4j-changelog/README.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ Each `.changelog.adoc.ftl` FreeMarker templated AsciiDoc files are compiled by `
194194
* `release` -> `ChangelogRelease`
195195
* `entriesByType` -> `Map<ChangelogEntry.Type, List<ChangelogEntry>>`
196196
197-
See xref:src/main/java/org/apache/logging/log4j/tools/changelog/ChangelogRelease.java[ChangelogRelease.java] and xref:src/main/java/org/apache/logging/log4j/tools/changelog/ChangelogEntry.java[ChangelogEntry.java] for details.
197+
See xref:src/main/java/org/apache/logging/log4j/changelog/ChangelogRelease.java[ChangelogRelease.java] and xref:src/main/java/org/apache/logging/log4j/changelog/ChangelogEntry.java[ChangelogEntry.java] for details.
198198
199199
A sample changelog template file is shared below.
200200
@@ -261,7 +261,7 @@ java \
261261
-cp /path/to/log4j-changelog.jar \
262262
-Dlog4j.changelog.directory=/path/to/changelog/directory \
263263
-Dlog4j.changelog.exporter.outputDirectory=/path/to/asciiDocOutputDirectory \
264-
org.apache.logging.log4j.tools.changelog.exporter.ChangelogExporter
264+
org.apache.logging.log4j.changelog.exporter.ChangelogExporter
265265
----
266266
267267
[#qa-deploy-release]
@@ -294,7 +294,7 @@ java \
294294
-cp /path/to/log4j-changelog.jar \
295295
-Dlog4j.changelog.directory=/path/to/changelog/directory \
296296
-Dlog4j.changelog.releaseVersion=X.Y.Z \
297-
org.apache.logging.log4j.tools.changelog.releaser.ChangelogReleaser
297+
org.apache.logging.log4j.changelog.releaser.ChangelogReleaser
298298
----
299299
. Verify that all changelog entry files are moved from `<changelogDirectory>/.<releaseVersionMajor>.x.x` directory (e.g., `/src/changelog/.2.x.x`)
300300
. Verify that `<changelogDirectory>/<releaseVersion>` directory (e.g., `/src/changelog/2.19.0`) is created, and it contains `.changelog.adoc.ftl`, `.release.xml`, and changelog entry files

log4j-changelog/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<parent>
2525
<artifactId>log4j-tools-parent</artifactId>
26-
<groupId>org.apache.logging.log4j.tools</groupId>
26+
<groupId>org.apache.logging.log4j</groupId>
2727
<version>${revision}</version>
2828
<relativePath>../log4j-tools-parent/pom.xml</relativePath>
2929
</parent>

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/changelog/ChangelogEntry.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/ChangelogEntry.java

+5-6
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,19 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools.changelog;
17+
package org.apache.logging.log4j.changelog;
1818

1919
import java.nio.file.Path;
2020
import java.util.List;
2121
import java.util.Locale;
2222
import java.util.stream.Collectors;
2323

24-
import org.apache.logging.log4j.tools.XmlReader;
25-
import org.apache.logging.log4j.tools.XmlWriter;
24+
import org.apache.logging.log4j.changelog.util.StringUtils;
25+
import org.apache.logging.log4j.changelog.util.XmlReader;
26+
import org.apache.logging.log4j.changelog.util.XmlWriter;
2627

2728
import org.w3c.dom.Element;
2829

29-
import static org.apache.logging.log4j.tools.StringUtils.trimNullable;
30-
3130
public final class ChangelogEntry {
3231

3332
public final Type type;
@@ -197,7 +196,7 @@ public static ChangelogEntry readFromXmlFile(final Path path) {
197196
// Read the `description` element.
198197
final Element descriptionElement = XmlReader.requireChildElementMatchingName(entryElement, "description");
199198
final String descriptionFormat = XmlReader.requireAttribute(descriptionElement, "format");
200-
final String descriptionText = trimNullable(descriptionElement.getTextContent());
199+
final String descriptionText = StringUtils.trimNullable(descriptionElement.getTextContent());
201200
final Description description = new Description(descriptionFormat, descriptionText);
202201

203202
// Create the instance.

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/changelog/ChangelogFiles.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/ChangelogFiles.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools.changelog;
17+
package org.apache.logging.log4j.changelog;
1818

1919
import java.nio.file.Path;
2020
import java.util.Set;
@@ -23,7 +23,7 @@
2323
import java.util.stream.Collectors;
2424
import java.util.stream.Stream;
2525

26-
import org.apache.logging.log4j.tools.FileUtils;
26+
import org.apache.logging.log4j.changelog.util.FileUtils;
2727

2828
public final class ChangelogFiles {
2929

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/changelog/ChangelogRelease.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/ChangelogRelease.java

+6-7
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,16 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools.changelog;
17+
package org.apache.logging.log4j.changelog;
1818

1919
import java.nio.file.Path;
2020

21-
import org.apache.logging.log4j.tools.XmlReader;
22-
import org.apache.logging.log4j.tools.XmlWriter;
21+
import org.apache.logging.log4j.changelog.util.StringUtils;
22+
import org.apache.logging.log4j.changelog.util.XmlReader;
23+
import org.apache.logging.log4j.changelog.util.XmlWriter;
2324

2425
import org.w3c.dom.Element;
2526

26-
import static org.apache.logging.log4j.tools.StringUtils.trimNullable;
27-
2827
public final class ChangelogRelease {
2928

3029
public final String version;
@@ -51,13 +50,13 @@ public static ChangelogRelease readFromXmlFile(final Path path) {
5150
final Element releaseElement = XmlReader.readXmlFileRootElement(path, "release");
5251

5352
// Read the `version` attribute.
54-
final String version = trimNullable(releaseElement.getAttribute("version"));
53+
final String version = StringUtils.trimNullable(releaseElement.getAttribute("version"));
5554
if (version == null) {
5655
throw new IllegalArgumentException("blank or missing attribute: `version`");
5756
}
5857

5958
// Read the `date` attribute.
60-
final String date = trimNullable(releaseElement.getAttribute("date"));
59+
final String date = StringUtils.trimNullable(releaseElement.getAttribute("date"));
6160
if (date == null) {
6261
throw new IllegalArgumentException("blank or missing attribute: `date`");
6362
}

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/changelog/exporter/ChangelogExporter.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporter.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools.changelog.exporter;
17+
package org.apache.logging.log4j.changelog.exporter;
1818

1919
import java.io.IOException;
2020
import java.io.UncheckedIOException;
@@ -23,10 +23,10 @@
2323
import java.util.stream.Collectors;
2424
import java.util.stream.IntStream;
2525

26-
import org.apache.logging.log4j.tools.FileUtils;
27-
import org.apache.logging.log4j.tools.changelog.ChangelogEntry;
28-
import org.apache.logging.log4j.tools.changelog.ChangelogFiles;
29-
import org.apache.logging.log4j.tools.changelog.ChangelogRelease;
26+
import org.apache.logging.log4j.changelog.ChangelogEntry;
27+
import org.apache.logging.log4j.changelog.ChangelogFiles;
28+
import org.apache.logging.log4j.changelog.ChangelogRelease;
29+
import org.apache.logging.log4j.changelog.util.FileUtils;
3030

3131
public final class ChangelogExporter {
3232

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/changelog/exporter/ChangelogExporterArgs.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporterArgs.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools.changelog.exporter;
17+
package org.apache.logging.log4j.changelog.exporter;
1818

1919
import java.nio.file.Path;
2020

21-
import static org.apache.logging.log4j.tools.PropertyUtils.requireNonBlankPathProperty;
21+
import static org.apache.logging.log4j.changelog.util.PropertyUtils.requireNonBlankPathProperty;
2222

2323
final class ChangelogExporterArgs {
2424

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/changelog/exporter/FreeMarkerUtils.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/FreeMarkerUtils.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools.changelog.exporter;
17+
package org.apache.logging.log4j.changelog.exporter;
1818

1919
import java.io.BufferedWriter;
2020
import java.io.File;
@@ -24,7 +24,7 @@
2424
import java.nio.file.Path;
2525
import java.nio.file.StandardOpenOption;
2626

27-
import org.apache.logging.log4j.tools.CharsetUtils;
27+
import org.apache.logging.log4j.changelog.util.CharsetUtils;
2828

2929
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
3030
import freemarker.cache.FileTemplateLoader;

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/changelog/importer/MavenChanges.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/importer/MavenChanges.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools.changelog.importer;
17+
package org.apache.logging.log4j.changelog.importer;
1818

1919
import java.nio.file.Path;
2020
import java.util.ArrayList;
2121
import java.util.List;
2222
import java.util.Locale;
2323

24-
import org.apache.logging.log4j.tools.XmlReader;
24+
import org.apache.logging.log4j.changelog.util.XmlReader;
2525

2626
import org.w3c.dom.Element;
2727
import org.w3c.dom.Node;
2828
import org.w3c.dom.NodeList;
2929

30-
import static org.apache.logging.log4j.tools.StringUtils.isBlank;
31-
import static org.apache.logging.log4j.tools.StringUtils.trimNullable;
32-
import static org.apache.logging.log4j.tools.XmlReader.failureAtXmlNode;
33-
import static org.apache.logging.log4j.tools.XmlReader.readXmlFileRootElement;
30+
import static org.apache.logging.log4j.changelog.util.StringUtils.isBlank;
31+
import static org.apache.logging.log4j.changelog.util.StringUtils.trimNullable;
32+
import static org.apache.logging.log4j.changelog.util.XmlReader.failureAtXmlNode;
33+
import static org.apache.logging.log4j.changelog.util.XmlReader.readXmlFileRootElement;
3434

3535
final class MavenChanges {
3636

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/changelog/importer/MavenChangesImporter.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/importer/MavenChangesImporter.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools.changelog.importer;
17+
package org.apache.logging.log4j.changelog.importer;
1818

1919
import java.nio.file.Path;
2020
import java.util.ArrayList;
2121
import java.util.List;
2222

23-
import org.apache.logging.log4j.tools.changelog.ChangelogEntry;
24-
import org.apache.logging.log4j.tools.changelog.ChangelogFiles;
25-
import org.apache.logging.log4j.tools.changelog.ChangelogRelease;
23+
import org.apache.logging.log4j.changelog.ChangelogEntry;
24+
import org.apache.logging.log4j.changelog.ChangelogFiles;
25+
import org.apache.logging.log4j.changelog.ChangelogRelease;
2626

27-
import static org.apache.logging.log4j.tools.StringUtils.isBlank;
27+
import static org.apache.logging.log4j.changelog.util.StringUtils.isBlank;
2828

2929
public final class MavenChangesImporter {
3030

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/changelog/importer/MavenChangesImporterArgs.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/importer/MavenChangesImporterArgs.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools.changelog.importer;
17+
package org.apache.logging.log4j.changelog.importer;
1818

1919
import java.nio.file.Path;
2020

21-
import static org.apache.logging.log4j.tools.PropertyUtils.requireNonBlankIntProperty;
22-
import static org.apache.logging.log4j.tools.PropertyUtils.requireNonBlankPathProperty;
21+
import static org.apache.logging.log4j.changelog.util.PropertyUtils.requireNonBlankIntProperty;
22+
import static org.apache.logging.log4j.changelog.util.PropertyUtils.requireNonBlankPathProperty;
2323

2424
final class MavenChangesImporterArgs {
2525

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/changelog/releaser/ChangelogReleaser.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/releaser/ChangelogReleaser.java

+6-8
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,21 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools.changelog.releaser;
17+
package org.apache.logging.log4j.changelog.releaser;
1818

1919
import java.io.IOException;
2020
import java.io.UncheckedIOException;
2121
import java.nio.file.Files;
2222
import java.nio.file.Path;
2323
import java.time.LocalDate;
2424

25-
import org.apache.logging.log4j.tools.FileUtils;
26-
import org.apache.logging.log4j.tools.VersionUtils;
27-
import org.apache.logging.log4j.tools.changelog.ChangelogFiles;
28-
import org.apache.logging.log4j.tools.changelog.ChangelogRelease;
25+
import org.apache.logging.log4j.changelog.ChangelogFiles;
26+
import org.apache.logging.log4j.changelog.ChangelogRelease;
27+
import org.apache.logging.log4j.changelog.util.FileUtils;
28+
import org.apache.logging.log4j.changelog.util.VersionUtils;
2929

3030
import static java.time.format.DateTimeFormatter.ISO_DATE;
3131

32-
import static org.apache.logging.log4j.tools.changelog.ChangelogFiles.releaseDirectory;
33-
3432
public final class ChangelogReleaser {
3533

3634
private ChangelogReleaser() {}
@@ -47,7 +45,7 @@ public static void main(final String[] mainArgs) throws Exception {
4745

4846
// Populate the changelog entry files in the release directory.
4947
final Path unreleasedDirectory = ChangelogFiles.unreleasedDirectory(args.changelogDirectory, releaseVersionMajor);
50-
final Path releaseDirectory = releaseDirectory(args.changelogDirectory, args.releaseVersion);
48+
final Path releaseDirectory = ChangelogFiles.releaseDirectory(args.changelogDirectory, args.releaseVersion);
5149
populateChangelogEntryFiles(unreleasedDirectory, releaseDirectory);
5250

5351
// Write the release information.

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/changelog/releaser/ChangelogReleaserArgs.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/releaser/ChangelogReleaserArgs.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools.changelog.releaser;
17+
package org.apache.logging.log4j.changelog.releaser;
1818

1919
import java.nio.file.Path;
2020

21-
import static org.apache.logging.log4j.tools.PropertyUtils.requireNonBlankPathProperty;
22-
import static org.apache.logging.log4j.tools.PropertyUtils.requireNonBlankStringProperty;
23-
import static org.apache.logging.log4j.tools.VersionUtils.requireSemanticVersioning;
21+
import static org.apache.logging.log4j.changelog.util.PropertyUtils.requireNonBlankPathProperty;
22+
import static org.apache.logging.log4j.changelog.util.PropertyUtils.requireNonBlankStringProperty;
23+
import static org.apache.logging.log4j.changelog.util.VersionUtils.requireSemanticVersioning;
2424

2525
final class ChangelogReleaserArgs {
2626

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/AsciiDocUtils.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/util/AsciiDocUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools;
17+
package org.apache.logging.log4j.changelog.util;
1818

1919
public final class AsciiDocUtils {
2020

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/CharsetUtils.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/util/CharsetUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools;
17+
package org.apache.logging.log4j.changelog.util;
1818

1919
import java.nio.charset.Charset;
2020
import java.nio.charset.StandardCharsets;

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/FileUtils.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/util/FileUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools;
17+
package org.apache.logging.log4j.changelog.util;
1818

1919
import java.io.IOException;
2020
import java.io.UncheckedIOException;

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/PositionalSaxEventHandler.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/util/PositionalSaxEventHandler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools;
17+
package org.apache.logging.log4j.changelog.util;
1818

1919
import java.util.Stack;
2020

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/PropertyUtils.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/util/PropertyUtils.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools;
17+
package org.apache.logging.log4j.changelog.util;
1818

1919
import java.nio.file.InvalidPathException;
2020
import java.nio.file.Path;
2121
import java.nio.file.Paths;
2222

23-
import static org.apache.logging.log4j.tools.StringUtils.isBlank;
23+
import static org.apache.logging.log4j.changelog.util.StringUtils.isBlank;
2424

2525
public final class PropertyUtils {
2626

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/StringUtils.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/util/StringUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools;
17+
package org.apache.logging.log4j.changelog.util;
1818

1919
public final class StringUtils {
2020

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/VersionUtils.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/util/VersionUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools;
17+
package org.apache.logging.log4j.changelog.util;
1818

1919
public final class VersionUtils {
2020

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/XmlReader.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/util/XmlReader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools;
17+
package org.apache.logging.log4j.changelog.util;
1818

1919
import java.io.FileInputStream;
2020
import java.io.InputStream;

log4j-changelog/src/main/java/org/apache/logging/log4j/tools/XmlUtils.java log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/util/XmlUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the license for the specific language governing permissions and
1515
* limitations under the license.
1616
*/
17-
package org.apache.logging.log4j.tools;
17+
package org.apache.logging.log4j.changelog.util;
1818

1919
import javax.xml.parsers.DocumentBuilderFactory;
2020
import javax.xml.parsers.ParserConfigurationException;

0 commit comments

Comments
 (0)