This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-parent.git
commit 026fe555c6a1daa96e3703d8fdf50618345dc26c Author: Volkan Yazıcı <[email protected]> AuthorDate: Wed Sep 20 09:47:10 2023 +0200 Remove `bootstrap` profile --- pom.xml | 128 ------------------------ src/changelog/.10.x.x/add-bootstrap-profile.xml | 8 -- 2 files changed, 136 deletions(-) diff --git a/pom.xml b/pom.xml index f5059f1..e5f33b6 100644 --- a/pom.xml +++ b/pom.xml @@ -997,134 +997,6 @@ </profile> - <!-- Bootstraps the current project by downloading reference support files; `NOTICE.txt`, `.asf.yaml`, `.java-version`, etc. --> - <profile> - - <id>bootstrap</id> - - <build> - - <defaultGoal>enforcer:enforce bsh:run</defaultGoal> - - <plugins> - - <!-- Enforce properties required by the BSH --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-enforcer-plugin</artifactId> - <configuration> - <rules> - <requireProperty> - <property>repositoryName</property> - <message>You must set a `repositoryName` property (e.g., `logging-log4j-tools`)</message> - </requireProperty> - <requireProperty> - <property>projectName</property> - <message>You must set a `projectName` property (e.g., `log4j-tools`)</message> - </requireProperty> - </rules> - <fail>true</fail> - </configuration> - </plugin> - - <plugin> - <groupId>com.github.genthaler</groupId> - <artifactId>beanshell-maven-plugin</artifactId> - <configuration> - <script><![CDATA[import java.io.*; - import java.nio.charset.*; - import java.nio.file.*; - import java.nio.file.attribute.*; - - download(String relativePath) { - System.out.format("Downloading `%s`%n", new Object[]{relativePath}); - try { - - // Create the target file - Path dstPath = new File(relativePath).toPath(); - Path dstPathParent = dstPath.getParent(); - if (dstPathParent != null) { - Files.createDirectories(dstPath.getParent(), /* required for BSH method resolution: */ new FileAttribute[0]); - } - - // Download the source file - String srcUrl = "https://raw.githubusercontent.com/apache/logging-parent/main/" + relativePath; - InputStream srcStream = new URL(srcUrl).openStream(); - try { - Files.copy(srcStream, dstPath, new CopyOption[]{StandardCopyOption.REPLACE_EXISTING}); - } finally { - srcStream.close(); - } - - } catch (Exception error) { - // Supplement diagnostics - error.printStackTrace(System.err); - throw error; - } - } - - download(String relativePath, String[] substitutions) { - download(relativePath); - try { - Path path = new File(relativePath).toPath(); - String content = Files.readString(path, StandardCharsets.UTF_8); - int substitutionCount = substitutions.length / 2; - for (int i = 0; i < substitutionCount; i += 2) { - String from = substitutions[i]; - String to = substitutions[i + 1]; - System.out.format(" Replacing `%s` with `%s`%n", new Object[]{from, to}); - content = content.replace(from, to); - } - System.out.println(" Writing replaced content"); - Files.writeString(path, content, StandardCharsets.UTF_8, new OpenOption[]{StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING}); - } catch (Exception error) { - // Supplement diagnostics - error.printStackTrace(System.err); - throw error; - } - } - - download(".github/workflows/build.yaml", new String[] { - "'apache/logging-parent'", "'apache/${repositoryName}'", - "project-name: logging-parent", "project-name: ${projectName}" - }); - download(".github/dependabot.yaml"); - download(".github/generate-email.sh"); - download(".mvn/wrapper/maven-wrapper.properties"); - download(".mvn/jvm.config"); - download("src/antora/modules/ROOT/pages/index.adoc"); - download("src/antora/modules/ROOT/nav.adoc"); - download("src/antora/antora.tmpl.yml"); - download("src/antora/antora.yml"); - download("src/changelog/.changelog.adoc.ftl"); - download("src/changelog/.index.adoc.ftl"); - download(".asf.yaml"); - download(".editorconfig"); - download(".gitattributes"); - download(".gitignore"); - download(".java-version"); - download("antora-playbook.yaml"); - download("LICENSE.txt"); - download("mvnw"); - new File("mvnw").setExecutable(true); - download("mvnw.cmd"); - download("NOTICE.txt"); - download("RELEASE-NOTES.adoc"); - download("RELEASING.adoc", new String[] { - ":repository-name: logging-parent", ":repository-name: ${repositoryName}", - ":project-name: logging-parent", ":project-name: ${projectName}" - }); - - ]]></script> - </configuration> - </plugin> - - </plugins> - - </build> - - </profile> - </profiles> </project> diff --git a/src/changelog/.10.x.x/add-bootstrap-profile.xml b/src/changelog/.10.x.x/add-bootstrap-profile.xml deleted file mode 100644 index 7f2a5f5..0000000 --- a/src/changelog/.10.x.x/add-bootstrap-profile.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns="http://logging.apache.org/log4j/changelog" - xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd" - type="added"> - <author id="github:vy"/> - <description format="asciidoc">Added `bootstrap` profile to download support files from `logging-parent`</description> -</entry>
