diff --git a/build.sh b/build.sh index 141c104357..98a0d30e1d 100755 --- a/build.sh +++ b/build.sh @@ -505,7 +505,10 @@ if hasArg java; then bash "${REPODIR}"/java/cuopt/scripts/build_native.sh source "${REPODIR}"/java/cuopt/scripts/maven.sh cuopt_maven_args - cuopt_mvn -f "${REPODIR}"/java/cuopt/pom.xml clean package \ + # cd into java/cuopt so Maven's directory-search picks up java/cuopt/.mvn/maven.config -- + # it walks up from the current working directory, not from -f's directory. + cd "${REPODIR}"/java/cuopt + cuopt_mvn -f pom.xml clean package \ -DskipTests \ -Dcuopt.native.dir="${CUOPT_JAVA_NATIVE_BUILD_DIR}" fi diff --git a/java/cuopt/.mvn/maven.config b/java/cuopt/.mvn/maven.config new file mode 100644 index 0000000000..fb1e5b65cf --- /dev/null +++ b/java/cuopt/.mvn/maven.config @@ -0,0 +1,8 @@ +-e +-B +-Daether.connector.basic.downstreamThreads=1 +-Daether.connector.http.retryHandler.count=8 +-Daether.connector.http.retryHandler.interval=5000 +-Daether.connector.http.retryHandler.intervalMax=60000 +-Daether.connector.http.retryHandler.serviceUnavailable=429,503 +-Dmaven.wagon.http.retryHandler.count=5 diff --git a/java/cuopt/pom.xml b/java/cuopt/pom.xml index 019cc08433..d214cf603c 100644 --- a/java/cuopt/pom.xml +++ b/java/cuopt/pom.xml @@ -45,6 +45,63 @@ SPDX-License-Identifier: Apache-2.0 5.11.4 + + + + gcs-maven-central-mirror + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + + true + + + false + + + + central + Maven Central + https://repo.maven.apache.org/maven2 + + true + + + false + + + + + + + gcs-maven-central-mirror + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + + true + + + false + + + + central + Maven Plugin Repository + https://repo.maven.apache.org/maven2 + + true + + + false + + + + org.junit.jupiter @@ -109,38 +166,6 @@ SPDX-License-Identifier: Apache-2.0 - - - org.apache.maven.plugins - maven-source-plugin - 3.3.1 - - - attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.11.2 - - - none - - - - attach-javadocs - - jar - - - - org.apache.maven.plugins maven-surefire-plugin @@ -154,4 +179,54 @@ SPDX-License-Identifier: Apache-2.0 + + + + + attach-source-javadoc + + + + org.apache.maven.plugins + maven-source-plugin + 3.3.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.11.2 + + + none + + + + attach-javadocs + + jar + + + + + + + +