Skip to content

Fix more places to use the internal maven proxy #8592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ variables:
DEPENDENCY_CACHE_POLICY: pull
BUILD_CACHE_POLICY: pull
GRADLE_VERSION: "8.4" # must match gradle-wrapper.properties
MAVEN_REPOSITORY_PROXY: "https://artifactual.us1.prod.dog/repository/maven-central/"
MAVEN_REPOSITORY_PROXY: "http://artifactual.artifactual.all-clusters.local-dc.fabric.dog:8081/repository/maven-central/"
GRADLE_PLUGIN_PROXY: "http://artifactual.artifactual.all-clusters.local-dc.fabric.dog:8081/repository/gradle-plugin-portal-proxy/"
JAVA_BUILD_IMAGE_VERSION: "v25.01"
REPO_NOTIFICATION_CHANNEL: "#apm-java-escalations"
PROFILE_TESTS:
Expand Down Expand Up @@ -75,7 +76,7 @@ default:
policy: $BUILD_CACHE_POLICY
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
- export GRADLE_ARGS=" --build-cache --stacktrace --no-daemon --parallel --max-workers=$GRADLE_WORKERS -PmavenRepositoryProxy=$MAVEN_REPOSITORY_PROXY"
- export GRADLE_ARGS=" --build-cache --stacktrace --no-daemon --parallel --max-workers=$GRADLE_WORKERS -PmavenRepositoryProxy=$MAVEN_REPOSITORY_PROXY -PgradlePluginProxy=$GRADLE_PLUGIN_PROXY"
- *normalize_node_index
# for weird reasons, gradle will always "chmod 700" the .gradle folder
# with Gitlab caching, .gradle is always owned by root and thus gradle's chmod invocation fails
Expand Down
7 changes: 1 addition & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ description = 'dd-trace-java'

def isCI = System.getenv("CI") != null

apply from: "$rootDir/gradle/repositories.gradle"
apply from: "$rootDir/gradle/scm.gradle"
spotless {
// only resolve the spotless dependencies once in the build
Expand Down Expand Up @@ -79,12 +80,6 @@ allprojects {
}
}

repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
}

tasks.register("latestDepTest")

nexusPublishing {
Expand Down
6 changes: 2 additions & 4 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ gradlePlugin {
}
}

repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
apply {
from("$rootDir/../gradle/repositories.gradle")
}

dependencies {
Expand Down
6 changes: 2 additions & 4 deletions buildSrc/call-site-instrumentation-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ spotless {
}
}

repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
apply {
from("$rootDir/../gradle/repositories.gradle")
}

