From 4382f4069504c84fc3429ace414931d67c66ced6 Mon Sep 17 00:00:00 2001 From: Mario Campos Date: Tue, 23 Jun 2026 21:04:05 +0000 Subject: [PATCH] Use Maven Central mirror in Java Maven integration tests --- .../settings.xml | 10 +++++++ .../buildless-inherit-trust-store/test.py | 1 + .../buildless-fetches.expected | 4 +-- .../settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../buildless-maven-executable-war/test.py | 3 +++ .../buildless-fetches.expected | 4 +-- .../maven-fetches.expected | 27 +++++++++---------- .../pom.xml | 26 ++++++++++++++++++ .../maven-fetches.expected | 21 +++++++-------- .../java/buildless-maven-mirrorof/pom.xml | 26 ++++++++++++++++++ .../buildless-fetches.expected | 6 ++--- .../buildless-maven-multimodule/settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../java/buildless-maven-multimodule/test.py | 3 +++ .../java/buildless-maven-timeout/settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../java/buildless-maven-timeout/test.py | 7 ++++- .../settings.xml | 10 +++++++ .../test.py | 5 ++++ .../buildless-fetches.expected | 4 +-- .../buildless-maven/maven-fetches.expected | 27 +++++++++---------- .../java/buildless-maven/pom.xml | 26 ++++++++++++++++++ .../buildless-fetches.expected | 4 +-- .../java/buildless-proxy-maven/settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../java/buildless-proxy-maven/test.py | 3 +++ .../settings.xml | 10 +++++++ .../buildless-snapshot-repository/test.py | 6 ++++- .../settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../maven-add-exports-module-flags/test.py | 9 ++++++- .../java/maven-download-failure/settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../java/maven-download-failure/test.py | 1 + .../settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../maven-enforcer-multiple-versions/test.py | 8 +++++- .../settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../maven-enforcer-single-version/test.py | 8 +++++- .../java/maven-enforcer/settings.xml | 10 +++++++ .../maven-enforcer/source_archive.expected | 1 + .../java/maven-enforcer/test.py | 8 +++++- .../settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../test.py | 9 ++++++- .../maven-java16-with-higher-jdk/settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../java/maven-java16-with-higher-jdk/test.py | 9 ++++++- .../settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../maven-java8-java11-dependency/test.py | 9 ++++++- .../settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../maven-sample-extract-properties/test.py | 8 +++++- .../maven-sample-large-xml-files/settings.xml | 10 +++++++ .../java/maven-sample-large-xml-files/test.py | 8 +++++- .../maven-sample-small-xml-files/settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../java/maven-sample-small-xml-files/test.py | 8 +++++- .../settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../test.py | 9 ++++++- .../maven-sample-xml-mode-all/settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../java/maven-sample-xml-mode-all/test.py | 9 ++++++- .../maven-sample-xml-mode-byname/settings.xml | 10 +++++++ .../java/maven-sample-xml-mode-byname/test.py | 9 ++++++- .../settings.xml | 10 +++++++ .../maven-sample-xml-mode-disabled/test.py | 9 ++++++- .../maven-sample-xml-mode-smart/settings.xml | 10 +++++++ .../java/maven-sample-xml-mode-smart/test.py | 9 ++++++- .../java/maven-sample/settings.xml | 10 +++++++ .../java/maven-sample/source_archive.expected | 1 + .../java/maven-sample/test.py | 8 +++++- .../settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../maven-wrapper-missing-properties/test.py | 9 ++++++- .../maven-wrapper-script-only/settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../java/maven-wrapper-script-only/test.py | 8 +++++- .../maven-wrapper-source-only/settings.xml | 10 +++++++ .../source_archive.expected | 1 + .../java/maven-wrapper-source-only/test.py | 8 +++++- .../java/maven-wrapper/settings.xml | 10 +++++++ .../maven-wrapper/source_archive.expected | 1 + .../java/maven-wrapper/test.py | 8 +++++- 90 files changed, 614 insertions(+), 72 deletions(-) create mode 100644 java/ql/integration-tests/java/buildless-inherit-trust-store/settings.xml create mode 100644 java/ql/integration-tests/java/buildless-maven-executable-war/settings.xml create mode 100644 java/ql/integration-tests/java/buildless-maven-multimodule/settings.xml create mode 100644 java/ql/integration-tests/java/buildless-maven-timeout/settings.xml create mode 100644 java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/settings.xml create mode 100644 java/ql/integration-tests/java/buildless-proxy-maven/settings.xml create mode 100644 java/ql/integration-tests/java/buildless-snapshot-repository/settings.xml create mode 100644 java/ql/integration-tests/java/maven-add-exports-module-flags/settings.xml create mode 100644 java/ql/integration-tests/java/maven-download-failure/settings.xml create mode 100644 java/ql/integration-tests/java/maven-enforcer-multiple-versions/settings.xml create mode 100644 java/ql/integration-tests/java/maven-enforcer-single-version/settings.xml create mode 100644 java/ql/integration-tests/java/maven-enforcer/settings.xml create mode 100644 java/ql/integration-tests/java/maven-execution-specific-java-version/settings.xml create mode 100644 java/ql/integration-tests/java/maven-java16-with-higher-jdk/settings.xml create mode 100644 java/ql/integration-tests/java/maven-java8-java11-dependency/settings.xml create mode 100644 java/ql/integration-tests/java/maven-multimodule-test-java-version/settings.xml create mode 100644 java/ql/integration-tests/java/maven-sample-extract-properties/settings.xml create mode 100644 java/ql/integration-tests/java/maven-sample-large-xml-files/settings.xml create mode 100644 java/ql/integration-tests/java/maven-sample-small-xml-files/settings.xml create mode 100644 java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/settings.xml create mode 100644 java/ql/integration-tests/java/maven-sample-xml-mode-all/settings.xml create mode 100644 java/ql/integration-tests/java/maven-sample-xml-mode-byname/settings.xml create mode 100644 java/ql/integration-tests/java/maven-sample-xml-mode-disabled/settings.xml create mode 100644 java/ql/integration-tests/java/maven-sample-xml-mode-smart/settings.xml create mode 100644 java/ql/integration-tests/java/maven-sample/settings.xml create mode 100644 java/ql/integration-tests/java/maven-wrapper-missing-properties/settings.xml create mode 100644 java/ql/integration-tests/java/maven-wrapper-script-only/settings.xml create mode 100644 java/ql/integration-tests/java/maven-wrapper-source-only/settings.xml create mode 100644 java/ql/integration-tests/java/maven-wrapper/settings.xml diff --git a/java/ql/integration-tests/java/buildless-inherit-trust-store/settings.xml b/java/ql/integration-tests/java/buildless-inherit-trust-store/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/buildless-inherit-trust-store/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/buildless-inherit-trust-store/test.py b/java/ql/integration-tests/java/buildless-inherit-trust-store/test.py index 06855e43ba2..3839df9cedc 100644 --- a/java/ql/integration-tests/java/buildless-inherit-trust-store/test.py +++ b/java/ql/integration-tests/java/buildless-inherit-trust-store/test.py @@ -21,6 +21,7 @@ def test(codeql, java, cwd, check_diagnostics_java): _env={ "MAVEN_OPTS": maven_opts, "CODEQL_JAVA_EXTRACTOR_TRUST_STORE_PATH": str(certspath), + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), }, ) finally: diff --git a/java/ql/integration-tests/java/buildless-maven-executable-war/buildless-fetches.expected b/java/ql/integration-tests/java/buildless-maven-executable-war/buildless-fetches.expected index a956477896c..e2c63e182c4 100644 --- a/java/ql/integration-tests/java/buildless-maven-executable-war/buildless-fetches.expected +++ b/java/ql/integration-tests/java/buildless-maven-executable-war/buildless-fetches.expected @@ -1,3 +1,5 @@ +https://maven-central.storage-download.googleapis.com/maven2/junit/junit/4.11/junit-4.11.jar +https://maven-central.storage-download.googleapis.com/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar https://repo.jenkins-ci.org/releases/org/jenkins-ci/main/jenkins-war/2.249/jenkins-war-2.249.war https://repo.maven.apache.org/maven2/com/feiniaojin/naaf/naaf-graceful-response-example/1.0/naaf-graceful-response-example-1.0.jar https://repo.maven.apache.org/maven2/com/github/MoebiusSolutions/avro-registry-in-source/avro-registry-in-source-tests/1.8/avro-registry-in-source-tests-1.8.jar @@ -10,9 +12,7 @@ https://repo.maven.apache.org/maven2/de/knutwalker/rx-redis-example_2.11/0.1.2/r https://repo.maven.apache.org/maven2/de/knutwalker/rx-redis-java-example_2.11/0.1.2/rx-redis-java-example_2.11-0.1.2.jar https://repo.maven.apache.org/maven2/io/github/scrollsyou/example-spring-boot-starter/1.0.0/example-spring-boot-starter-1.0.0.jar https://repo.maven.apache.org/maven2/io/streamnative/com/example/maven-central-template/server/3.0.0/server-3.0.0.jar -https://repo.maven.apache.org/maven2/junit/junit/4.11/junit-4.11.jar https://repo.maven.apache.org/maven2/no/nav/security/token-validation-ktor-demo/3.1.0/token-validation-ktor-demo-3.1.0.jar -https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar https://repo.maven.apache.org/maven2/org/minijax/minijax-example-fileupload/0.5.10/minijax-example-fileupload-0.5.10.jar https://repo.maven.apache.org/maven2/org/minijax/minijax-example-inject/0.5.10/minijax-example-inject-0.5.10.jar https://repo.maven.apache.org/maven2/org/minijax/minijax-example-json/0.5.10/minijax-example-json-0.5.10.jar diff --git a/java/ql/integration-tests/java/buildless-maven-executable-war/settings.xml b/java/ql/integration-tests/java/buildless-maven-executable-war/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/buildless-maven-executable-war/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/buildless-maven-executable-war/source_archive.expected b/java/ql/integration-tests/java/buildless-maven-executable-war/source_archive.expected index 0a86ff54645..ac35d94be39 100644 --- a/java/ql/integration-tests/java/buildless-maven-executable-war/source_archive.expected +++ b/java/ql/integration-tests/java/buildless-maven-executable-war/source_archive.expected @@ -1,4 +1,5 @@ pom.xml +settings.xml src/main/java/com/example/App.java src/main/resources/my-app.properties src/main/resources/page.xml diff --git a/java/ql/integration-tests/java/buildless-maven-executable-war/test.py b/java/ql/integration-tests/java/buildless-maven-executable-war/test.py index 2a839a0c294..04ce2aac710 100644 --- a/java/ql/integration-tests/java/buildless-maven-executable-war/test.py +++ b/java/ql/integration-tests/java/buildless-maven-executable-war/test.py @@ -1,7 +1,10 @@ +import os + def test(codeql, java, check_diagnostics_java): codeql.database.create( _env={ "CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS": "true", "CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS_CLASSPATH_FROM_BUILD_FILES": "true", + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), } ) diff --git a/java/ql/integration-tests/java/buildless-maven-existing-settings-xml/buildless-fetches.expected b/java/ql/integration-tests/java/buildless-maven-existing-settings-xml/buildless-fetches.expected index 49120865e8d..a4bfbc7a97b 100644 --- a/java/ql/integration-tests/java/buildless-maven-existing-settings-xml/buildless-fetches.expected +++ b/java/ql/integration-tests/java/buildless-maven-existing-settings-xml/buildless-fetches.expected @@ -1,3 +1,5 @@ +https://maven-central.storage-download.googleapis.com/maven2/junit/junit/4.11/junit-4.11.jar +https://maven-central.storage-download.googleapis.com/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar https://repo.maven.apache.org/maven2/com/feiniaojin/naaf/naaf-graceful-response-example/1.0/naaf-graceful-response-example-1.0.jar https://repo.maven.apache.org/maven2/com/github/MoebiusSolutions/avro-registry-in-source/avro-registry-in-source-tests/1.8/avro-registry-in-source-tests-1.8.jar https://repo.maven.apache.org/maven2/com/github/MoebiusSolutions/avro-registry-in-source/example-project/1.5/example-project-1.5.jar @@ -9,9 +11,7 @@ https://repo.maven.apache.org/maven2/de/knutwalker/rx-redis-example_2.11/0.1.2/r https://repo.maven.apache.org/maven2/de/knutwalker/rx-redis-java-example_2.11/0.1.2/rx-redis-java-example_2.11-0.1.2.jar https://repo.maven.apache.org/maven2/io/github/scrollsyou/example-spring-boot-starter/1.0.0/example-spring-boot-starter-1.0.0.jar https://repo.maven.apache.org/maven2/io/streamnative/com/example/maven-central-template/server/3.0.0/server-3.0.0.jar -https://repo.maven.apache.org/maven2/junit/junit/4.11/junit-4.11.jar https://repo.maven.apache.org/maven2/no/nav/security/token-validation-ktor-demo/3.1.0/token-validation-ktor-demo-3.1.0.jar -https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar https://repo.maven.apache.org/maven2/org/minijax/minijax-example-fileupload/0.5.10/minijax-example-fileupload-0.5.10.jar https://repo.maven.apache.org/maven2/org/minijax/minijax-example-inject/0.5.10/minijax-example-inject-0.5.10.jar https://repo.maven.apache.org/maven2/org/minijax/minijax-example-json/0.5.10/minijax-example-json-0.5.10.jar diff --git a/java/ql/integration-tests/java/buildless-maven-existing-settings-xml/maven-fetches.expected b/java/ql/integration-tests/java/buildless-maven-existing-settings-xml/maven-fetches.expected index 5af03b6d47c..98b54c0eb27 100644 --- a/java/ql/integration-tests/java/buildless-maven-existing-settings-xml/maven-fetches.expected +++ b/java/ql/integration-tests/java/buildless-maven-existing-settings-xml/maven-fetches.expected @@ -1,6 +1,6 @@ -Downloaded from central: https://repo.maven.apache.org/maven2/junit/junit/4.11/junit-4.11.pom -Downloaded from central: https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom -Downloaded from central: https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-parent/1.3/hamcrest-parent-1.3.pom +Downloaded from central: https://maven-central.storage-download.googleapis.com/maven2/junit/junit/4.11/junit-4.11.pom +Downloaded from central: https://maven-central.storage-download.googleapis.com/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom +Downloaded from central: https://maven-central.storage-download.googleapis.com/maven2/org/hamcrest/hamcrest-parent/1.3/hamcrest-parent-1.3.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/fasterxml/jackson/core/jackson-annotations/2.18.6/jackson-annotations-2.18.6.jar Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/fasterxml/jackson/core/jackson-annotations/2.18.6/jackson-annotations-2.18.6.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/fasterxml/jackson/core/jackson-core/2.18.6/jackson-core-2.18.6.jar @@ -11,8 +11,8 @@ Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferst Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/fasterxml/jackson/jackson-bom/2.18.6/jackson-bom-2.18.6.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/fasterxml/jackson/jackson-parent/2.18.4/jackson-parent-2.18.4.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/fasterxml/oss-parent/69/oss-parent-69.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/github/ferstl/depgraph-maven-plugin/4.0.3-CodeQL-3/depgraph-maven-plugin-4.0.3-CodeQL-3.jar -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/github/ferstl/depgraph-maven-plugin/4.0.3-CodeQL-3/depgraph-maven-plugin-4.0.3-CodeQL-3.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/github/ferstl/depgraph-maven-plugin/4.0.3-CodeQL-2/depgraph-maven-plugin-4.0.3-CodeQL-2.jar +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/github/ferstl/depgraph-maven-plugin/4.0.3-CodeQL-2/depgraph-maven-plugin-4.0.3-CodeQL-2.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/google/errorprone/error_prone_annotations/2.36.0/error_prone_annotations-2.36.0.jar @@ -31,12 +31,12 @@ Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferst Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/net/java/jvnet-parent/3/jvnet-parent-3.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/apache/19/apache-19.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/apache/25/apache-25.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/apache/27/apache-27.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/apache/35/apache-35.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-lang3/3.18.0/commons-lang3-3.18.0.jar -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-lang3/3.18.0/commons-lang3-3.18.0.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-parent/85/commons-parent-85.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-parent/47/commons-parent-47.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/maven/maven-artifact/3.8.6/maven-artifact-3.8.6.jar Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/maven/maven-artifact/3.8.6/maven-artifact-3.8.6.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/maven/maven-model/3.8.6/maven-model-3.8.6.jar @@ -57,11 +57,12 @@ Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferst Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-containers/1.5.5/plexus-containers-1.5.5.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-utils/3.6.1/plexus-utils-3.6.1.jar -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-utils/3.6.1/plexus-utils-3.6.1.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-utils/3.0.24/plexus-utils-3.0.24.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-utils/3.3.1/plexus-utils-3.3.1.jar +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-utils/3.3.1/plexus-utils-3.3.1.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus/2.0.7/plexus-2.0.7.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus/25/plexus-25.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus/3.3.1/plexus-3.3.1.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus/4.0/plexus-4.0.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus/5.1/plexus-5.1.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.5/org.eclipse.sisu.inject-0.3.5.jar Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.5/org.eclipse.sisu.inject-0.3.5.pom @@ -69,8 +70,6 @@ Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferst Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/eclipse/sisu/org.eclipse.sisu.plexus/0.3.5/org.eclipse.sisu.plexus-0.3.5.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/eclipse/sisu/sisu-inject/0.3.5/sisu-inject-0.3.5.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/eclipse/sisu/sisu-plexus/0.3.5/sisu-plexus-0.3.5.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/junit/junit-bom/5.13.1/junit-bom-5.13.1.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/junit/junit-bom/5.14.1/junit-bom-5.14.1.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/junit/junit-bom/5.9.1/junit-bom-5.9.1.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/sonatype/forge/forge-parent/10/forge-parent-10.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/sonatype/oss/oss-parent/7/oss-parent-7.pom diff --git a/java/ql/integration-tests/java/buildless-maven-existing-settings-xml/pom.xml b/java/ql/integration-tests/java/buildless-maven-existing-settings-xml/pom.xml index ec4aaf128c1..debe59e6c03 100644 --- a/java/ql/integration-tests/java/buildless-maven-existing-settings-xml/pom.xml +++ b/java/ql/integration-tests/java/buildless-maven-existing-settings-xml/pom.xml @@ -111,4 +111,30 @@ + + + + + central + https://maven-central.storage-download.googleapis.com/maven2/ + + true + + + true + + + + + + central + https://maven-central.storage-download.googleapis.com/maven2/ + + true + + + true + + + \ No newline at end of file diff --git a/java/ql/integration-tests/java/buildless-maven-mirrorof/maven-fetches.expected b/java/ql/integration-tests/java/buildless-maven-mirrorof/maven-fetches.expected index bea767cb549..cffdda2891e 100644 --- a/java/ql/integration-tests/java/buildless-maven-mirrorof/maven-fetches.expected +++ b/java/ql/integration-tests/java/buildless-maven-mirrorof/maven-fetches.expected @@ -8,8 +8,8 @@ Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferst Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/fasterxml/jackson/jackson-bom/2.18.6/jackson-bom-2.18.6.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/fasterxml/jackson/jackson-parent/2.18.4/jackson-parent-2.18.4.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/fasterxml/oss-parent/69/oss-parent-69.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/github/ferstl/depgraph-maven-plugin/4.0.3-CodeQL-3/depgraph-maven-plugin-4.0.3-CodeQL-3.jar -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/github/ferstl/depgraph-maven-plugin/4.0.3-CodeQL-3/depgraph-maven-plugin-4.0.3-CodeQL-3.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/github/ferstl/depgraph-maven-plugin/4.0.3-CodeQL-2/depgraph-maven-plugin-4.0.3-CodeQL-2.jar +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/github/ferstl/depgraph-maven-plugin/4.0.3-CodeQL-2/depgraph-maven-plugin-4.0.3-CodeQL-2.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/google/errorprone/error_prone_annotations/2.36.0/error_prone_annotations-2.36.0.jar @@ -28,12 +28,12 @@ Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferst Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/net/java/jvnet-parent/3/jvnet-parent-3.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/apache/19/apache-19.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/apache/25/apache-25.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/apache/27/apache-27.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/apache/35/apache-35.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-lang3/3.18.0/commons-lang3-3.18.0.jar -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-lang3/3.18.0/commons-lang3-3.18.0.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-parent/85/commons-parent-85.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-parent/47/commons-parent-47.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/maven/maven-artifact/3.8.6/maven-artifact-3.8.6.jar Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/maven/maven-artifact/3.8.6/maven-artifact-3.8.6.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/maven/maven-model/3.8.6/maven-model-3.8.6.jar @@ -54,11 +54,12 @@ Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferst Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-containers/1.5.5/plexus-containers-1.5.5.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-utils/3.6.1/plexus-utils-3.6.1.jar -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-utils/3.6.1/plexus-utils-3.6.1.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-utils/3.0.24/plexus-utils-3.0.24.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-utils/3.3.1/plexus-utils-3.3.1.jar +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-utils/3.3.1/plexus-utils-3.3.1.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus/2.0.7/plexus-2.0.7.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus/25/plexus-25.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus/3.3.1/plexus-3.3.1.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus/4.0/plexus-4.0.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus/5.1/plexus-5.1.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.5/org.eclipse.sisu.inject-0.3.5.jar Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.5/org.eclipse.sisu.inject-0.3.5.pom @@ -66,8 +67,6 @@ Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferst Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/eclipse/sisu/org.eclipse.sisu.plexus/0.3.5/org.eclipse.sisu.plexus-0.3.5.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/eclipse/sisu/sisu-inject/0.3.5/sisu-inject-0.3.5.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/eclipse/sisu/sisu-plexus/0.3.5/sisu-plexus-0.3.5.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/junit/junit-bom/5.13.1/junit-bom-5.13.1.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/junit/junit-bom/5.14.1/junit-bom-5.14.1.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/junit/junit-bom/5.9.1/junit-bom-5.9.1.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/sonatype/forge/forge-parent/10/forge-parent-10.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/sonatype/oss/oss-parent/7/oss-parent-7.pom diff --git a/java/ql/integration-tests/java/buildless-maven-mirrorof/pom.xml b/java/ql/integration-tests/java/buildless-maven-mirrorof/pom.xml index ec4aaf128c1..debe59e6c03 100644 --- a/java/ql/integration-tests/java/buildless-maven-mirrorof/pom.xml +++ b/java/ql/integration-tests/java/buildless-maven-mirrorof/pom.xml @@ -111,4 +111,30 @@ + + + + + central + https://maven-central.storage-download.googleapis.com/maven2/ + + true + + + true + + + + + + central + https://maven-central.storage-download.googleapis.com/maven2/ + + true + + + true + + + \ No newline at end of file diff --git a/java/ql/integration-tests/java/buildless-maven-multimodule/buildless-fetches.expected b/java/ql/integration-tests/java/buildless-maven-multimodule/buildless-fetches.expected index e4a95afc713..a005078e06e 100644 --- a/java/ql/integration-tests/java/buildless-maven-multimodule/buildless-fetches.expected +++ b/java/ql/integration-tests/java/buildless-maven-multimodule/buildless-fetches.expected @@ -1,3 +1,6 @@ +https://maven-central.storage-download.googleapis.com/maven2/junit/junit/4.11/junit-4.11.jar +https://maven-central.storage-download.googleapis.com/maven2/org/apache/commons/commons-lang3/3.14.0/commons-lang3-3.14.0.jar +https://maven-central.storage-download.googleapis.com/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar https://repo.maven.apache.org/maven2/com/feiniaojin/naaf/naaf-graceful-response-example/1.0/naaf-graceful-response-example-1.0.jar https://repo.maven.apache.org/maven2/com/github/MoebiusSolutions/avro-registry-in-source/avro-registry-in-source-tests/1.8/avro-registry-in-source-tests-1.8.jar https://repo.maven.apache.org/maven2/com/github/MoebiusSolutions/avro-registry-in-source/example-project/1.5/example-project-1.5.jar @@ -9,10 +12,7 @@ https://repo.maven.apache.org/maven2/de/knutwalker/rx-redis-example_2.11/0.1.2/r https://repo.maven.apache.org/maven2/de/knutwalker/rx-redis-java-example_2.11/0.1.2/rx-redis-java-example_2.11-0.1.2.jar https://repo.maven.apache.org/maven2/io/github/scrollsyou/example-spring-boot-starter/1.0.0/example-spring-boot-starter-1.0.0.jar https://repo.maven.apache.org/maven2/io/streamnative/com/example/maven-central-template/server/3.0.0/server-3.0.0.jar -https://repo.maven.apache.org/maven2/junit/junit/4.11/junit-4.11.jar https://repo.maven.apache.org/maven2/no/nav/security/token-validation-ktor-demo/3.1.0/token-validation-ktor-demo-3.1.0.jar -https://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.14.0/commons-lang3-3.14.0.jar -https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar https://repo.maven.apache.org/maven2/org/minijax/minijax-example-fileupload/0.5.10/minijax-example-fileupload-0.5.10.jar https://repo.maven.apache.org/maven2/org/minijax/minijax-example-inject/0.5.10/minijax-example-inject-0.5.10.jar https://repo.maven.apache.org/maven2/org/minijax/minijax-example-json/0.5.10/minijax-example-json-0.5.10.jar diff --git a/java/ql/integration-tests/java/buildless-maven-multimodule/settings.xml b/java/ql/integration-tests/java/buildless-maven-multimodule/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/buildless-maven-multimodule/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/buildless-maven-multimodule/source_archive.expected b/java/ql/integration-tests/java/buildless-maven-multimodule/source_archive.expected index 1e19d984019..db2c37d5ccd 100644 --- a/java/ql/integration-tests/java/buildless-maven-multimodule/source_archive.expected +++ b/java/ql/integration-tests/java/buildless-maven-multimodule/source_archive.expected @@ -1,4 +1,5 @@ pom.xml +settings.xml submod1/pom.xml submod1/src/main/java/com/example/App.java submod1/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/java/buildless-maven-multimodule/test.py b/java/ql/integration-tests/java/buildless-maven-multimodule/test.py index 2a839a0c294..04ce2aac710 100644 --- a/java/ql/integration-tests/java/buildless-maven-multimodule/test.py +++ b/java/ql/integration-tests/java/buildless-maven-multimodule/test.py @@ -1,7 +1,10 @@ +import os + def test(codeql, java, check_diagnostics_java): codeql.database.create( _env={ "CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS": "true", "CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS_CLASSPATH_FROM_BUILD_FILES": "true", + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), } ) diff --git a/java/ql/integration-tests/java/buildless-maven-timeout/settings.xml b/java/ql/integration-tests/java/buildless-maven-timeout/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/buildless-maven-timeout/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/buildless-maven-timeout/source_archive.expected b/java/ql/integration-tests/java/buildless-maven-timeout/source_archive.expected index 0f7ecaa2630..38a7383604a 100644 --- a/java/ql/integration-tests/java/buildless-maven-timeout/source_archive.expected +++ b/java/ql/integration-tests/java/buildless-maven-timeout/source_archive.expected @@ -1,5 +1,6 @@ .mvn/wrapper/maven-wrapper.properties pom.xml +settings.xml src/main/java/com/example/App.java src/main/resources/my-app.properties src/main/resources/page.xml diff --git a/java/ql/integration-tests/java/buildless-maven-timeout/test.py b/java/ql/integration-tests/java/buildless-maven-timeout/test.py index 7bf7e25357f..2e409457c54 100644 --- a/java/ql/integration-tests/java/buildless-maven-timeout/test.py +++ b/java/ql/integration-tests/java/buildless-maven-timeout/test.py @@ -1,6 +1,11 @@ +import os + def test(codeql, java, check_diagnostics_java): # mvnw has been rigged to stall for a long time by trying to fetch from a black-hole IP. We should find the timeout logic fires and buildless aborts the Maven run quickly. codeql.database.create( build_mode="none", - _env={"CODEQL_EXTRACTOR_JAVA_BUILDLESS_CHILD_PROCESS_IDLE_TIMEOUT": "5"}, + _env={ + "CODEQL_EXTRACTOR_JAVA_BUILDLESS_CHILD_PROCESS_IDLE_TIMEOUT": "5", + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + }, ) diff --git a/java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/settings.xml b/java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/test.py b/java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/test.py index 3a08acad55f..1d2b6c06b3f 100644 --- a/java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/test.py +++ b/java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/test.py @@ -1,4 +1,9 @@ +import os + def test(codeql, java, check_diagnostics_java): codeql.database.create( build_mode="none", + _env={ + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + } ) diff --git a/java/ql/integration-tests/java/buildless-maven/buildless-fetches.expected b/java/ql/integration-tests/java/buildless-maven/buildless-fetches.expected index 49120865e8d..a4bfbc7a97b 100644 --- a/java/ql/integration-tests/java/buildless-maven/buildless-fetches.expected +++ b/java/ql/integration-tests/java/buildless-maven/buildless-fetches.expected @@ -1,3 +1,5 @@ +https://maven-central.storage-download.googleapis.com/maven2/junit/junit/4.11/junit-4.11.jar +https://maven-central.storage-download.googleapis.com/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar https://repo.maven.apache.org/maven2/com/feiniaojin/naaf/naaf-graceful-response-example/1.0/naaf-graceful-response-example-1.0.jar https://repo.maven.apache.org/maven2/com/github/MoebiusSolutions/avro-registry-in-source/avro-registry-in-source-tests/1.8/avro-registry-in-source-tests-1.8.jar https://repo.maven.apache.org/maven2/com/github/MoebiusSolutions/avro-registry-in-source/example-project/1.5/example-project-1.5.jar @@ -9,9 +11,7 @@ https://repo.maven.apache.org/maven2/de/knutwalker/rx-redis-example_2.11/0.1.2/r https://repo.maven.apache.org/maven2/de/knutwalker/rx-redis-java-example_2.11/0.1.2/rx-redis-java-example_2.11-0.1.2.jar https://repo.maven.apache.org/maven2/io/github/scrollsyou/example-spring-boot-starter/1.0.0/example-spring-boot-starter-1.0.0.jar https://repo.maven.apache.org/maven2/io/streamnative/com/example/maven-central-template/server/3.0.0/server-3.0.0.jar -https://repo.maven.apache.org/maven2/junit/junit/4.11/junit-4.11.jar https://repo.maven.apache.org/maven2/no/nav/security/token-validation-ktor-demo/3.1.0/token-validation-ktor-demo-3.1.0.jar -https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar https://repo.maven.apache.org/maven2/org/minijax/minijax-example-fileupload/0.5.10/minijax-example-fileupload-0.5.10.jar https://repo.maven.apache.org/maven2/org/minijax/minijax-example-inject/0.5.10/minijax-example-inject-0.5.10.jar https://repo.maven.apache.org/maven2/org/minijax/minijax-example-json/0.5.10/minijax-example-json-0.5.10.jar diff --git a/java/ql/integration-tests/java/buildless-maven/maven-fetches.expected b/java/ql/integration-tests/java/buildless-maven/maven-fetches.expected index 5af03b6d47c..98b54c0eb27 100644 --- a/java/ql/integration-tests/java/buildless-maven/maven-fetches.expected +++ b/java/ql/integration-tests/java/buildless-maven/maven-fetches.expected @@ -1,6 +1,6 @@ -Downloaded from central: https://repo.maven.apache.org/maven2/junit/junit/4.11/junit-4.11.pom -Downloaded from central: https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom -Downloaded from central: https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-parent/1.3/hamcrest-parent-1.3.pom +Downloaded from central: https://maven-central.storage-download.googleapis.com/maven2/junit/junit/4.11/junit-4.11.pom +Downloaded from central: https://maven-central.storage-download.googleapis.com/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom +Downloaded from central: https://maven-central.storage-download.googleapis.com/maven2/org/hamcrest/hamcrest-parent/1.3/hamcrest-parent-1.3.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/fasterxml/jackson/core/jackson-annotations/2.18.6/jackson-annotations-2.18.6.jar Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/fasterxml/jackson/core/jackson-annotations/2.18.6/jackson-annotations-2.18.6.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/fasterxml/jackson/core/jackson-core/2.18.6/jackson-core-2.18.6.jar @@ -11,8 +11,8 @@ Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferst Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/fasterxml/jackson/jackson-bom/2.18.6/jackson-bom-2.18.6.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/fasterxml/jackson/jackson-parent/2.18.4/jackson-parent-2.18.4.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/fasterxml/oss-parent/69/oss-parent-69.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/github/ferstl/depgraph-maven-plugin/4.0.3-CodeQL-3/depgraph-maven-plugin-4.0.3-CodeQL-3.jar -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/github/ferstl/depgraph-maven-plugin/4.0.3-CodeQL-3/depgraph-maven-plugin-4.0.3-CodeQL-3.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/github/ferstl/depgraph-maven-plugin/4.0.3-CodeQL-2/depgraph-maven-plugin-4.0.3-CodeQL-2.jar +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/github/ferstl/depgraph-maven-plugin/4.0.3-CodeQL-2/depgraph-maven-plugin-4.0.3-CodeQL-2.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/com/google/errorprone/error_prone_annotations/2.36.0/error_prone_annotations-2.36.0.jar @@ -31,12 +31,12 @@ Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferst Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/net/java/jvnet-parent/3/jvnet-parent-3.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/apache/19/apache-19.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/apache/25/apache-25.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/apache/27/apache-27.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/apache/35/apache-35.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-lang3/3.18.0/commons-lang3-3.18.0.jar -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-lang3/3.18.0/commons-lang3-3.18.0.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-parent/85/commons-parent-85.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/commons/commons-parent/47/commons-parent-47.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/maven/maven-artifact/3.8.6/maven-artifact-3.8.6.jar Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/maven/maven-artifact/3.8.6/maven-artifact-3.8.6.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/apache/maven/maven-model/3.8.6/maven-model-3.8.6.jar @@ -57,11 +57,12 @@ Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferst Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-containers/1.5.5/plexus-containers-1.5.5.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-utils/3.6.1/plexus-utils-3.6.1.jar -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-utils/3.6.1/plexus-utils-3.6.1.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-utils/3.0.24/plexus-utils-3.0.24.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-utils/3.3.1/plexus-utils-3.3.1.jar +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus-utils/3.3.1/plexus-utils-3.3.1.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus/2.0.7/plexus-2.0.7.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus/25/plexus-25.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus/3.3.1/plexus-3.3.1.pom +Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus/4.0/plexus-4.0.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/codehaus/plexus/plexus/5.1/plexus-5.1.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.5/org.eclipse.sisu.inject-0.3.5.jar Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.5/org.eclipse.sisu.inject-0.3.5.pom @@ -69,8 +70,6 @@ Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferst Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/eclipse/sisu/org.eclipse.sisu.plexus/0.3.5/org.eclipse.sisu.plexus-0.3.5.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/eclipse/sisu/sisu-inject/0.3.5/sisu-inject-0.3.5.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/eclipse/sisu/sisu-plexus/0.3.5/sisu-plexus-0.3.5.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/junit/junit-bom/5.13.1/junit-bom-5.13.1.pom -Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/junit/junit-bom/5.14.1/junit-bom-5.14.1.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/junit/junit-bom/5.9.1/junit-bom-5.9.1.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/sonatype/forge/forge-parent/10/forge-parent-10.pom Downloaded from codeql-depgraph-plugin-repo: file://[dist-root]/java/tools/ferstl-depgraph-dependencies/org/sonatype/oss/oss-parent/7/oss-parent-7.pom diff --git a/java/ql/integration-tests/java/buildless-maven/pom.xml b/java/ql/integration-tests/java/buildless-maven/pom.xml index ec4aaf128c1..debe59e6c03 100644 --- a/java/ql/integration-tests/java/buildless-maven/pom.xml +++ b/java/ql/integration-tests/java/buildless-maven/pom.xml @@ -111,4 +111,30 @@ + + + + + central + https://maven-central.storage-download.googleapis.com/maven2/ + + true + + + true + + + + + + central + https://maven-central.storage-download.googleapis.com/maven2/ + + true + + + true + + + \ No newline at end of file diff --git a/java/ql/integration-tests/java/buildless-proxy-maven/buildless-fetches.expected b/java/ql/integration-tests/java/buildless-proxy-maven/buildless-fetches.expected index 49120865e8d..a4bfbc7a97b 100644 --- a/java/ql/integration-tests/java/buildless-proxy-maven/buildless-fetches.expected +++ b/java/ql/integration-tests/java/buildless-proxy-maven/buildless-fetches.expected @@ -1,3 +1,5 @@ +https://maven-central.storage-download.googleapis.com/maven2/junit/junit/4.11/junit-4.11.jar +https://maven-central.storage-download.googleapis.com/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar https://repo.maven.apache.org/maven2/com/feiniaojin/naaf/naaf-graceful-response-example/1.0/naaf-graceful-response-example-1.0.jar https://repo.maven.apache.org/maven2/com/github/MoebiusSolutions/avro-registry-in-source/avro-registry-in-source-tests/1.8/avro-registry-in-source-tests-1.8.jar https://repo.maven.apache.org/maven2/com/github/MoebiusSolutions/avro-registry-in-source/example-project/1.5/example-project-1.5.jar @@ -9,9 +11,7 @@ https://repo.maven.apache.org/maven2/de/knutwalker/rx-redis-example_2.11/0.1.2/r https://repo.maven.apache.org/maven2/de/knutwalker/rx-redis-java-example_2.11/0.1.2/rx-redis-java-example_2.11-0.1.2.jar https://repo.maven.apache.org/maven2/io/github/scrollsyou/example-spring-boot-starter/1.0.0/example-spring-boot-starter-1.0.0.jar https://repo.maven.apache.org/maven2/io/streamnative/com/example/maven-central-template/server/3.0.0/server-3.0.0.jar -https://repo.maven.apache.org/maven2/junit/junit/4.11/junit-4.11.jar https://repo.maven.apache.org/maven2/no/nav/security/token-validation-ktor-demo/3.1.0/token-validation-ktor-demo-3.1.0.jar -https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar https://repo.maven.apache.org/maven2/org/minijax/minijax-example-fileupload/0.5.10/minijax-example-fileupload-0.5.10.jar https://repo.maven.apache.org/maven2/org/minijax/minijax-example-inject/0.5.10/minijax-example-inject-0.5.10.jar https://repo.maven.apache.org/maven2/org/minijax/minijax-example-json/0.5.10/minijax-example-json-0.5.10.jar diff --git a/java/ql/integration-tests/java/buildless-proxy-maven/settings.xml b/java/ql/integration-tests/java/buildless-proxy-maven/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/buildless-proxy-maven/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/buildless-proxy-maven/source_archive.expected b/java/ql/integration-tests/java/buildless-proxy-maven/source_archive.expected index 0a86ff54645..ac35d94be39 100644 --- a/java/ql/integration-tests/java/buildless-proxy-maven/source_archive.expected +++ b/java/ql/integration-tests/java/buildless-proxy-maven/source_archive.expected @@ -1,4 +1,5 @@ pom.xml +settings.xml src/main/java/com/example/App.java src/main/resources/my-app.properties src/main/resources/page.xml diff --git a/java/ql/integration-tests/java/buildless-proxy-maven/test.py b/java/ql/integration-tests/java/buildless-proxy-maven/test.py index 879a1b3a80a..4b9c2c2d9f8 100644 --- a/java/ql/integration-tests/java/buildless-proxy-maven/test.py +++ b/java/ql/integration-tests/java/buildless-proxy-maven/test.py @@ -1,7 +1,10 @@ +import os + def test(codeql, java, codeql_mitm_proxy, check_diagnostics_java): codeql.database.create( _env={ "CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS": "true", "CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS_CLASSPATH_FROM_BUILD_FILES": "true", + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), } ) diff --git a/java/ql/integration-tests/java/buildless-snapshot-repository/settings.xml b/java/ql/integration-tests/java/buildless-snapshot-repository/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/buildless-snapshot-repository/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/buildless-snapshot-repository/test.py b/java/ql/integration-tests/java/buildless-snapshot-repository/test.py index a4814e1f8a1..7aebc44fcc1 100644 --- a/java/ql/integration-tests/java/buildless-snapshot-repository/test.py +++ b/java/ql/integration-tests/java/buildless-snapshot-repository/test.py @@ -1,3 +1,4 @@ +import os import subprocess import runs_on @@ -15,7 +16,10 @@ def test(codeql, java): try: codeql.database.create( extractor_option="buildless=true", - _env={"CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS_CLASSPATH_FROM_BUILD_FILES": "true"}, + _env={ + "CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS_CLASSPATH_FROM_BUILD_FILES": "true", + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + }, ) finally: repo_server_process.kill() diff --git a/java/ql/integration-tests/java/maven-add-exports-module-flags/settings.xml b/java/ql/integration-tests/java/maven-add-exports-module-flags/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-add-exports-module-flags/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-add-exports-module-flags/source_archive.expected b/java/ql/integration-tests/java/maven-add-exports-module-flags/source_archive.expected index 3d84bfa09ab..e9d047b9742 100644 --- a/java/ql/integration-tests/java/maven-add-exports-module-flags/source_archive.expected +++ b/java/ql/integration-tests/java/maven-add-exports-module-flags/source_archive.expected @@ -1,3 +1,4 @@ pom.xml +settings.xml src/main/java/com/example/CompilerUser.java target/maven-archiver/pom.properties diff --git a/java/ql/integration-tests/java/maven-add-exports-module-flags/test.py b/java/ql/integration-tests/java/maven-add-exports-module-flags/test.py index 73c4b1415a1..ffa89ccab41 100644 --- a/java/ql/integration-tests/java/maven-add-exports-module-flags/test.py +++ b/java/ql/integration-tests/java/maven-add-exports-module-flags/test.py @@ -1,2 +1,9 @@ +import os + def test(codeql, java, actions_toolchains_file): - codeql.database.create(_env={"LGTM_INDEX_MAVEN_TOOLCHAINS_FILE": str(actions_toolchains_file)}) + codeql.database.create( + _env={ + "LGTM_INDEX_MAVEN_TOOLCHAINS_FILE": str(actions_toolchains_file), + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + } + ) diff --git a/java/ql/integration-tests/java/maven-download-failure/settings.xml b/java/ql/integration-tests/java/maven-download-failure/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-download-failure/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-download-failure/source_archive.expected b/java/ql/integration-tests/java/maven-download-failure/source_archive.expected index 0a86ff54645..ac35d94be39 100644 --- a/java/ql/integration-tests/java/maven-download-failure/source_archive.expected +++ b/java/ql/integration-tests/java/maven-download-failure/source_archive.expected @@ -1,4 +1,5 @@ pom.xml +settings.xml src/main/java/com/example/App.java src/main/resources/my-app.properties src/main/resources/page.xml diff --git a/java/ql/integration-tests/java/maven-download-failure/test.py b/java/ql/integration-tests/java/maven-download-failure/test.py index ad9c4bb7840..48bf3b41c21 100644 --- a/java/ql/integration-tests/java/maven-download-failure/test.py +++ b/java/ql/integration-tests/java/maven-download-failure/test.py @@ -9,6 +9,7 @@ def test(codeql, java, check_diagnostics_java): runenv = { "PATH": os.path.realpath(os.path.dirname(__file__)) + os.pathsep + os.getenv("PATH"), "REAL_MVN_PATH": shutil.which("mvn"), + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), } del os.environ["NoDefaultCurrentDirectoryInExePath"] codeql.database.create(build_mode = "none", _env = runenv) diff --git a/java/ql/integration-tests/java/maven-enforcer-multiple-versions/settings.xml b/java/ql/integration-tests/java/maven-enforcer-multiple-versions/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-enforcer-multiple-versions/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-enforcer-multiple-versions/source_archive.expected b/java/ql/integration-tests/java/maven-enforcer-multiple-versions/source_archive.expected index 59a81a01481..d86dae4531f 100644 --- a/java/ql/integration-tests/java/maven-enforcer-multiple-versions/source_archive.expected +++ b/java/ql/integration-tests/java/maven-enforcer-multiple-versions/source_archive.expected @@ -1,4 +1,5 @@ pom.xml +settings.xml src/main/java/com/example/App.java src/main/resources/my-app.properties src/main/resources/page.xml diff --git a/java/ql/integration-tests/java/maven-enforcer-multiple-versions/test.py b/java/ql/integration-tests/java/maven-enforcer-multiple-versions/test.py index eb49efe6a2a..a71c8821d5e 100644 --- a/java/ql/integration-tests/java/maven-enforcer-multiple-versions/test.py +++ b/java/ql/integration-tests/java/maven-enforcer-multiple-versions/test.py @@ -1,2 +1,8 @@ +import os + def test(codeql, java): - codeql.database.create() + codeql.database.create( + _env={ + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + }, + ) diff --git a/java/ql/integration-tests/java/maven-enforcer-single-version/settings.xml b/java/ql/integration-tests/java/maven-enforcer-single-version/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-enforcer-single-version/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-enforcer-single-version/source_archive.expected b/java/ql/integration-tests/java/maven-enforcer-single-version/source_archive.expected index 59a81a01481..d86dae4531f 100644 --- a/java/ql/integration-tests/java/maven-enforcer-single-version/source_archive.expected +++ b/java/ql/integration-tests/java/maven-enforcer-single-version/source_archive.expected @@ -1,4 +1,5 @@ pom.xml +settings.xml src/main/java/com/example/App.java src/main/resources/my-app.properties src/main/resources/page.xml diff --git a/java/ql/integration-tests/java/maven-enforcer-single-version/test.py b/java/ql/integration-tests/java/maven-enforcer-single-version/test.py index eb49efe6a2a..a71c8821d5e 100644 --- a/java/ql/integration-tests/java/maven-enforcer-single-version/test.py +++ b/java/ql/integration-tests/java/maven-enforcer-single-version/test.py @@ -1,2 +1,8 @@ +import os + def test(codeql, java): - codeql.database.create() + codeql.database.create( + _env={ + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + }, + ) diff --git a/java/ql/integration-tests/java/maven-enforcer/settings.xml b/java/ql/integration-tests/java/maven-enforcer/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-enforcer/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-enforcer/source_archive.expected b/java/ql/integration-tests/java/maven-enforcer/source_archive.expected index 59a81a01481..d86dae4531f 100644 --- a/java/ql/integration-tests/java/maven-enforcer/source_archive.expected +++ b/java/ql/integration-tests/java/maven-enforcer/source_archive.expected @@ -1,4 +1,5 @@ pom.xml +settings.xml src/main/java/com/example/App.java src/main/resources/my-app.properties src/main/resources/page.xml diff --git a/java/ql/integration-tests/java/maven-enforcer/test.py b/java/ql/integration-tests/java/maven-enforcer/test.py index eb49efe6a2a..a71c8821d5e 100644 --- a/java/ql/integration-tests/java/maven-enforcer/test.py +++ b/java/ql/integration-tests/java/maven-enforcer/test.py @@ -1,2 +1,8 @@ +import os + def test(codeql, java): - codeql.database.create() + codeql.database.create( + _env={ + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + }, + ) diff --git a/java/ql/integration-tests/java/maven-execution-specific-java-version/settings.xml b/java/ql/integration-tests/java/maven-execution-specific-java-version/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-execution-specific-java-version/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-execution-specific-java-version/source_archive.expected b/java/ql/integration-tests/java/maven-execution-specific-java-version/source_archive.expected index 16e83f3a7f6..a603ae78ec4 100644 --- a/java/ql/integration-tests/java/maven-execution-specific-java-version/source_archive.expected +++ b/java/ql/integration-tests/java/maven-execution-specific-java-version/source_archive.expected @@ -1,4 +1,5 @@ pom.xml +settings.xml src/main/java/com/example/App.java src/test/java/com/example/AppTest.java target/maven-archiver/pom.properties diff --git a/java/ql/integration-tests/java/maven-execution-specific-java-version/test.py b/java/ql/integration-tests/java/maven-execution-specific-java-version/test.py index 73c4b1415a1..ffa89ccab41 100644 --- a/java/ql/integration-tests/java/maven-execution-specific-java-version/test.py +++ b/java/ql/integration-tests/java/maven-execution-specific-java-version/test.py @@ -1,2 +1,9 @@ +import os + def test(codeql, java, actions_toolchains_file): - codeql.database.create(_env={"LGTM_INDEX_MAVEN_TOOLCHAINS_FILE": str(actions_toolchains_file)}) + codeql.database.create( + _env={ + "LGTM_INDEX_MAVEN_TOOLCHAINS_FILE": str(actions_toolchains_file), + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + } + ) diff --git a/java/ql/integration-tests/java/maven-java16-with-higher-jdk/settings.xml b/java/ql/integration-tests/java/maven-java16-with-higher-jdk/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-java16-with-higher-jdk/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-java16-with-higher-jdk/source_archive.expected b/java/ql/integration-tests/java/maven-java16-with-higher-jdk/source_archive.expected index eb5dbc368ee..7fb96566709 100644 --- a/java/ql/integration-tests/java/maven-java16-with-higher-jdk/source_archive.expected +++ b/java/ql/integration-tests/java/maven-java16-with-higher-jdk/source_archive.expected @@ -1,3 +1,4 @@ pom.xml +settings.xml src/main/java/com/example/App.java target/maven-archiver/pom.properties diff --git a/java/ql/integration-tests/java/maven-java16-with-higher-jdk/test.py b/java/ql/integration-tests/java/maven-java16-with-higher-jdk/test.py index 73c4b1415a1..ffa89ccab41 100644 --- a/java/ql/integration-tests/java/maven-java16-with-higher-jdk/test.py +++ b/java/ql/integration-tests/java/maven-java16-with-higher-jdk/test.py @@ -1,2 +1,9 @@ +import os + def test(codeql, java, actions_toolchains_file): - codeql.database.create(_env={"LGTM_INDEX_MAVEN_TOOLCHAINS_FILE": str(actions_toolchains_file)}) + codeql.database.create( + _env={ + "LGTM_INDEX_MAVEN_TOOLCHAINS_FILE": str(actions_toolchains_file), + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + } + ) diff --git a/java/ql/integration-tests/java/maven-java8-java11-dependency/settings.xml b/java/ql/integration-tests/java/maven-java8-java11-dependency/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-java8-java11-dependency/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-java8-java11-dependency/source_archive.expected b/java/ql/integration-tests/java/maven-java8-java11-dependency/source_archive.expected index 5088f76cc38..51c47ade3d0 100644 --- a/java/ql/integration-tests/java/maven-java8-java11-dependency/source_archive.expected +++ b/java/ql/integration-tests/java/maven-java8-java11-dependency/source_archive.expected @@ -1,4 +1,5 @@ pom.xml +settings.xml src/main/java/com/example/Calculator.java src/test/java/com/example/CalculatorTest.java target/maven-archiver/pom.properties diff --git a/java/ql/integration-tests/java/maven-java8-java11-dependency/test.py b/java/ql/integration-tests/java/maven-java8-java11-dependency/test.py index 73c4b1415a1..ffa89ccab41 100644 --- a/java/ql/integration-tests/java/maven-java8-java11-dependency/test.py +++ b/java/ql/integration-tests/java/maven-java8-java11-dependency/test.py @@ -1,2 +1,9 @@ +import os + def test(codeql, java, actions_toolchains_file): - codeql.database.create(_env={"LGTM_INDEX_MAVEN_TOOLCHAINS_FILE": str(actions_toolchains_file)}) + codeql.database.create( + _env={ + "LGTM_INDEX_MAVEN_TOOLCHAINS_FILE": str(actions_toolchains_file), + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + } + ) diff --git a/java/ql/integration-tests/java/maven-multimodule-test-java-version/settings.xml b/java/ql/integration-tests/java/maven-multimodule-test-java-version/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-multimodule-test-java-version/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-multimodule-test-java-version/source_archive.expected b/java/ql/integration-tests/java/maven-multimodule-test-java-version/source_archive.expected index 08385ca91a0..a83b2775f38 100644 --- a/java/ql/integration-tests/java/maven-multimodule-test-java-version/source_archive.expected +++ b/java/ql/integration-tests/java/maven-multimodule-test-java-version/source_archive.expected @@ -2,6 +2,7 @@ main-module/pom.xml main-module/src/main/java/com/example/App.java main-module/target/maven-archiver/pom.properties pom.xml +settings.xml test-module/pom.xml test-module/src/main/java/com/example/tests/TestUtils.java test-module/target/maven-archiver/pom.properties diff --git a/java/ql/integration-tests/java/maven-sample-extract-properties/settings.xml b/java/ql/integration-tests/java/maven-sample-extract-properties/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-sample-extract-properties/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-sample-extract-properties/source_archive.expected b/java/ql/integration-tests/java/maven-sample-extract-properties/source_archive.expected index 59a81a01481..d86dae4531f 100644 --- a/java/ql/integration-tests/java/maven-sample-extract-properties/source_archive.expected +++ b/java/ql/integration-tests/java/maven-sample-extract-properties/source_archive.expected @@ -1,4 +1,5 @@ pom.xml +settings.xml src/main/java/com/example/App.java src/main/resources/my-app.properties src/main/resources/page.xml diff --git a/java/ql/integration-tests/java/maven-sample-extract-properties/test.py b/java/ql/integration-tests/java/maven-sample-extract-properties/test.py index a12444ef170..a6b6cad52d3 100644 --- a/java/ql/integration-tests/java/maven-sample-extract-properties/test.py +++ b/java/ql/integration-tests/java/maven-sample-extract-properties/test.py @@ -1,2 +1,8 @@ +import os + def test(codeql, java): - codeql.database.create(_env={"LGTM_INDEX_PROPERTIES_FILES": "true"}) + codeql.database.create( + _env={ + "LGTM_INDEX_PROPERTIES_FILES": "true", + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml") + }) diff --git a/java/ql/integration-tests/java/maven-sample-large-xml-files/settings.xml b/java/ql/integration-tests/java/maven-sample-large-xml-files/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-sample-large-xml-files/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-sample-large-xml-files/test.py b/java/ql/integration-tests/java/maven-sample-large-xml-files/test.py index 08a582b9d42..ff1cc6faad4 100644 --- a/java/ql/integration-tests/java/maven-sample-large-xml-files/test.py +++ b/java/ql/integration-tests/java/maven-sample-large-xml-files/test.py @@ -1,6 +1,12 @@ +import os + def test(codeql, java): # Test that a build with 60 ~1MB XML docs extracts does not extract them, but we fall back to by-name mode instead: for i in range(60): with open(f"generated-{i}.xml", "w") as f: f.write("" + ("a" * 1000000) + "") - codeql.database.create() + codeql.database.create( + _env={ + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml") + }, + ) diff --git a/java/ql/integration-tests/java/maven-sample-small-xml-files/settings.xml b/java/ql/integration-tests/java/maven-sample-small-xml-files/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-sample-small-xml-files/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-sample-small-xml-files/source_archive.expected b/java/ql/integration-tests/java/maven-sample-small-xml-files/source_archive.expected index 83f376944a7..68569a23577 100644 --- a/java/ql/integration-tests/java/maven-sample-small-xml-files/source_archive.expected +++ b/java/ql/integration-tests/java/maven-sample-small-xml-files/source_archive.expected @@ -4,6 +4,7 @@ generated-2.xml generated-3.xml generated-4.xml pom.xml +settings.xml src/main/java/com/example/App.java src/main/resources/my-app.properties src/main/resources/page.xml diff --git a/java/ql/integration-tests/java/maven-sample-small-xml-files/test.py b/java/ql/integration-tests/java/maven-sample-small-xml-files/test.py index 8795cbbaa09..e7ee32a5443 100644 --- a/java/ql/integration-tests/java/maven-sample-small-xml-files/test.py +++ b/java/ql/integration-tests/java/maven-sample-small-xml-files/test.py @@ -1,6 +1,12 @@ +import os + def test(codeql, java): # Test that a build with 5 ~1MB XML docs extracts them: for i in range(5): with open(f"generated-{i}.xml", "w") as f: f.write("" + ("a" * 1000000) + "") - codeql.database.create() + codeql.database.create( + _env={ + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml") + }, + ) diff --git a/java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/settings.xml b/java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/source_archive.expected b/java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/source_archive.expected index 535084ac188..04218439bf1 100644 --- a/java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/source_archive.expected +++ b/java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/source_archive.expected @@ -1,4 +1,5 @@ pom.xml +settings.xml src/main/java/com/example/App.java src/main/resources/my-app.properties src/main/resources/page.xml diff --git a/java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/test.py b/java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/test.py index 93ac0300499..3ee198cfd67 100644 --- a/java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/test.py +++ b/java/ql/integration-tests/java/maven-sample-xml-mode-all-gbk-encoding/test.py @@ -1,2 +1,9 @@ +import os + def test(codeql, java): - codeql.database.create(_env={"LGTM_INDEX_XML_MODE": "all"}) + codeql.database.create( + _env={ + "LGTM_INDEX_XML_MODE": "all", + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + }, + ) diff --git a/java/ql/integration-tests/java/maven-sample-xml-mode-all/settings.xml b/java/ql/integration-tests/java/maven-sample-xml-mode-all/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-sample-xml-mode-all/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-sample-xml-mode-all/source_archive.expected b/java/ql/integration-tests/java/maven-sample-xml-mode-all/source_archive.expected index 59a81a01481..d86dae4531f 100644 --- a/java/ql/integration-tests/java/maven-sample-xml-mode-all/source_archive.expected +++ b/java/ql/integration-tests/java/maven-sample-xml-mode-all/source_archive.expected @@ -1,4 +1,5 @@ pom.xml +settings.xml src/main/java/com/example/App.java src/main/resources/my-app.properties src/main/resources/page.xml diff --git a/java/ql/integration-tests/java/maven-sample-xml-mode-all/test.py b/java/ql/integration-tests/java/maven-sample-xml-mode-all/test.py index 93ac0300499..5eeece7c91b 100644 --- a/java/ql/integration-tests/java/maven-sample-xml-mode-all/test.py +++ b/java/ql/integration-tests/java/maven-sample-xml-mode-all/test.py @@ -1,2 +1,9 @@ +import os + def test(codeql, java): - codeql.database.create(_env={"LGTM_INDEX_XML_MODE": "all"}) + codeql.database.create( + _env={ + "LGTM_INDEX_XML_MODE": "all", + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml") + }, + ) diff --git a/java/ql/integration-tests/java/maven-sample-xml-mode-byname/settings.xml b/java/ql/integration-tests/java/maven-sample-xml-mode-byname/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-sample-xml-mode-byname/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-sample-xml-mode-byname/test.py b/java/ql/integration-tests/java/maven-sample-xml-mode-byname/test.py index 64e5f7ba05a..f5123e4a245 100644 --- a/java/ql/integration-tests/java/maven-sample-xml-mode-byname/test.py +++ b/java/ql/integration-tests/java/maven-sample-xml-mode-byname/test.py @@ -1,2 +1,9 @@ +import os + def test(codeql, java): - codeql.database.create(_env={"LGTM_INDEX_XML_MODE": "byname"}) + codeql.database.create( + _env={ + "LGTM_INDEX_XML_MODE": "byname", + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + }, + ) diff --git a/java/ql/integration-tests/java/maven-sample-xml-mode-disabled/settings.xml b/java/ql/integration-tests/java/maven-sample-xml-mode-disabled/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-sample-xml-mode-disabled/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-sample-xml-mode-disabled/test.py b/java/ql/integration-tests/java/maven-sample-xml-mode-disabled/test.py index aa6c911f94d..8039a1d5c9f 100644 --- a/java/ql/integration-tests/java/maven-sample-xml-mode-disabled/test.py +++ b/java/ql/integration-tests/java/maven-sample-xml-mode-disabled/test.py @@ -1,2 +1,9 @@ +import os + def test(codeql, java): - codeql.database.create(_env={"LGTM_INDEX_XML_MODE": "disabled"}) + codeql.database.create( + _env={ + "LGTM_INDEX_XML_MODE": "disabled", + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + }, + ) diff --git a/java/ql/integration-tests/java/maven-sample-xml-mode-smart/settings.xml b/java/ql/integration-tests/java/maven-sample-xml-mode-smart/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-sample-xml-mode-smart/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-sample-xml-mode-smart/test.py b/java/ql/integration-tests/java/maven-sample-xml-mode-smart/test.py index 7736927eb8a..59d649ad707 100644 --- a/java/ql/integration-tests/java/maven-sample-xml-mode-smart/test.py +++ b/java/ql/integration-tests/java/maven-sample-xml-mode-smart/test.py @@ -1,2 +1,9 @@ +import os + def test(codeql, java): - codeql.database.create(_env={"LGTM_INDEX_XML_MODE": "smart"}) + codeql.database.create( + _env={ + "LGTM_INDEX_XML_MODE": "smart", + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + }, + ) diff --git a/java/ql/integration-tests/java/maven-sample/settings.xml b/java/ql/integration-tests/java/maven-sample/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-sample/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-sample/source_archive.expected b/java/ql/integration-tests/java/maven-sample/source_archive.expected index 59a81a01481..d86dae4531f 100644 --- a/java/ql/integration-tests/java/maven-sample/source_archive.expected +++ b/java/ql/integration-tests/java/maven-sample/source_archive.expected @@ -1,4 +1,5 @@ pom.xml +settings.xml src/main/java/com/example/App.java src/main/resources/my-app.properties src/main/resources/page.xml diff --git a/java/ql/integration-tests/java/maven-sample/test.py b/java/ql/integration-tests/java/maven-sample/test.py index eb49efe6a2a..14d7fc40b8f 100644 --- a/java/ql/integration-tests/java/maven-sample/test.py +++ b/java/ql/integration-tests/java/maven-sample/test.py @@ -1,2 +1,8 @@ +import os + def test(codeql, java): - codeql.database.create() + codeql.database.create( + _env={ + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml") + }, + ) diff --git a/java/ql/integration-tests/java/maven-wrapper-missing-properties/settings.xml b/java/ql/integration-tests/java/maven-wrapper-missing-properties/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-wrapper-missing-properties/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-wrapper-missing-properties/source_archive.expected b/java/ql/integration-tests/java/maven-wrapper-missing-properties/source_archive.expected index 6ea990c4d1b..e2e6f04afd5 100644 --- a/java/ql/integration-tests/java/maven-wrapper-missing-properties/source_archive.expected +++ b/java/ql/integration-tests/java/maven-wrapper-missing-properties/source_archive.expected @@ -1,4 +1,5 @@ .mvn/wrapper/maven-wrapper.properties pom.xml +settings.xml src/main/java/com/example/Hello.java target/maven-archiver/pom.properties diff --git a/java/ql/integration-tests/java/maven-wrapper-missing-properties/test.py b/java/ql/integration-tests/java/maven-wrapper-missing-properties/test.py index ef93712d879..9d08d3360d0 100644 --- a/java/ql/integration-tests/java/maven-wrapper-missing-properties/test.py +++ b/java/ql/integration-tests/java/maven-wrapper-missing-properties/test.py @@ -1,2 +1,9 @@ +import os + def test(codeql, java): - codeql.database.create(build_mode="autobuild") + codeql.database.create( + build_mode="autobuild", + _env={ + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + }, + ) diff --git a/java/ql/integration-tests/java/maven-wrapper-script-only/settings.xml b/java/ql/integration-tests/java/maven-wrapper-script-only/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-wrapper-script-only/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-wrapper-script-only/source_archive.expected b/java/ql/integration-tests/java/maven-wrapper-script-only/source_archive.expected index 1e05b6ef3ee..df2451d695c 100644 --- a/java/ql/integration-tests/java/maven-wrapper-script-only/source_archive.expected +++ b/java/ql/integration-tests/java/maven-wrapper-script-only/source_archive.expected @@ -1,5 +1,6 @@ .mvn/wrapper/maven-wrapper.properties pom.xml +settings.xml src/main/java/com/example/App.java src/main/resources/my-app.properties src/main/resources/page.xml diff --git a/java/ql/integration-tests/java/maven-wrapper-script-only/test.py b/java/ql/integration-tests/java/maven-wrapper-script-only/test.py index eb49efe6a2a..a71c8821d5e 100644 --- a/java/ql/integration-tests/java/maven-wrapper-script-only/test.py +++ b/java/ql/integration-tests/java/maven-wrapper-script-only/test.py @@ -1,2 +1,8 @@ +import os + def test(codeql, java): - codeql.database.create() + codeql.database.create( + _env={ + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + }, + ) diff --git a/java/ql/integration-tests/java/maven-wrapper-source-only/settings.xml b/java/ql/integration-tests/java/maven-wrapper-source-only/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-wrapper-source-only/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-wrapper-source-only/source_archive.expected b/java/ql/integration-tests/java/maven-wrapper-source-only/source_archive.expected index 1e05b6ef3ee..df2451d695c 100644 --- a/java/ql/integration-tests/java/maven-wrapper-source-only/source_archive.expected +++ b/java/ql/integration-tests/java/maven-wrapper-source-only/source_archive.expected @@ -1,5 +1,6 @@ .mvn/wrapper/maven-wrapper.properties pom.xml +settings.xml src/main/java/com/example/App.java src/main/resources/my-app.properties src/main/resources/page.xml diff --git a/java/ql/integration-tests/java/maven-wrapper-source-only/test.py b/java/ql/integration-tests/java/maven-wrapper-source-only/test.py index eb49efe6a2a..a71c8821d5e 100644 --- a/java/ql/integration-tests/java/maven-wrapper-source-only/test.py +++ b/java/ql/integration-tests/java/maven-wrapper-source-only/test.py @@ -1,2 +1,8 @@ +import os + def test(codeql, java): - codeql.database.create() + codeql.database.create( + _env={ + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + }, + ) diff --git a/java/ql/integration-tests/java/maven-wrapper/settings.xml b/java/ql/integration-tests/java/maven-wrapper/settings.xml new file mode 100644 index 00000000000..a40670670a6 --- /dev/null +++ b/java/ql/integration-tests/java/maven-wrapper/settings.xml @@ -0,0 +1,10 @@ + + + + google-maven-central + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + central + + + diff --git a/java/ql/integration-tests/java/maven-wrapper/source_archive.expected b/java/ql/integration-tests/java/maven-wrapper/source_archive.expected index 1e05b6ef3ee..df2451d695c 100644 --- a/java/ql/integration-tests/java/maven-wrapper/source_archive.expected +++ b/java/ql/integration-tests/java/maven-wrapper/source_archive.expected @@ -1,5 +1,6 @@ .mvn/wrapper/maven-wrapper.properties pom.xml +settings.xml src/main/java/com/example/App.java src/main/resources/my-app.properties src/main/resources/page.xml diff --git a/java/ql/integration-tests/java/maven-wrapper/test.py b/java/ql/integration-tests/java/maven-wrapper/test.py index eb49efe6a2a..a71c8821d5e 100644 --- a/java/ql/integration-tests/java/maven-wrapper/test.py +++ b/java/ql/integration-tests/java/maven-wrapper/test.py @@ -1,2 +1,8 @@ +import os + def test(codeql, java): - codeql.database.create() + codeql.database.create( + _env={ + "LGTM_INDEX_MAVEN_SETTINGS_FILE": os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings.xml"), + }, + )