You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2025/04/10 21:55:04 UTC
(logging-log4j-samples) branch feature/simplify-dep-management created (now c35027e)
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a change to branch feature/simplify-dep-management
in repository https://gitbox.apache.org/repos/asf/logging-log4j-samples.git
at c35027e Remove Apache Snapshots from release builds
This branch includes the following new commits:
new c35027e Remove Apache Snapshots from release builds
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(logging-log4j-samples) 01/01: Remove Apache Snapshots from release builds
Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch feature/simplify-dep-management
in repository https://gitbox.apache.org/repos/asf/logging-log4j-samples.git
commit c35027e3eea24827e13b4ebc82b8aa8fba7d4b6c
Author: Piotr P. Karwasz <pk...@apache.org>
AuthorDate: Thu Apr 10 23:54:53 2025 +0200
Remove Apache Snapshots from release builds
This PR:
- Limits the usage of `repository.apache.org` to artifacts in the `org.apache.logging` group.
- Uses the Snapshots repository only if `log4j.repository.url` is not specified or empty.
---
settings.gradle | 28 +++++++++++-----------------
1 file changed, 11 insertions(+), 17 deletions(-)
diff --git a/settings.gradle b/settings.gradle
index 9b3d409..8bdb9c3 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -22,28 +22,22 @@ pluginManagement {
}
}
dependencyResolutionManagement {
- repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
+ // Points to the correct Apache staging repository
+ var apacheSnapshots = 'https://repository.apache.org/snapshots'
+ var repositoryUrl = providers.gradleProperty('log4j.repository.url')
+ .filter { !it.isEmpty() }
+ .getOrElse(apacheSnapshots)
maven {
- name = 'Apache Snapshots Repository'
- url = "https://repository.apache.org/snapshots"
+ name = 'Log4j Repository'
+ url = repositoryUrl
mavenContent {
- snapshotsOnly()
- }
- }
- // Points to the correct Apache staging repository
- //
- // See gradle.properties
- var repositoryUrl = providers.gradleProperty("log4j.repository.url")
- if (repositoryUrl != null && !repositoryUrl.toString().isEmpty()) {
- maven {
- name = 'Apache Repository'
- url = repositoryUrl
- mavenContent {
- releasesOnly()
- }
+ // Only use this repository for Apache Logging Services artifacts
+ includeGroupAndSubgroups('org.apache.logging')
+ // Only use this repository for either snapshots or releases
+ repositoryUrl == apacheSnapshots ? snapshotsOnly() : releasesOnly()
}
}
}