dependencies {
Expand Down
14 changes: 14 additions & 0 deletions dd-java-agent/agent-ci-visibility/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
buildscript {
repositories {
mavenLocal()
if (project.rootProject.hasProperty("gradlePluginProxy")) {
maven {
url project.rootProject.property("gradlePluginProxy")
allowInsecureProtocol true
}
}
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
maven {
url project.rootProject.property("mavenRepositoryProxy")
allowInsecureProtocol true
}
}
gradlePluginPortal()
mavenCentral()
}

Expand Down
15 changes: 14 additions & 1 deletion dd-java-agent/benchmark-integration/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
buildscript {
repositories {
mavenCentral()
mavenLocal()
if (project.rootProject.hasProperty("gradlePluginProxy")) {
maven {
url project.rootProject.property("gradlePluginProxy")
allowInsecureProtocol true
}
}
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
maven {
url project.rootProject.property("mavenRepositoryProxy")
allowInsecureProtocol true
}
}
gradlePluginPortal()
mavenCentral()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ dependencies {
}

repositories {
mavenLocal()
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
maven {
url project.rootProject.property("mavenRepositoryProxy")
allowInsecureProtocol true
}
}
mavenCentral()
gradlePluginPortal()
maven {
name "lightbend-maven-releases"
url "https://repo.lightbend.com/lightbend/maven-release"
Expand Down
14 changes: 14 additions & 0 deletions dd-java-agent/instrumentation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@
buildscript {

repositories {
mavenLocal()
if (project.rootProject.hasProperty("gradlePluginProxy")) {
maven {
url project.rootProject.property("gradlePluginProxy")
allowInsecureProtocol true
}
}
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
maven {
url project.rootProject.property("mavenRepositoryProxy")
allowInsecureProtocol true
}
}
gradlePluginPortal()
mavenCentral()
}

Expand Down
7 changes: 7 additions & 0 deletions dd-java-agent/instrumentation/datanucleus-4/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ import org.datanucleus.enhancer.DataNucleusEnhancer

buildscript {
repositories {
mavenLocal()
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
maven {
url project.rootProject.property("mavenRepositoryProxy")
allowInsecureProtocol true
}
}
mavenCentral()
}

Expand Down
22 changes: 22 additions & 0 deletions dd-java-agent/instrumentation/mule-4/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,26 @@
</snapshots>
</pluginRepository>
</pluginRepositories>
<profiles>
<profile>
<id>maven-proxy-profile</id>
<activation>
<property>
<name>env.MAVEN_REPOSITORY_PROXY</name>
</property>
</activation>
<repositories>
<repository>
<id>maven-proxy-repo</id>
<url>${env.MAVEN_REPOSITORY_PROXY}</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>maven-plugin-proxy</id>
<url>${env.MAVEN_REPOSITORY_PROXY}</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</project>
7 changes: 0 additions & 7 deletions dd-java-agent/testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ ext {

apply from: "$rootDir/gradle/java.gradle"

repositories {
ivy {
artifactPattern 'https://sqreen-ci-java.s3.amazonaws.com/jars/[organisation]/[artifact]-[revision](-[classifier]).[ext]'
ivyPattern 'https://sqreen-ci-java.s3.amazonaws.com/jars/[organisation]/[module]-[revision].xml'
}
}

minimumBranchCoverage = 0.5
minimumInstructionCoverage = 0.5
excludedClassesCoverage += [
Expand Down
4 changes: 0 additions & 4 deletions dd-smoke-tests/apm-tracing-disabled/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ java {
sourceCompatibility = '1.8'
}

repositories {
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation group: 'io.opentracing', name: 'opentracing-api', version: '0.32.0'
Expand Down
14 changes: 13 additions & 1 deletion dd-smoke-tests/armeria-grpc/application/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
pluginManagement {
repositories {
mavenLocal()
mavenCentral()
if (settings.hasProperty("gradlePluginProxy")) {
maven {
url settings["gradlePluginProxy"]
allowInsecureProtocol true
}
}
if (settings.hasProperty("mavenRepositoryProxy")) {
maven {
url settings["mavenRepositoryProxy"]
allowInsecureProtocol true
}
}
gradlePluginPortal()
mavenCentral()
}
}

Expand Down
8 changes: 0 additions & 8 deletions dd-smoke-tests/datastreams/kafkaschemaregistry/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ plugins {
id 'org.springframework.boot' version '2.6.3'
}

repositories {
mavenCentral()
maven {
url 'https://packages.confluent.io/maven/'
}
maven { url 'https://repo.spring.io/libs-milestone' }
}

apply from: "$rootDir/gradle/java.gradle"
description = 'Kafka Smoke Tests.'

Expand Down
5 changes: 0 additions & 5 deletions dd-smoke-tests/grpc-1.5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ plugins {

apply from: "$rootDir/gradle/java.gradle"

repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}

def grpcVersion = '1.58.0'
def protobufVersion = '3.24.0'
def protocVersion = protobufVersion
Expand Down
14 changes: 13 additions & 1 deletion dd-smoke-tests/kafka-3/application/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
pluginManagement {
repositories {
mavenLocal()
mavenCentral()
if (settings.hasProperty("gradlePluginProxy")) {
maven {
url settings["gradlePluginProxy"]
allowInsecureProtocol true
}
}
if (settings.hasProperty("mavenRepositoryProxy")) {
maven {
url settings["mavenRepositoryProxy"]
allowInsecureProtocol true
}
}
gradlePluginPortal()
mavenCentral()
}
}

Expand Down
8 changes: 7 additions & 1 deletion dd-smoke-tests/play-2.4/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ distributions {
}

repositories {
mavenLocal()
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
maven {
url project.rootProject.property("mavenRepositoryProxy")
allowInsecureProtocol true
}
}
mavenCentral()
gradlePluginPortal()
maven {
name "lightbend-maven-releases"
url "https://repo.lightbend.com/lightbend/maven-release"
Expand Down
8 changes: 7 additions & 1 deletion dd-smoke-tests/play-2.5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ distributions {
}

repositories {
mavenLocal()
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
maven {
url project.rootProject.property("mavenRepositoryProxy")
allowInsecureProtocol true
}
}
mavenCentral()
gradlePluginPortal()
maven {
name "lightbend-maven-releases"
url "https://repo.lightbend.com/lightbend/maven-release"
Expand Down
8 changes: 7 additions & 1 deletion dd-smoke-tests/play-2.6/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ distributions {
}

repositories {
mavenLocal()
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
maven {
url project.rootProject.property("mavenRepositoryProxy")
allowInsecureProtocol true
}
}
mavenCentral()
gradlePluginPortal()
maven {
name "lightbend-maven-releases"
url "https://repo.lightbend.com/lightbend/maven-release"
Expand Down
8 changes: 7 additions & 1 deletion dd-smoke-tests/play-2.7/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ distributions {
}

repositories {
mavenLocal()
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
maven {
url project.rootProject.property("mavenRepositoryProxy")
allowInsecureProtocol true
}
}
mavenCentral()
gradlePluginPortal()
maven {
name "lightbend-maven-releases"
url "https://repo.lightbend.com/lightbend/maven-release"
Expand Down
8 changes: 7 additions & 1 deletion dd-smoke-tests/play-2.8-otel/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ distributions {
}

repositories {
mavenLocal()
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
maven {
url project.rootProject.property("mavenRepositoryProxy")
allowInsecureProtocol true
}
}
mavenCentral()
gradlePluginPortal()
maven {
name "lightbend-maven-releases"
url "https://repo.lightbend.com/lightbend/maven-release"
Expand Down
8 changes: 7 additions & 1 deletion dd-smoke-tests/play-2.8-split-routes/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ distributions {
}

repositories {
mavenLocal()
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
maven {
url project.rootProject.property("mavenRepositoryProxy")
allowInsecureProtocol true
}
}
mavenCentral()
gradlePluginPortal()
maven {
name "lightbend-maven-releases"
url "https://repo.lightbend.com/lightbend/maven-release"
Expand Down
8 changes: 7 additions & 1 deletion dd-smoke-tests/play-2.8/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ distributions {
}

repositories {
mavenLocal()
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
maven {
url project.rootProject.property("mavenRepositoryProxy")
allowInsecureProtocol true
}
}
mavenCentral()
gradlePluginPortal()
maven {
name "lightbend-maven-releases"
url "https://repo.lightbend.com/lightbend/maven-release"
Expand Down
Loading