This is an automated email from the ASF dual-hosted git repository.
ppkarwasz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-flume-mongodb.git
The following commit(s) were added to refs/heads/main by this push:
new 66cc4a8 Bootstrap build and release infrastructure (#3)
66cc4a8 is described below
commit 66cc4a8762b8915cee35216f7e4dbff6a5a30bbb
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Wed Sep 2 18:39:25 2026 +0200
Bootstrap build and release infrastructure (#3)
* Simplify POM files
Remove from the POM files data that is inherited by the parent.
At the same time we add a temporary `use-apache-snapshots` profile to allow
the project to bootstrap itself, while its parent is still not published.
* Add generated files to `.gitignore`
* Remove dependency on old `mockito-all`
* Add GitHub Actions workflows from `logging-flume`
Port the `build`, CodeQL and Dependabot workflows and the Dependabot
configuration from the main Flume repository, adapted to this repository:
`main` default branch, no Maven site, Java only and `flume-mongodb` as the
distribution identifier. The `deploy-site` workflow is not ported, since the
website is generated from `flume-project`.
Add the Maven wrapper, which the `logging-parent` reusable workflows invoke,
and fix the required status check name in `.asf.yaml`: the reusable build
workflow reports it as `build / build (ubuntu-latest)`.
Assisted-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01F9NiqMnCccUGDtqt64uKe6
* Generate release notes with `log4j-changelog`
Bootstrap `src/changelog` with the templates used by the other Logging
Services projects and a single entry for the upcoming first release, which
adds the MongoDB sink. The hand-written `CHANGELOG` and `RELEASE-NOTES.txt`
are superseded by the generated release notes.
Remove `checkstyle-header.txt` and `findbugs-exclude-filter.xml`, which no
plugin references: code style and SpotBugs are configured by
`logging-parent`.
Add `.gitattributes` from the main Flume repository, so that `mvnw.cmd`
keeps
its CRLF line endings.
Assisted-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01F9NiqMnCccUGDtqt64uKe6
* Enable the `use-apache-snapshots` profile in `.mvn/maven.config`
The `flume-parent` 2.0.0-SNAPSHOT is only available from the ASF snapshot
repository. Activating the profile through `.mvn/maven.config` covers every
Maven invocation, including the `deploy-snapshot` reusable workflow and the
CodeQL autobuild, which accept no Maven arguments. Remove the file together
with the profile once the parent is released.
Assisted-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01F9NiqMnCccUGDtqt64uKe6
* Set the SpotBugs and PMD violation limits to the current counts
Assisted-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01F9NiqMnCccUGDtqt64uKe6
* Add a temporary `build (ubuntu-latest)` check
The ruleset currently in force on `main` requires a status check named
`build (ubuntu-latest)`, which the `logging-parent` reusable workflow cannot
produce. Until the corrected `.asf.yaml` is merged, a job carrying that name
runs `mvnw verify` on Windows, so that the pull request can be merged.
Assisted-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01F9NiqMnCccUGDtqt64uKe6
---
.asf.yaml | 2 +-
.gitattributes | 23 ++
.github/dependabot.yaml | 68 +++++
.github/workflows/analyze-dependabot.yaml | 37 +++
.github/workflows/build.yaml | 116 ++++++++
.github/workflows/codeql-analysis.yml | 84 ++++++
.github/workflows/process-dependabot.yaml | 48 ++++
.gitignore | 53 ++++
.mvn/maven.config | 1 +
.mvn/wrapper/maven-wrapper.properties | 18 ++
CHANGELOG | 7 -
RELEASE-NOTES.txt | 27 --
checkstyle-header.txt | 16 --
findbugs-exclude-filter.xml | 31 ---
flume-mongodb-sink/.flattened-pom.xml | 132 ---------
flume-mongodb-sink/pom.xml | 17 +-
.../apache/flume/sink/mongodb/TestMongoDbSink.java | 28 +-
mvnw | 308 +++++++++++++++++++++
mvnw.cmd | 205 ++++++++++++++
pom.xml | 228 ++++-----------
src/changelog/.2.x.x/.release-notes.adoc.ftl | 25 ++
src/changelog/.2.x.x/add_mongodb_sink.xml | 7 +
src/changelog/.changelog.adoc.ftl | 27 ++
src/changelog/.index.adoc.ftl | 42 +++
24 files changed, 1147 insertions(+), 403 deletions(-)
diff --git a/.asf.yaml b/.asf.yaml
index 7a2c143..4a6f577 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -71,7 +71,7 @@ github:
required_status_checks:
# The GitHub Actions app
- app_slug: github-actions
- name: "build (ubuntu-latest)"
+ name: "build / build (ubuntu-latest)"
# The GitHub Advanced Security app
- app_slug: github-advanced-security
name: "CodeQL"
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..eaa5806
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# All text files with LF line endings
+* text=auto eol=lf
+# PS1 files are Windows specific
+*.ps1 eol=crlf
+# Maven Wrapper cmd script
+/mvnw.cmd eol=crlf
+# Maven Wrapper need LF line endings
+/.mvn/wrapper/maven-wrapper.properties eol=lf
diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml
new file mode 100644
index 0000000..b0b1164
--- /dev/null
+++ b/.github/dependabot.yaml
@@ -0,0 +1,68 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# ██ ██ █████ ██████ ███ ██ ██ ███ ██ ██████ ██
+# ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██ ██ ██
+# ██ █ ██ ███████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██
+# ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
+# ███ ███ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██████ ██
+#
+# `dependabot.yaml` must be stored in the `.github` directory of the default
branch[1].
+#
+# 1. Make all your changes to this file!
+# Don't create another `dependabot.yaml` – it will simply be discarded.
+#
+# 2. Always associate your entries to a branch!
+# For instance, use `target-branch` in `updates` entries
+#
+# [1]
https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
+#
+
+version: 2
+
+# Fix the Maven Central to the ASF repository to work around:
https://github.com/dependabot/dependabot-core/issues/8329
+registries:
+ maven-central:
+ type: maven-repository
+ url: https://repo.maven.apache.org/maven2
+
+updates:
+
+ - package-ecosystem: maven
+ directory: "/"
+ schedule:
+ interval: "monthly"
+ cooldown:
+ default-days: 7
+ groups:
+ # Groups all non-major updates in a single PR.
+ # No group matches major updates, so each one gets a separate PR.
+ maven-minor-updates:
+ update-types: [ "minor", "patch" ]
+ target-branch: "main"
+ registries:
+ - maven-central
+
+ - package-ecosystem: github-actions
+ directory: "/"
+ schedule:
+ interval: "monthly"
+ groups:
+ github-actions-updates:
+ patterns: [ "*" ]
+ target-branch: "main"
diff --git a/.github/workflows/analyze-dependabot.yaml
b/.github/workflows/analyze-dependabot.yaml
new file mode 100644
index 0000000..bfb45a3
--- /dev/null
+++ b/.github/workflows/analyze-dependabot.yaml
@@ -0,0 +1,37 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: "Dependabot Analyze PR"
+
+on:
+ pull_request:
+
+# Default permissions for each job.
+# Additional permissions should be assigned on a per-job basis.
+permissions: { }
+
+jobs:
+
+ analyze-dependabot:
+ # `github.actor` prevents recursive calls when `github-actions[bot]`
pushes to the PR;
+ # `github.event.pull_request.user.login` skips PRs not opened by
Dependabot.
+ if: ${{
+ github.repository == 'apache/logging-flume-mongodb'
+ && github.actor == 'dependabot[bot]'
+ && github.event.pull_request.user.login == 'dependabot[bot]'
+ }}
+ uses:
apache/logging-parent/.github/workflows/analyze-dependabot-reusable.yaml@gha/v0
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
new file mode 100644
index 0000000..b0d1106
--- /dev/null
+++ b/.github/workflows/build.yaml
@@ -0,0 +1,116 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: build
+
+on:
+ push:
+ branches:
+ - "main"
+ - "release/*"
+ pull_request:
+
+# Disable all permissions by defaults:
+# Permissions are enabled on a per-job basis.
+permissions: { }
+
+concurrency:
+ # One group per PR, or per ref for branch pushes.
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number ||
github.ref }}
+ # Cancel in-progress runs for PRs only, so release branch builds always
complete.
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
+jobs:
+
+ build:
+ uses: apache/logging-parent/.github/workflows/build-reusable.yaml@gha/v0
+ with:
+ java-version: 17
+
+ # TODO: remove once the `.asf.yaml` ruleset on `main` requires `build /
build (ubuntu-latest)`.
+ # The ruleset currently in force requires a check named `build
(ubuntu-latest)`, which the
+ # reusable workflow cannot produce, so this job carries that name until the
fix is merged.
+ build-legacy-check:
+ name: build (ubuntu-latest)
+ runs-on: windows-latest
+ permissions:
+ contents: read
+ steps:
+
+ - name: Checkout repository
+ uses: actions/checkout@v7
+
+ - name: Set up Java
+ uses: actions/setup-java@v5
+ with:
+ distribution: zulu
+ java-version: 17
+ cache: maven
+
+ - name: Build
+ shell: bash
+ run: |
+ ./mvnw \
+ --show-version --batch-mode --errors --no-transfer-progress \
+ -DtrimStackTrace=false \
+ verify
+
+ deploy-snapshot:
+ needs: build
+ if: github.repository == 'apache/logging-flume-mongodb' && github.ref_name
== 'main'
+ uses:
apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@gha/v0
+ # Secrets for deployments
+ secrets:
+ NEXUS_USERNAME: ${{ secrets.LOGGING_STAGE_DEPLOYER_USER }}
+ NEXUS_PASSWORD: ${{ secrets.LOGGING_STAGE_DEPLOYER_PW }}
+ with:
+ java-version: 17
+
+ deploy-release:
+ needs: build
+ if: github.repository == 'apache/logging-flume-mongodb' &&
startsWith(github.ref_name, 'release/')
+ uses:
apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@gha/v0
+ # Secrets for deployments
+ secrets:
+ GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
+ NEXUS_USERNAME: ${{ secrets.LOGGING_STAGE_DEPLOYER_USER }}
+ NEXUS_PASSWORD: ${{ secrets.LOGGING_STAGE_DEPLOYER_PW }}
+ SVN_USERNAME: ${{ secrets.LOGGING_SVN_DEV_USERNAME }}
+ SVN_PASSWORD: ${{ secrets.LOGGING_SVN_DEV_PASSWORD }}
+ # Write permissions to allow the Maven `revision` property update,
changelog release, etc.
+ permissions:
+ contents: write
+ with:
+ java-version: 17
+ project-id: flume-mongodb
+
+ verify-reproducibility-snapshot:
+ needs: deploy-snapshot
+ uses:
apache/logging-parent/.github/workflows/verify-reproducibility-reusable.yaml@gha/v0
+ with:
+ java-version: 17
+ # Compare against the repository `deploy-snapshot` uploaded as a run
artifact, so that
+ # the check does not depend on the snapshot having propagated to the
Nexus group repository.
+ reference-artifact-name: ${{
needs.deploy-snapshot.outputs.repository-artifact-name }}
+
+ verify-reproducibility-release:
+ needs: deploy-release
+ uses:
apache/logging-parent/.github/workflows/verify-reproducibility-reusable.yaml@gha/v0
+ with:
+ java-version: 17
+ # `deploy-release` publishes no run artifact, so the staging repository
is the reference.
+ nexus-url: ${{ needs.deploy-release.outputs.nexus-url }}
diff --git a/.github/workflows/codeql-analysis.yml
b/.github/workflows/codeql-analysis.yml
new file mode 100644
index 0000000..76b08a8
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,84 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ main ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ main ]
+ schedule:
+ - cron: '15 0 * * 5'
+
+# Remove all permissions by default. They will be added at a job level.
+permissions: {}
+
+concurrency:
+ # One group per PR, or per ref for branch pushes.
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number ||
github.ref }}
+ # Cancel in-progress runs for PRs only, so release branch builds always
complete.
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ 'java' ]
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript',
'python', 'ruby' ]
+ # Learn more about CodeQL language support at
https://git.io/codeql-language-support
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v7
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81
# 4.37.3
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a
config file.
+ # By default, queries listed here will override any specified in a
config file.
+ # Prefix the list here with "+" to use these queries and those in the
config file.
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
+
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
+ # If this step fails, then you should remove it and run the build manually
(see below)
+ - name: Autobuild
+ uses:
github/codeql-action/autobuild@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 #
4.37.3
+
+ # ℹ️ Command-line programs to run using the OS shell.
+ # 📚 https://git.io/JvXDl
+
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following
three lines
+ # and modify them (or add more) to build your code if your project
+ # uses a compiled language
+
+ #- run: |
+ # make bootstrap
+ # make release
+
+ - name: Perform CodeQL Analysis
+ uses:
github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 #
4.37.3
diff --git a/.github/workflows/process-dependabot.yaml
b/.github/workflows/process-dependabot.yaml
new file mode 100644
index 0000000..abc8fd3
--- /dev/null
+++ b/.github/workflows/process-dependabot.yaml
@@ -0,0 +1,48 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: "Dependabot Process PR"
+
+on:
+ workflow_run:
+ workflows:
+ - "Dependabot Analyze PR"
+ types:
+ - completed
+
+# Default permissions for each job.
+# Additional permissions should be assigned on a per-job basis.
+permissions: { }
+
+jobs:
+
+ process-dependabot:
+ # Skip this workflow on commits not pushed by Dependabot
+ if: ${{
+ github.repository == 'apache/logging-flume-mongodb'
+ && github.actor == 'dependabot[bot]'
+ && github.event.workflow_run.conclusion == 'success'
+ }}
+ uses:
apache/logging-parent/.github/workflows/process-dependabot-reusable.yaml@gha/v0
+ permissions:
+ # Append the changelog commit
+ contents: write
+ # Convert the PR into draft
+ pull-requests: write
+ with:
+ # The path to the changelog directory for the current development branch.
+ changelog-path: src/changelog/.2.x.x
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5e0fa5a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,53 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Maven
+target/
+.flattened-pom.xml
+/.mvn/extensions.xml
+/.mvn/wrapper/maven-wrapper.jar
+.surefire-*
+
+# Node.js (used by `frontend-maven-plugin` in `logging-parent`)
+node/
+node_modules/
+package-lock.json
+
+# IntelliJ IDEA
+.idea/
+*.iml
+*.iws
+
+# Eclipse
+.project
+.classpath
+.settings/
+.factorypath
+/.metadata/
+.cache-main
+.cache-tests
+
+# Visual Studio Code
+.vscode/
+
+# NetBeans
+nb-configuration.xml
+
+# Editor backup files
+*~
+*#
+
+# macOS
+.DS_Store
diff --git a/.mvn/maven.config b/.mvn/maven.config
new file mode 100644
index 0000000..33b031d
--- /dev/null
+++ b/.mvn/maven.config
@@ -0,0 +1 @@
+-Puse-apache-snapshots
diff --git a/.mvn/wrapper/maven-wrapper.properties
b/.mvn/wrapper/maven-wrapper.properties
new file mode 100644
index 0000000..346d645
--- /dev/null
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
diff --git a/CHANGELOG b/CHANGELOG
deleted file mode 100644
index 48cec67..0000000
--- a/CHANGELOG
+++ /dev/null
@@ -1,7 +0,0 @@
-Release Notes - Flume MongoDb - Version 2.0.0
-
-** Improvement
- * Initial version.
-
-
-
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
deleted file mode 100644
index 0cbbad9..0000000
--- a/RELEASE-NOTES.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-Apache Flume Kafka 2.0.0
-
-CONTENTS
-1. What is Apache Flume Kafka
-2. Major changes in this Release
-3. How to Get Involved
-4. How to Report Issues
-
-1. What is Apache Flume Kafka
-Flume is a distributed, reliable, and available service for
-efficiently collecting, aggregating, and moving large amounts of event
-data. Flume Kafka provides a Channel, Source, and Sink for publishing
-and consuming events to and from Kafka.
-
-2. Major changes in this Release
-For a detailed list of changes, please see the CHANGELOG file included
-in this distribution.
-
-3. How to Get Involved
-The Apache Flume project really needs and appreciates any contributions,
-including documentation help, source code and feedback. If you are interested
-in contributing, please visit:
-https://cwiki.apache.org/confluence/display/FLUME/How+to+Contribute
-
-4. How to Report Issues
-The Apache Flume Spring Boot project uses GitHub issues for issue tracking.
Please see
-https://github.com/apache/flume-spring-boot/issues
diff --git a/checkstyle-header.txt b/checkstyle-header.txt
deleted file mode 100644
index 4f33236..0000000
--- a/checkstyle-header.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
diff --git a/findbugs-exclude-filter.xml b/findbugs-exclude-filter.xml
deleted file mode 100644
index 327be31..0000000
--- a/findbugs-exclude-filter.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- ===================================================================== -->
-<!-- $Id: findbugs-exclude-filter.xml 773234 2009-05-09 15:27:59Z rgoers $ -->
-<!-- ===================================================================== -->
-<FindBugsFilter>
- <!-- Enable only high priority warnings -->
- <Match>
- <Priority value="2"/>
- </Match>
-
- <Match>
- <Priority value="3"/>
- </Match>
-</FindBugsFilter>
diff --git a/flume-mongodb-sink/.flattened-pom.xml
b/flume-mongodb-sink/.flattened-pom.xml
deleted file mode 100644
index 26355e6..0000000
--- a/flume-mongodb-sink/.flattened-pom.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to you under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.flume</groupId>
- <artifactId>flume-mongodb-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- </parent>
- <groupId>org.apache.flume</groupId>
- <artifactId>flume-mongodb-sink</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- <name>Flume MongoDb Sink</name>
-
<url>https://logging.apache.org/flume/2.x/index.html/flume-mongodb-parent/flume-mongodb-sink</url>
- <licenses>
- <license>
- <name>The Apache Software License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
- </license>
- </licenses>
- <properties>
- <spotbugs.maxAllowedViolations>3</spotbugs.maxAllowedViolations>
- <pmd.maxAllowedViolations>3</pmd.maxAllowedViolations>
- <module.name>org.apache.flume.sink.mongodb</module.name>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.apache.flume</groupId>
- <artifactId>flume-ng-sdk</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.flume</groupId>
- <artifactId>flume-ng-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.flume</groupId>
- <artifactId>flume-ng-configuration</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mongodb</groupId>
- <artifactId>mongodb-driver-sync</artifactId>
- </dependency>
- <dependency>
- <groupId>io.dropwizard.metrics</groupId>
- <artifactId>metrics-core</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.13.0</version>
- <configuration>
- <compilerArgs>
-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
- </compilerArgs>
- </configuration>
- </plugin>
- <plugin>
- <groupId>biz.aQute.bnd</groupId>
- <artifactId>bnd-baseline-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>check-api-compat</id>
- <goals>
- <goal>baseline</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <failOnMissing>false</failOnMissing>
- <includeDistributionManagement>false</includeDistributionManagement>
- <releaseversions>true</releaseversions>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/flume-mongodb-sink/pom.xml b/flume-mongodb-sink/pom.xml
index da3c4b8..ddcb4f9 100644
--- a/flume-mongodb-sink/pom.xml
+++ b/flume-mongodb-sink/pom.xml
@@ -20,17 +20,16 @@
<parent>
<groupId>org.apache.flume</groupId>
<artifactId>flume-mongodb-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
+ <version>${revision}</version>
</parent>
- <groupId>org.apache.flume</groupId>
+
<artifactId>flume-mongodb-sink</artifactId>
<name>Flume MongoDb Sink</name>
<properties>
- <!-- TODO fix spotbugs/pmd violations -->
- <spotbugs.maxAllowedViolations>3</spotbugs.maxAllowedViolations>
- <pmd.maxAllowedViolations>3</pmd.maxAllowedViolations>
+ <!-- TODO fix spotbugs violations -->
+ <spotbugs.maxAllowedViolations>4</spotbugs.maxAllowedViolations>
+ <pmd.maxAllowedViolations>0</pmd.maxAllowedViolations>
<module.name>org.apache.flume.sink.mongodb</module.name>
</properties>
@@ -77,12 +76,6 @@
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <scope>test</scope>
- </dependency>
-
</dependencies>
<build>
diff --git
a/flume-mongodb-sink/src/test/java/org/apache/flume/sink/mongodb/TestMongoDbSink.java
b/flume-mongodb-sink/src/test/java/org/apache/flume/sink/mongodb/TestMongoDbSink.java
index a2d2846..3dc4de0 100644
---
a/flume-mongodb-sink/src/test/java/org/apache/flume/sink/mongodb/TestMongoDbSink.java
+++
b/flume-mongodb-sink/src/test/java/org/apache/flume/sink/mongodb/TestMongoDbSink.java
@@ -21,6 +21,7 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+import java.lang.reflect.Field;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
@@ -39,7 +40,6 @@ import org.apache.flume.event.EventBuilder;
import org.apache.flume.instrumentation.SinkCounter;
import org.bson.Document;
import org.junit.Test;
-import org.mockito.internal.util.reflection.Whitebox;
public class TestMongoDbSink {
@@ -70,6 +70,26 @@ public class TestMongoDbSink {
return context;
}
+ private static void setInternalState(Object target, String fieldName,
Object value) {
+ try {
+ Field field = target.getClass().getDeclaredField(fieldName);
+ field.setAccessible(true);
+ field.set(target, value);
+ } catch (ReflectiveOperationException e) {
+ throw new IllegalStateException("Unable to set field " +
fieldName, e);
+ }
+ }
+
+ private static Object getInternalState(Object target, String fieldName) {
+ try {
+ Field field = target.getClass().getDeclaredField(fieldName);
+ field.setAccessible(true);
+ return field.get(target);
+ } catch (ReflectiveOperationException e) {
+ throw new IllegalStateException("Unable to read field " +
fieldName, e);
+ }
+ }
+
private static MongoDbSink createSink(Context context, MongoDbWriter
writer) {
MongoDbSink sink = new MongoDbSink();
Channel channel = new MemoryChannel();
@@ -77,8 +97,8 @@ public class TestMongoDbSink {
sink.setChannel(channel);
channel.start();
Configurables.configure(sink, context);
- Whitebox.setInternalState(sink, "writer", writer);
- Whitebox.setInternalState(sink, "counter", new SinkCounter("test"));
+ setInternalState(sink, "writer", writer);
+ setInternalState(sink, "counter", new SinkCounter("test"));
return sink;
}
@@ -254,7 +274,7 @@ public class TestMongoDbSink {
sink.configure(context);
@SuppressWarnings("unchecked")
- Map<String, String> collectionMap = (Map<String, String>)
Whitebox.getInternalState(sink, "collectionMap");
+ Map<String, String> collectionMap = (Map<String, String>)
getInternalState(sink, "collectionMap");
assertEquals("collectionA", collectionMap.get("typeA"));
assertEquals("collectionB", collectionMap.get("typeB"));
}
diff --git a/mvnw b/mvnw
new file mode 100755
index 0000000..8d937f4
--- /dev/null
+++ b/mvnw
@@ -0,0 +1,308 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Apache Maven Wrapper startup batch script, version 3.2.0
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /usr/local/etc/mavenrc ] ; then
+ . /usr/local/etc/mavenrc
+ fi
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "$(uname)" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to
/Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME
+ else
+ JAVA_HOME="/Library/Java/Home"; export JAVA_HOME
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=$(java-config --jre-home)
+ fi
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=$(cygpath --path --unix "$CLASSPATH")
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] &&
+ JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit
1); pwd)"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="$(which javac)"
+ if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^
]*\)')" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=$(which readlink)
+ if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then
+ if $darwin ; then
+ javaHome="$(dirname "\"$javaExecutable\"")"
+ javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac"
+ else
+ javaExecutable="$(readlink -f "\"$javaExecutable\"")"
+ fi
+ javaHome="$(dirname "\"$javaExecutable\"")"
+ javaHome=$(expr "$javaHome" : '\(.*\)/bin')
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=$(cd "$wdir/.." || exit 1; pwd)
+ fi
+ # end of workaround
+ done
+ printf '%s' "$(cd "$basedir" || exit 1; pwd)"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ # Remove \r in case we run on Windows within Git Bash
+ # and check out the repository with auto CRLF management
+ # enabled. Otherwise, we may read lines that are delimited with
+ # \r\n and produce $'-Xarg\r' rather than -Xarg due to word
+ # splitting rules.
+ tr -s '\r\n' ' ' < "$1"
+ fi
+}
+
+log() {
+ if [ "$MVNW_VERBOSE" = true ]; then
+ printf '%s\n' "$1"
+ fi
+}
+
+BASE_DIR=$(find_maven_basedir "$(dirname "$0")")
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR
+log "$MAVEN_PROJECTBASEDIR"
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from
Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in
binary data.
+##########################################################################################
+wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar"
+if [ -r "$wrapperJarPath" ]; then
+ log "Found $wrapperJarPath"
+else
+ log "Couldn't find $wrapperJarPath, downloading it ..."
+
+ if [ -n "$MVNW_REPOURL" ]; then
+
wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
+ else
+
wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
+ fi
+ while IFS="=" read -r key value; do
+ # Remove '\r' from value to allow usage on windows as IFS does not
consider '\r' as a separator ( considers space, tab, new line ('\n'), and
custom '=' )
+ safeValue=$(echo "$value" | tr -d '\r')
+ case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;;
+ esac
+ done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
+ log "Downloading from: $wrapperUrl"
+
+ if $cygwin; then
+ wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath")
+ fi
+
+ if command -v wget > /dev/null; then
+ log "Found wget ... using wget"
+ [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet"
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f
"$wrapperJarPath"
+ else
+ wget $QUIET --http-user="$MVNW_USERNAME"
--http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f
"$wrapperJarPath"
+ fi
+ elif command -v curl > /dev/null; then
+ log "Found curl ... using curl"
+ [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent"
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f
"$wrapperJarPath"
+ else
+ curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o
"$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
+ fi
+ else
+ log "Falling back to using Java to download"
+
javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java"
+
javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class"
+ # For Cygwin, switch paths to Windows format before running javac
+ if $cygwin; then
+ javaSource=$(cygpath --path --windows "$javaSource")
+ javaClass=$(cygpath --path --windows "$javaClass")
+ fi
+ if [ -e "$javaSource" ]; then
+ if [ ! -e "$javaClass" ]; then
+ log " - Compiling MavenWrapperDownloader.java ..."
+ ("$JAVA_HOME/bin/javac" "$javaSource")
+ fi
+ if [ -e "$javaClass" ]; then
+ log " - Running MavenWrapperDownloader.java ..."
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader
"$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath"
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+# If specified, validate the SHA-256 sum of the Maven wrapper jar file
+wrapperSha256Sum=""
+while IFS="=" read -r key value; do
+ case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;;
+ esac
+done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
+if [ -n "$wrapperSha256Sum" ]; then
+ wrapperSha256Result=false
+ if command -v sha256sum > /dev/null; then
+ if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null
2>&1; then
+ wrapperSha256Result=true
+ fi
+ elif command -v shasum > /dev/null; then
+ if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c >
/dev/null 2>&1; then
+ wrapperSha256Result=true
+ fi
+ else
+ echo "Checksum validation was requested but neither 'sha256sum' or
'shasum' are available."
+ echo "Please install either command, or disable validation by removing
'wrapperSha256Sum' from your maven-wrapper.properties."
+ exit 1
+ fi
+ if [ $wrapperSha256Result = false ]; then
+ echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper
might be compromised." >&2
+ echo "Investigate or delete $wrapperJarPath to attempt a clean download."
>&2
+ echo "If you updated your Maven version, you need to update the specified
wrapperSha256Sum property." >&2
+ exit 1
+ fi
+fi
+
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config")
$MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME")
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=$(cygpath --path --windows "$CLASSPATH")
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR")
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+# shellcheck disable=SC2086 # safe args
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ $MAVEN_DEBUG_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/mvnw.cmd b/mvnw.cmd
new file mode 100644
index 0000000..c4586b5
--- /dev/null
+++ b/mvnw.cmd
@@ -0,0 +1,205 @@
+@REM
----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM
----------------------------------------------------------------------------
+
+@REM
----------------------------------------------------------------------------
+@REM Apache Maven Wrapper startup batch script, version 3.2.0
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM
----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd
ending
+if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat"
%*
+if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd"
%*
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another
setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder
".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto
endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do
set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set
WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
+
+FOR /F "usebackq tokens=1,2 delims==" %%A IN
("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+ IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from
Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in
binary data.
+if exist %WRAPPER_JAR% (
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Found %WRAPPER_JAR%
+ )
+) else (
+ if not "%MVNW_REPOURL%" == "" (
+ SET
WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
+ )
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %WRAPPER_URL%
+ )
+
+ powershell -Command "&{"^
+ "$webclient = new-object System.Net.WebClient;"^
+ "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and
[string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+ "$webclient.Credentials = new-object
System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+ "}"^
+ "[Net.ServicePointManager]::SecurityProtocol =
[Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%',
'%WRAPPER_JAR%')"^
+ "}"
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Finished downloading %WRAPPER_JAR%
+ )
+)
+@REM End of extension
+
+@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file
+SET WRAPPER_SHA_256_SUM=""
+FOR /F "usebackq tokens=1,2 delims==" %%A IN
("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+ IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B
+)
+IF NOT %WRAPPER_SHA_256_SUM%=="" (
+ powershell -Command "&{"^
+ "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm
SHA256).Hash.ToLower();"^
+ "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^
+ " Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your
Maven wrapper might be compromised.';"^
+ " Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean
download.';"^
+ " Write-Output 'If you updated your Maven version, you need to update
the specified wrapperSha256Sum property.';"^
+ " exit 1;"^
+ "}"^
+ "}"
+ if ERRORLEVEL 1 goto error
+)
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% ^
+ %JVM_CONFIG_MAVEN_PROPS% ^
+ %MAVEN_OPTS% ^
+ %MAVEN_DEBUG_OPTS% ^
+ -classpath %WRAPPER_JAR% ^
+ "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
+ %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd
ending
+if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
+if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%"=="on" pause
+
+if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
+
+cmd /C exit /B %ERROR_CODE%
diff --git a/pom.xml b/pom.xml
index 9567c93..9a2fb4b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,122 +25,40 @@
<relativePath />
</parent>
- <groupId>org.apache.flume</groupId>
<artifactId>flume-mongodb-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>${revision}</version>
<packaging>pom</packaging>
<name>Flume MongoDB Parent</name>
- <inceptionYear>2022</inceptionYear>
+ <inceptionYear>2026</inceptionYear>
- <organization>
- <name>Apache Software Foundation</name>
- <url>http://www.apache.org</url>
- </organization>
-
- <licenses>
- <license>
- <name>The Apache Software License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
- </license>
- </licenses>
-
- <developers>
- <developer>
- <id>rgoers</id>
- <name>Ralph Goers</name>
- <email>[email protected]</email>
- <organization>Intuit</organization>
- </developer>
- </developers>
-
- <mailingLists>
- <mailingList>
- <name>Flume User List</name>
- <subscribe>[email protected]</subscribe>
- <unsubscribe>[email protected]</unsubscribe>
- <post>[email protected]</post>
- <archive>http://mail-archives.apache.org/mod_mbox/flume-user/</archive>
- </mailingList>
- <mailingList>
- <name>Flume Developer List</name>
- <subscribe>[email protected]</subscribe>
- <unsubscribe>[email protected]</unsubscribe>
- <post>[email protected]</post>
- <archive>http://mail-archives.apache.org/mod_mbox/flume-dev/</archive>
- </mailingList>
- <mailingList>
- <name>Flume Commits</name>
- <subscribe>[email protected]</subscribe>
- <unsubscribe>[email protected]</unsubscribe>
- <post>[email protected]</post>
-
<archive>http://mail-archives.apache.org/mod_mbox/flume-commits/</archive>
- </mailingList>
- </mailingLists>
<modules>
<module>flume-mongodb-sink</module>
</modules>
- <scm>
-
<connection>https://gitbox.apache.org/repos/asf/flume-spring-boot.git</connection>
-
<developerConnection>https://gitbox.apache.org/repos/asf/flume-spring-boot.git</developerConnection>
- <url>https://gitbox.apache.org/repos/asf/flume-spring-boot.git</url>
+ <scm child.scm.connection.inherit.append.path="false"
child.scm.developerConnection.inherit.append.path="false"
child.scm.url.inherit.append.path="false">
+
<connection>scm:git:https://gitbox.apache.org/repos/asf/logging-flume-mongodb.git</connection>
+
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/logging-flume-mongodb.git</developerConnection>
+ <tag>rel/${revision}</tag>
+ <url>https://gitbox.apache.org/repos/asf/logging-flume-mongodb.git</url>
</scm>
- <issueManagement>
- <system>JIRA</system>
- <url>https://issues.apache.org/jira/browse/FLUME</url>
- </issueManagement>
-
<properties>
- <ReleaseVersion>2.0.0</ReleaseVersion>
- <ReleaseManager>Ralph Goers</ReleaseManager>
- <ReleaseKey>B3D8E1BA</ReleaseKey>
- <SigningUserName>[email protected]</SigningUserName>
- <checksum-maven-plugin.version>1.11</checksum-maven-plugin.version>
+
+ <revision>2.0.0-SNAPSHOT</revision>
+
+ <!-- The website is generated by Antora from `flume-project`: skip the
per-module `maven-site-plugin` sites. -->
+ <maven.site.skip>true</maven.site.skip>
+ <!-- Dummy value; overwritten by CI at release time. Do not edit manually.
-->
+
<project.build.outputTimestamp>2026-01-01T00:00:00Z</project.build.outputTimestamp>
+
+ <!-- Dependency versions -->
<dropwizard-metrics.version>4.1.18</dropwizard-metrics.version>
- <findsecbugs-plugin.version>1.12.0</findsecbugs-plugin.version>
- <flume.version>2.0.0-SNAPSHOT</flume.version>
- <jackson.version>2.17.0</jackson.version>
- <junit.version>4.13.2</junit.version>
- <mongodb.version>3.7.0</mongodb.version>
- <log4j.version>2.26.1</log4j.version>
- <maven.compiler.source>11</maven.compiler.source>
- <maven.compiler.target>11</maven.compiler.target>
- <mockito.version>1.9.0</mockito.version>
- <module.name>org.apache.flume.mongodb</module.name>
- <mvn-gpg-plugin.version>1.6</mvn-gpg-plugin.version>
- <mvn-javadoc-plugin.version>2.9</mvn-javadoc-plugin.version>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <rat.version>0.12</rat.version>
- <spotbugs-maven-plugin.version>4.7.2.1</spotbugs-maven-plugin.version>
- <spotless-maven-plugin.version>2.27.2</spotless-maven-plugin.version>
<mongodb.version>5.10.0</mongodb.version>
</properties>
+
<dependencyManagement>
<dependencies>
- <dependency>
- <groupId>org.apache.flume</groupId>
- <artifactId>flume-ng-core</artifactId>
- <version>${flume.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.flume</groupId>
- <artifactId>flume-ng-sdk</artifactId>
- <version>${flume.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.flume</groupId>
- <artifactId>flume-ng-configuration</artifactId>
- <version>${flume.version}</version>
- </dependency>
- <dependency>
- <groupId>org.mongodb</groupId>
- <artifactId>mongodb-driver-bom</artifactId>
- <version>${mongodb.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
@@ -148,82 +66,46 @@
<version>${dropwizard-metrics.version}</version>
</dependency>
+ <!-- BOMs at the end, so they don't override the versions above -->
<dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <version>${log4j.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j.version}</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-core</artifactId>
- <version>${jackson.version}</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito.version}</version>
- <scope>test</scope>
+ <groupId>org.mongodb</groupId>
+ <artifactId>mongodb-driver-bom</artifactId>
+ <version>${mongodb.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <version>${rat.version}</version>
- <configuration>
- <excludes>
- <exclude>**/.idea/</exclude>
- <exclude>**/*.iml</exclude>
- <exclude>src/main/resources/META-INF/services/**/*</exclude>
- <exclude>**/nb-configuration.xml</exclude>
- <exclude>.git/</exclude>
- <exclude>patchprocess/</exclude>
- <exclude>.gitignore</exclude>
- <exclude>**/*.yml</exclude>
- <exclude>**/*.yaml</exclude>
- <exclude>**/*.json</exclude>
- <!-- ASF jenkins box puts the Maven repo in our root directory. -->
- <exclude>.repository/</exclude>
- <exclude>**/*.diff</exclude>
- <exclude>**/*.patch</exclude>
- <exclude>**/*.avsc</exclude>
- <exclude>**/*.avro</exclude>
- <exclude>**/docs/**</exclude>
- <exclude>**/test/resources/**</exclude>
- <exclude>**/.settings/*</exclude>
- <exclude>**/.classpath</exclude>
- <exclude>**/.project</exclude>
- <exclude>**/target/**</exclude>
- <exclude>**/derby.log</exclude>
- <exclude>**/metastore_db/</exclude>
- <exclude>.mvn/**</exclude>
- <exclude>**/exclude-pmd.properties</exclude>
- </excludes>
- <consoleOutput>true</consoleOutput>
- </configuration>
- <executions>
- <execution>
- <id>verify.rat</id>
- <goals>
- <goal>check</goal>
- </goals>
- <phase>verify</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+
+ <profiles>
+ <!-- Temporary copy from org.apache:apache, until the parent POM is
released -->
+ <profile>
+ <id>use-apache-snapshots</id>
+ <activation>
+ <property>
+ <name>apache.snapshots</name>
+ </property>
+ </activation>
+ <repositories>
+ <repository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <id>apache.snapshots</id>
+ <name>Apache Snapshot Repository</name>
+ <url>https://repository.apache.org/snapshots</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <id>apache.snapshots</id>
+ <name>Apache Snapshot Repository</name>
+ <url>https://repository.apache.org/snapshots</url>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ </profiles>
</project>
diff --git a/src/changelog/.2.x.x/.release-notes.adoc.ftl
b/src/changelog/.2.x.x/.release-notes.adoc.ftl
new file mode 100644
index 0000000..941e571
--- /dev/null
+++ b/src/changelog/.2.x.x/.release-notes.adoc.ftl
@@ -0,0 +1,25 @@
+////
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ https://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+////
+
+${"[#release-notes-" + release.version?replace("[^a-zA-Z0-9]", "-", "r") + "]"}
+== ${release.version}
+
+<#if release.date?has_content>Release date:: ${release.date}</#if>
+
+This is the first release of Apache Flume MongoDB, which provides a MongoDB
sink for Apache Flume.
+
+<#include "../.changelog.adoc.ftl">
diff --git a/src/changelog/.2.x.x/add_mongodb_sink.xml
b/src/changelog/.2.x.x/add_mongodb_sink.xml
new file mode 100644
index 0000000..9978aa4
--- /dev/null
+++ b/src/changelog/.2.x.x/add_mongodb_sink.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="https://logging.apache.org/xml/ns"
+ xsi:schemaLocation="https://logging.apache.org/xml/ns
https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
+ type="added">
+ <description format="asciidoc">Writes Flume events to MongoDB</description>
+</entry>
diff --git a/src/changelog/.changelog.adoc.ftl
b/src/changelog/.changelog.adoc.ftl
new file mode 100644
index 0000000..b36ecf9
--- /dev/null
+++ b/src/changelog/.changelog.adoc.ftl
@@ -0,0 +1,27 @@
+<#--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to you under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<#if entriesByType?size gt 0>
+<#list entriesByType as entryType, entries>
+
+${"[#release-notes-" + release.version?replace("[^a-zA-Z0-9]", "-", "r") + "-"
+ entryType?lower_case + "]"}
+=== ${entryType?capitalize}
+
+<#list entries as entry>
+* ${entry.description.text?replace("\\s+", " ", "r")}<#if
entry.issues?has_content> (<#list entry.issues as
issue>${issue.link}[${issue.id}]<#if issue?has_next>, </#if></#list>)</#if>
+</#list>
+</#list>
+</#if>
diff --git a/src/changelog/.index.adoc.ftl b/src/changelog/.index.adoc.ftl
new file mode 100644
index 0000000..c71482e
--- /dev/null
+++ b/src/changelog/.index.adoc.ftl
@@ -0,0 +1,42 @@
+////
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+////
+
+////
+ ██ ██ █████ ██████ ███ ██ ██ ███ ██ ██████ ██
+ ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██ ██ ██
+ ██ █ ██ ███████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██
+ ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
+ ███ ███ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██████ ██
+
+ IF THIS FILE IS CALLED `release-notes.adoc`, IT IS AUTO-GENERATED, DO NOT
EDIT IT!
+
+ The release notes page is generated from `src/changelog/.index.adoc.ftl`
during
+ the `pre-site` phase of the Maven build and is written to
+ `target/generated-site/antora/modules/ROOT/pages/release-notes.adoc`,
+ where the Antora site build picks it up.
+ Hence, you must always edit `.index.adoc.ftl` and never the generated file.
+////
+
+// Release notes index does not look nice with a deep sectioning, override it:
+:page-toclevels: 1
+
+${"[#release-notes]"}
+= Release notes
+<#list releases as release><#if release.changelogEntryCount gt 0>
+
+include::_release-notes/${release.version}.adoc[]
+</#if></#list>