diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index c6de493ed0..c8882b086a 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -15,7 +15,13 @@
name: Java CI
-on: [push, pull_request]
+on:
+ workflow_dispatch: #Allows to run workflow manually
+ push:
+ branches:
+ - master
+ - 'DBCP_2_**'
+ pull_request:
permissions:
contents: read
@@ -34,17 +40,17 @@ jobs:
# experimental: true
steps:
- - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- with:
- persist-credentials: false
- - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
+ - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
+ with:
+ persist-credentials: false
+ - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
+ uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
diff --git a/README-orig.md b/README-orig.md
new file mode 100644
index 0000000000..954b884ae6
--- /dev/null
+++ b/README-orig.md
@@ -0,0 +1,118 @@
+
+
+Apache Commons DBCP
+===================
+
+[![Java CI](https://github.com/apache/commons-dbcp/actions/workflows/maven.yml/badge.svg)](https://github.com/apache/commons-dbcp/actions/workflows/maven.yml)
+[![Coverage Status](https://codecov.io/gh/apache/commons-dbcp/branch/master/graph/badge.svg)](https://app.codecov.io/gh/apache/commons-dbcp)
+[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-dbcp2/badge.svg?gav=true)](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-dbcp2/?gav=true)
+[![Javadocs](https://javadoc.io/badge/org.apache.commons/commons-dbcp2/2.12.0.svg)](https://javadoc.io/doc/org.apache.commons/commons-dbcp2/2.12.0)
+[![CodeQL](https://github.com/apache/commons-dbcp/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/apache/commons-dbcp/actions/workflows/codeql-analysis.yml)
+[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/apache/commons-dbcp/badge)](https://api.securityscorecards.dev/projects/github.com/apache/commons-dbcp)
+
+Apache Commons DBCP software implements Database Connection Pooling
+
+Documentation
+-------------
+
+More information can be found on the [Apache Commons DBCP homepage](https://commons.apache.org/proper/commons-dbcp).
+The [Javadoc](https://commons.apache.org/proper/commons-dbcp/apidocs) can be browsed.
+Questions related to the usage of Apache Commons DBCP should be posted to the [user mailing list](https://commons.apache.org/mail-lists.html).
+
+Getting the latest release
+--------------------------
+You can download source and binaries from our [download page](https://commons.apache.org/proper/commons-dbcp/download_dbcp.cgi).
+
+Alternatively, you can pull it from the central Maven repositories:
+
+```xml
+
+ org.apache.commons
+ commons-dbcp2
+ 2.12.0
+
+```
+
+Building
+--------
+
+Building requires a Java JDK and [Apache Maven](https://maven.apache.org/).
+The required Java version is found in the `pom.xml` as the `maven.compiler.source` property.
+
+From a command shell, run `mvn` without arguments to invoke the default Maven goal to run all tests and checks.
+
+Contributing
+------------
+
+We accept Pull Requests via GitHub. The [developer mailing list](https://commons.apache.org/mail-lists.html) is the main channel of communication for contributors.
+There are some guidelines which will make applying PRs easier for us:
++ No tabs! Please use spaces for indentation.
++ Respect the existing code style for each file.
++ Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
++ Provide JUnit tests for your changes and make sure your changes don't break any existing tests by running ```mvn```.
+
+If you plan to contribute on a regular basis, please consider filing a [contributor license agreement](https://www.apache.org/licenses/#clas).
+You can learn more about contributing via GitHub in our [contribution guidelines](CONTRIBUTING.md).
+
+License
+-------
+This code is licensed under the [Apache License v2](https://www.apache.org/licenses/LICENSE-2.0).
+
+See the `NOTICE.txt` file for required notices and attributions.
+
+Donating
+--------
+You like Apache Commons DBCP? Then [donate back to the ASF](https://www.apache.org/foundation/contributing.html) to support development.
+
+Additional Resources
+--------------------
+
++ [Apache Commons Homepage](https://commons.apache.org/)
++ [Apache Issue Tracker (JIRA)](https://issues.apache.org/jira/browse/DBCP)
++ [Apache Commons Slack Channel](https://the-asf.slack.com/archives/C60NVB8AD)
++ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
+
+Apache Commons Components
+-------------------------
+
+Please see the [list of components](https://commons.apache.org/components.html)
diff --git a/README.md b/README.md
index 954b884ae6..8f6f16c114 100644
--- a/README.md
+++ b/README.md
@@ -14,105 +14,99 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-Apache Commons DBCP
-===================
-
-[![Java CI](https://github.com/apache/commons-dbcp/actions/workflows/maven.yml/badge.svg)](https://github.com/apache/commons-dbcp/actions/workflows/maven.yml)
-[![Coverage Status](https://codecov.io/gh/apache/commons-dbcp/branch/master/graph/badge.svg)](https://app.codecov.io/gh/apache/commons-dbcp)
-[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-dbcp2/badge.svg?gav=true)](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-dbcp2/?gav=true)
-[![Javadocs](https://javadoc.io/badge/org.apache.commons/commons-dbcp2/2.12.0.svg)](https://javadoc.io/doc/org.apache.commons/commons-dbcp2/2.12.0)
-[![CodeQL](https://github.com/apache/commons-dbcp/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/apache/commons-dbcp/actions/workflows/codeql-analysis.yml)
-[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/apache/commons-dbcp/badge)](https://api.securityscorecards.dev/projects/github.com/apache/commons-dbcp)
-
-Apache Commons DBCP software implements Database Connection Pooling
-
-Documentation
--------------
-
-More information can be found on the [Apache Commons DBCP homepage](https://commons.apache.org/proper/commons-dbcp).
-The [Javadoc](https://commons.apache.org/proper/commons-dbcp/apidocs) can be browsed.
-Questions related to the usage of Apache Commons DBCP should be posted to the [user mailing list](https://commons.apache.org/mail-lists.html).
-
-Getting the latest release
---------------------------
-You can download source and binaries from our [download page](https://commons.apache.org/proper/commons-dbcp/download_dbcp.cgi).
-
-Alternatively, you can pull it from the central Maven repositories:
+commons-dbcp
+============
+
+[![Java CI](https://github.com/nuxeo/commons-dbcp/actions/workflows/maven.yml/badge.svg)](https://github.com/nuxeo/commons-dbcp/actions/workflows/maven.yml)
+[![CodeQL](https://github.com/nuxeo/commons-dbcp/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/nuxeo/commons-dbcp/actions/workflows/codeql-analysis.yml)
+
+This is a fork of [apache/commons-dbcp](https://github.com/apache/commons-dbcp) which aims to provide a Jakarta compatible version of the library.
+
+Original readme can be found [there](README-orig.md).
+
+You can download this library from our artifactory.
+
+Direct link is https://packages.nuxeo.com/service/rest/repository/browse/maven-public/org/apache/commons/commons-dbcp2/.
+
+Or with Maven:
```xml
-
- org.apache.commons
- commons-dbcp2
- 2.12.0
-
+
+ ...
+
+
+
+ org.apache.commons
+ commons-dbcp2
+ VERSION
+
+
+
+
+ ...
+
+
+
+ nuxeo-public
+ https://packages.nuxeo.com/repository/maven-public/
+
+ true
+
+
+ always
+ true
+
+
+
+ ...
+
```
-Building
---------
+## Release the project
-Building requires a Java JDK and [Apache Maven](https://maven.apache.org/).
-The required Java version is found in the `pom.xml` as the `maven.compiler.source` property.
+Make sure the project builds and its tests pass.
-From a command shell, run `mvn` without arguments to invoke the default Maven goal to run all tests and checks.
+Then create a temporary branch to perform the release:
-Contributing
-------------
+```bash
+git checkout -b tmp-release
+```
-We accept Pull Requests via GitHub. The [developer mailing list](https://commons.apache.org/mail-lists.html) is the main channel of communication for contributors.
-There are some guidelines which will make applying PRs easier for us:
-+ No tabs! Please use spaces for indentation.
-+ Respect the existing code style for each file.
-+ Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
-+ Provide JUnit tests for your changes and make sure your changes don't break any existing tests by running ```mvn```.
+Then update the project version to final, for instance 2.12.1-NX01:
-If you plan to contribute on a regular basis, please consider filing a [contributor license agreement](https://www.apache.org/licenses/#clas).
-You can learn more about contributing via GitHub in our [contribution guidelines](CONTRIBUTING.md).
+```bash
+mvn versions:set -DnewVersion=2.12.1-NX01 -DgenerateBackupPoms=false
+```
-License
--------
-This code is licensed under the [Apache License v2](https://www.apache.org/licenses/LICENSE-2.0).
+Then commit and tag the release:
-See the `NOTICE.txt` file for required notices and attributions.
+```bash
+git commit -a -m "Release 2.12.1-NX01"
+git tag -a -m "Release 2.12.1-NX01" commons-dbcp-2.12.1-NX01
+```
-Donating
---------
-You like Apache Commons DBCP? Then [donate back to the ASF](https://www.apache.org/foundation/contributing.html) to support development.
+Then deploy the maven artefacts:
-Additional Resources
---------------------
+```bash
+mvn clean source:jar deploy -DskipTests -DaltDeploymentRepository=maven-vendor::default::VENDOR_URL
+```
-+ [Apache Commons Homepage](https://commons.apache.org/)
-+ [Apache Issue Tracker (JIRA)](https://issues.apache.org/jira/browse/DBCP)
-+ [Apache Commons Slack Channel](https://the-asf.slack.com/archives/C60NVB8AD)
-+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
+> [!IMPORTANT]
+> You should replace the `VENDOR_URL`.
+> Your Maven `settings.xml` file should contain appropriate authentication (if any) for the `maven-vendor` repository.
-Apache Commons Components
--------------------------
+Then push the tag:
-Please see the [list of components](https://commons.apache.org/components.html)
+```bash
+git push --tags
+```
+
+Then cleanup your branch and prepare the next development iteration:
+
+```bash
+git checkout main
+git branch -D tmp-release
+mvn versions:set -DnewVersion=2.12.1-NX02-SNAPSHOT -DgenerateBackupPoms=false
+git commit -a -m "Post release 2.12.1-NX01"
+git push
+```
diff --git a/pom.xml b/pom.xml
index f5b8ae155e..8edde2e421 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
4.0.0
commons-dbcp2
- 2.12.1-SNAPSHOT
+ 2.12.1-NX01-SNAPSHOT
Apache Commons DBCP
2001
@@ -175,7 +175,7 @@
UTF-8
UTF-8
- 2024-03-04T01:42:34Z
+ 2024-06-12T10:05:43Z
1.8
1.8
dbcp