Skip to content

Commit f020e29

Browse files
Fix more places to use the internal maven proxy (#8592)
* Cleanup repositories {} blocks * update proxy url to use internal routing * no "s" * allow insecure everywhere * include apache with confluence * use gradlePluginCache, mavenCentral after pluginportal * proxy mule as well --------- Co-authored-by: Santiago M. Mola <[email protected]>
1 parent 848f35a commit f020e29

File tree

43 files changed

+308
-102
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+308
-102
lines changed

.gitlab-ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ variables:
2323
DEPENDENCY_CACHE_POLICY: pull
2424
BUILD_CACHE_POLICY: pull
2525
GRADLE_VERSION: "8.4" # must match gradle-wrapper.properties
26-
MAVEN_REPOSITORY_PROXY: "https://artifactual.us1.prod.dog/repository/maven-central/"
26+
MAVEN_REPOSITORY_PROXY: "http://artifactual.artifactual.all-clusters.local-dc.fabric.dog:8081/repository/maven-central/"
27+
GRADLE_PLUGIN_PROXY: "http://artifactual.artifactual.all-clusters.local-dc.fabric.dog:8081/repository/gradle-plugin-portal-proxy/"
2728
JAVA_BUILD_IMAGE_VERSION: "v25.01"
2829
REPO_NOTIFICATION_CHANNEL: "#apm-java-escalations"
2930
PROFILE_TESTS:
@@ -75,7 +76,7 @@ default:
7576
policy: $BUILD_CACHE_POLICY
7677
before_script:
7778
- export GRADLE_USER_HOME=`pwd`/.gradle
78-
- export GRADLE_ARGS=" --build-cache --stacktrace --no-daemon --parallel --max-workers=$GRADLE_WORKERS -PmavenRepositoryProxy=$MAVEN_REPOSITORY_PROXY"
79+
- export GRADLE_ARGS=" --build-cache --stacktrace --no-daemon --parallel --max-workers=$GRADLE_WORKERS -PmavenRepositoryProxy=$MAVEN_REPOSITORY_PROXY -PgradlePluginProxy=$GRADLE_PLUGIN_PROXY"
7980
- *normalize_node_index
8081
# for weird reasons, gradle will always "chmod 700" the .gradle folder
8182
# with Gitlab caching, .gradle is always owned by root and thus gradle's chmod invocation fails

build.gradle

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ description = 'dd-trace-java'
3232

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

35+
apply from: "$rootDir/gradle/repositories.gradle"
3536
apply from: "$rootDir/gradle/scm.gradle"
3637
spotless {
3738
// only resolve the spotless dependencies once in the build
@@ -79,12 +80,6 @@ allprojects {
7980
}
8081
}
8182

82-
repositories {
83-
mavenLocal()
84-
mavenCentral()
85-
gradlePluginPortal()
86-
}
87-
8883
tasks.register("latestDepTest")
8984

9085
nexusPublishing {

buildSrc/build.gradle.kts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ gradlePlugin {
2222
}
2323
}
2424

25-
repositories {
26-
mavenLocal()
27-
mavenCentral()
28-
gradlePluginPortal()
25+
apply {
26+
from("$rootDir/../gradle/repositories.gradle")
2927
}
3028

3129
dependencies {

buildSrc/call-site-instrumentation-plugin/build.gradle.kts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ spotless {
2424
}
2525
}
2626

27-
repositories {
28-
mavenLocal()
29-
mavenCentral()
30-
gradlePluginPortal()
27+
apply {
28+
from("$rootDir/../gradle/repositories.gradle")
3129
}
3230

3331
dependencies {

dd-java-agent/agent-ci-visibility/build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
buildscript {
22
repositories {
3+
mavenLocal()
4+
if (project.rootProject.hasProperty("gradlePluginProxy")) {
5+
maven {
6+
url project.rootProject.property("gradlePluginProxy")
7+
allowInsecureProtocol true
8+
}
9+
}
10+
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
11+
maven {
12+
url project.rootProject.property("mavenRepositoryProxy")
13+
allowInsecureProtocol true
14+
}
15+
}
16+
gradlePluginPortal()
317
mavenCentral()
418
}
519

dd-java-agent/benchmark-integration/build.gradle

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
buildscript {
22
repositories {
3-
mavenCentral()
3+
mavenLocal()
4+
if (project.rootProject.hasProperty("gradlePluginProxy")) {
5+
maven {
6+
url project.rootProject.property("gradlePluginProxy")
7+
allowInsecureProtocol true
8+
}
9+
}
10+
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
11+
maven {
12+
url project.rootProject.property("mavenRepositoryProxy")
13+
allowInsecureProtocol true
14+
}
15+
}
416
gradlePluginPortal()
17+
mavenCentral()
518
}
619
dependencies {
720
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'

dd-java-agent/benchmark-integration/play-perftest/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,14 @@ dependencies {
2626
}
2727

2828
repositories {
29+
mavenLocal()
30+
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
31+
maven {
32+
url project.rootProject.property("mavenRepositoryProxy")
33+
allowInsecureProtocol true
34+
}
35+
}
2936
mavenCentral()
30-
gradlePluginPortal()
3137
maven {
3238
name "lightbend-maven-releases"
3339
url "https://repo.lightbend.com/lightbend/maven-release"

dd-java-agent/instrumentation/build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22
buildscript {
33

44
repositories {
5+
mavenLocal()
6+
if (project.rootProject.hasProperty("gradlePluginProxy")) {
7+
maven {
8+
url project.rootProject.property("gradlePluginProxy")
9+
allowInsecureProtocol true
10+
}
11+
}
12+
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
13+
maven {
14+
url project.rootProject.property("mavenRepositoryProxy")
15+
allowInsecureProtocol true
16+
}
17+
}
18+
gradlePluginPortal()
519
mavenCentral()
620
}
721

dd-java-agent/instrumentation/datanucleus-4/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ import org.datanucleus.enhancer.DataNucleusEnhancer
22

33
buildscript {
44
repositories {
5+
mavenLocal()
6+
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
7+
maven {
8+
url project.rootProject.property("mavenRepositoryProxy")
9+
allowInsecureProtocol true
10+
}
11+
}
512
mavenCentral()
613
}
714

dd-java-agent/instrumentation/mule-4/application/pom.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,26 @@
9999
</snapshots>
100100
</pluginRepository>
101101
</pluginRepositories>
102+
<profiles>
103+
<profile>
104+
<id>maven-proxy-profile</id>
105+
<activation>
106+
<property>
107+
<name>env.MAVEN_REPOSITORY_PROXY</name>
108+
</property>
109+
</activation>
110+
<repositories>
111+
<repository>
112+
<id>maven-proxy-repo</id>
113+
<url>${env.MAVEN_REPOSITORY_PROXY}</url>
114+
</repository>
115+
</repositories>
116+
<pluginRepositories>
117+
<pluginRepository>
118+
<id>maven-plugin-proxy</id>
119+
<url>${env.MAVEN_REPOSITORY_PROXY}</url>
120+
</pluginRepository>
121+
</pluginRepositories>
122+
</profile>
123+
</profiles>
102124
</project>

0 commit comments

Comments
 (0)