Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Could not fetch model of type 'OrtDependencyTreeModel' using connection to Gradle distribution #6788

Closed
dineshr93 opened this issue Apr 1, 2023 · 10 comments
Labels
analyzer About the analyzer tool docker About Docker topics question An issue that is actually a question

Comments

@dineshr93
Copy link
Contributor

dineshr93 commented Apr 1, 2023

Gradle Project taken for scan: jitpack/gradle-simple/65da6e76bbf3f

ORT container built using f619841 (march 31 2023)

Command used (on windows):

podman run -v .:/project/ -it ort-image-id analyze -i /project -o /project/.ort -m Gradle

Click me

Error log

17:00:50,399 |-INFO in ch.qos.logback.classic.LoggerContext[default] - This is logback-classic version 1.4.6
17:00:50,416 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
17:00:50,419 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/opt/ort/lib/cli-f6198418cf.jar!/logback.xml]
17:00:50,420 |-WARN in ch.qos.logback.classic.util.DefaultJoranConfigurator@507d20bb - Resource [logback.xml] occurs multiple times on the classpath.
17:00:50,420 |-WARN in ch.qos.logback.classic.util.DefaultJoranConfigurator@507d20bb - Resource [logback.xml] occurs at [jar:file:/opt/ort/lib/cli-f6198418cf.jar!/logback.xml]
17:00:50,420 |-WARN in ch.qos.logback.classic.util.DefaultJoranConfigurator@507d20bb - Resource [logback.xml] occurs at [jar:file:/opt/ort/lib/helper-cli-f6198418cf.jar!/logback.xml]
17:00:50,425 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@9fec931 - URL [jar:file:/opt/ort/lib/cli-f6198418cf.jar!/logback.xml] is not of type file
17:00:50,526 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [STDOUT]
17:00:50,526 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
17:00:50,533 |-INFO in ch.qos.logback.core.model.processor.ImplicitModelHandler - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
17:00:50,551 |-INFO in ch.qos.logback.classic.model.processor.RootLoggerModelHandler - Setting level of ROOT logger to WARN
17:00:50,552 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [STDOUT] to Logger[ROOT]
17:00:50,553 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.apache.http.headers] to ERROR
17:00:50,553 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.apache.http.wire] to ERROR
17:00:50,553 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.eclipse.jgit.internal.storage.file.FileSnapshot] to ERROR
17:00:50,553 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.ossreviewtoolkit.analyzer.managers.Yarn2] to INFO
17:00:50,553 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.ossreviewtoolkit.clients.fossid.FossIdRestService] to INFO
17:00:50,553 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.ossreviewtoolkit.reporter.reporters.fossid.FossIdReporter] to INFO
17:00:50,553 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.ossreviewtoolkit.scanner.scanners.fossid.FossId] to INFO
17:00:50,553 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.ossreviewtoolkit.scanner.scanners.fossid.FossIdConfig] to INFO
17:00:50,553 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.ossreviewtoolkit.scanner.scanners.fossid.FossIdUrlProvider] to INFO
17:00:50,553 |-INFO in ch.qos.logback.core.model.processor.DefaultProcessor@5cbd159f - End of configuration.
17:00:50,554 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@3b05a99b - Registering current configuration as safe fallback point

______________________________
/        \_______   \__    ___/ The OSS Review Toolkit, version f6198418cf.
|    |   | |       _/ |    |
|    |   | |    |   \ |    |    Running 'analyze' as 'ort' under Java 17.0.6 on Linux
\________/ |____|___/ |____|    with 8 CPUs and a maximum of 3986 MiB of memory.

Environment variables:
ORT_CONFIG_DIR = /home/ort/.ort/config
ORT_DATA_DIR = /home/ort/.ort
TERM = xterm
JAVA_HOME = /opt/java/openjdk
ANDROID_HOME = /opt/android-sdk

Looking for ORT configuration in the following file:
      /home/ort/.ort/config/config.yml (does not exist)

--package-managers is deprecated, use -P ort.analyzer.enabledPackageManagers=... on the ort command instead.
Looking for analyzer-specific configuration in the following files and directories:
      /project/.ort.yml (does not exist)
      /home/ort/.ort/config/resolutions.yml (does not exist)
The following package managers are enabled:
      Gradle
The following package curation providers are enabled:
      DefaultDir, DefaultFile
Analyzing project path:
      /project
Found 1 Gradle definition file(s) at:
      build.gradle
Found 1 definition file(s) from 1 package manager(s) in total.
Downloading https://services.gradle.org/distributions/gradle-6.1.1-all.zip
....................................................................................................................................
17:02:16.845 [DefaultDispatcher-worker-1] ERROR org.ossreviewtoolkit.analyzer.PackageManager - Resolving Gradle dependencies for path 'build.gradle' failed with: BuildException: Could not fetch model of type 'OrtDependencyTreeModel' using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-6.1.1-all.zip'.
Caused by: LocationAwareException: Could not open cp_init remapped class cache for 8gww9monnpj8insyuwtn79luj (/home/ort/.gradle/caches/6.1.1/scripts-remapped/init6827945672182141713_dalsh2ke4l7t95yre0sq4vqm/8gww9monnpj8insyuwtn79luj/cp_init3607aee355f62839c5e6f549478ccc87).
  Caused by: CacheOpenException: Could not open cp_init remapped class cache for 8gww9monnpj8insyuwtn79luj (/home/ort/.gradle/caches/6.1.1/scripts-remapped/init6827945672182141713_dalsh2ke4l7t95yre0sq4vqm/8gww9monnpj8insyuwtn79luj/cp_init3607aee355f62839c5e6f549478ccc87).
      Caused by: CacheOpenException: Could not open cp_init generic class cache for initialization script '/tmp/ort-Gradle3645624542767368777/init6827945672182141713.gradle' (/home/ort/.gradle/caches/6.1.1/scripts/8gww9monnpj8insyuwtn79luj/cp_init/cp_init3607aee355f62839c5e6f549478ccc87).
          Caused by: NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
Writing analyzer result to '/project/ort/analyzer-result.yml'.
The analysis took 1m 24.671009904s.
Found 1 project(s) and 0 package(s) in total (not counting excluded ones).
Applied 0 curation(s) from 2 provider(s).
Resolved issues: 0 errors, 0 warnings, 0 hints.
Unresolved issues: 1 error, 0 warnings, 0 hints.
There is 1 unresolved issue with a severity equal to or greater than the WARNING threshold.

I suspect this is due to java version incompatibility between ort container (which is 17.0.6) and project's java version 1.8 ( as mentioned in build.gradle#L6 )

But I may be wrong. what will be the solution if version incompatibility is the case?

@sschuberth
Copy link
Member

what will be the solution if version incompatibility is the case?

You need to build a custom Docker image which set the JAVA_VERSION build argument to 8. Also see 29d6e76.

@sschuberth sschuberth added question An issue that is actually a question analyzer About the analyzer tool docker About Docker topics labels Apr 2, 2023
@dineshr93
Copy link
Contributor Author

dineshr93 commented Apr 2, 2023

what will be the solution if version incompatibility is the case?

You need to build a custom Docker image which set the JAVA_VERSION build argument to 8. Also see 29d6e76.

I set it to 8 and built again, gradle threw incompatibility error

#0 819.9                   - Doesn't say anything about its target Java version (required compatibility with Java 8)
#0 819.9                   - Doesn't say anything about its elements (required them packaged as a jar)
#0 819.9                   - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
#0 819.9 
#0 819.9 * Try:
#0 819.9 > Run with --info or --debug option to get more log output.
#0 819.9 > Run with --scan to get full insights.
#0 819.9 
#0 819.9 * Exception is:
#0 819.9 org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'oss-review-toolkit'.

...
...


#0 820.0 Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0.
#0 820.0 Required by:
#0 820.0     project : > com.autonomousapps.dependency-analysis:com.autonomousapps.dependency-analysis.gradle.plugin:1.19.0
#0 820.0 Caused by: org.gradle.internal.component.NoMatchingConfigurationSelectionException: No matching variant of com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.0.2' but:
#0 820.0   - Variant 'apiElements' capability com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0 declares a library, packaged as a jar, and its dependencies declared externally:
#0 820.0       - Incompatible because this component declares a component for use during compile-time, compatible with Java 11 and the consumer needed a component for use during runtime, compatible with Java 8
#0 820.0       - Other compatible attribute:
#0 820.0           - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
#0 820.0   - Variant 'javadocElements' capability com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0 declares a component for use during runtime, and its dependencies declared externally:
#0 820.0       - Incompatible because this component declares documentation and the consumer needed a library
#0 820.0       - Other compatible attributes:
#0 820.0           - Doesn't say anything about its target Java version (required compatibility with Java 8)
#0 820.0           - Doesn't say anything about its elements (required them packaged as a jar)
#0 820.0           - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
#0 820.0   - Variant 'runtimeElements' capability com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
#0 820.0       - Incompatible because this component declares a component, compatible with Java 11 and the consumer needed a component, compatible with Java 8
#0 820.0       - Other compatible attribute:
#0 820.0           - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
#0 820.0   - Variant 'sourcesElements' capability com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0 declares a component for use during runtime, and its dependencies declared externally:
#0 820.0       - Incompatible because this component declares documentation and the consumer needed a library
#0 820.0       - Other compatible attributes:
#0 820.0           - Doesn't say anything about its target Java version (required compatibility with Java 8)
#0 820.0           - Doesn't say anything about its elements (required them packaged as a jar)
#0 820.0           - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
#0 820.0        at org.gradle.internal.component.model.AttributeConfigurationSelector.selectVariantsUsingAttributeMatching(AttributeConfigurationSelector.java:113)
#0 820.0        at org.gradle.internal.component.model.AttributeConfigurationSelector.selectVariantsUsingAttributeMatching(AttributeConfigurationSelector.java:51)
#0 820.0        at org.gradle.internal.component.external.model.ConfigurationBoundExternalDependencyMetadata.selectVariants(ConfigurationBoundExternalDependencyMetadata.java:110)

Changed the version to 8 batect.yml#LL47C12-L47C13 and tried. Threw below error

#0 372.1 BUILD FAILED in 10s
------
ERROR: failed to solve: executor failed running [/bin/sh -c export GRADLE_USER_HOME=/var/tmp/gradle     && sudo chown -R "$USER". ${HOME}/src/ort /var/tmp/gradle     && scripts/set_gradle_proxy.sh     && ./gradlew --no-daemon --stacktrace     -Pversion=$ORT_VERSION     :cli:installDist     :helper-cli:startScripts     && mkdir /opt/ort     && cp -a ${HOME}/src/ort/cli/build/install/ort /opt/     && cp -a ${HOME}/src/ort/scripts/*.sh /opt/ort/bin/     && cp -a ${HOME}/src/ort/helper-cli/build/scripts/orth /opt/ort/bin/     && cp -a ${HOME}/src/ort/helper-cli/build/libs/helper-cli-*.jar /opt/ort/lib/]: exit code: 1

@sschuberth
Copy link
Member

sschuberth commented Apr 2, 2023

I set it to 8 and built again, gradle threw incompatibility error

Yeah, that's now #4694 (which has a solution upcoming in #6782).

Changed the version to 8 batect.yml#LL47C12-L47C13 and tried. Threw below error

Batect is only used to run (function) tests as part of CI. It's not related to the Docker image build for running ORT as a user.

@dineshr93
Copy link
Contributor Author

dineshr93 commented Apr 4, 2023

Since #6782 is mergerd I updated the java version to 8 and tried to build the docker again. I got below snapshots of errored log

Setting ORT_VERSION to 834f86bbe3-dirty.
[+] Building 546.3s (54/71)

=> ERROR [ortbuild 2/2] RUN --mount=type=cache,target=/var/tmp/gradle --mount=type=bind,target=/home/ort/src/ort,rw export GRADLE_USER_HOM 526.7s


------
 > [ortbuild 2/2] RUN --mount=type=cache,target=/var/tmp/gradle     --mount=type=bind,target=/home/ort/src/ort,rw     export GRADLE_USER_HOME=/var/tmp/gradle     && sudo chown -R "ort". /home/ort/src/ort /var/tmp/gradle     && scripts/set_gradle_proxy.sh     && ./gradlew --no-daemon --stacktrace         -Pversion=834f86bbe3-dirty         :cli:installDist         :helper-cli:startScripts     && mkdir /opt/ort     && cp -a /home/ort/src/ort/cli/build/install/ort /opt/     && cp -a /home/ort/src/ort/scripts/*.sh /opt/ort/bin/     && cp -a /home/ort/src/ort/helper-cli/build/scripts/orth /opt/ort/bin/     && cp -a /home/ort/src/ort/helper-cli/build/libs/helper-cli-*.jar /opt/ort/lib/:
#0 457.8 To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/8.0.2/userguide/gradle_daemon.html#sec:disabling_the_daemon.
#0 465.3 Daemon will be stopped at the end of the build
#0 507.6
#0 507.6 FAILURE: Build failed with an exception.
#0 507.6
#0 507.6 * What went wrong:
#0 507.6 A problem occurred configuring root project 'oss-review-toolkit'.
#0 507.6 > Could not resolve all files for configuration ':classpath'.
#0 507.6    > Could not resolve com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0.
#0 507.6      Required by:
#0 507.6          project : > com.autonomousapps.dependency-analysis:com.autonomousapps.dependency-analysis.gradle.plugin:1.19.0
#0 507.6       > No matching variant of com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.0.2' but:
#0 507.6           - Variant 'apiElements' capability com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0 declares a library, packaged as a jar, and its dependencies declared externally:
#0 507.6               - Incompatible because this component declares a component for use during compile-time, compatible with Java 11 and the consumer needed a component for use during runtime, compatible with Java 8
#0 507.6               - Other compatible attribute:
#0 507.6                   - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
#0 507.6           - Variant 'javadocElements' capability com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0 declares a component for use during runtime, and its dependencies declared externally:
#0 507.6               - Incompatible because this component declares documentation and the consumer needed a library
#0 507.6               - Other compatible attributes:
#0 507.6                   - Doesn't say anything about its target Java version (required compatibility with Java 8)
#0 507.6                   - Doesn't say anything about its elements (required them packaged as a jar)
#0 507.6                   - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
#0 507.6           - Variant 'runtimeElements' capability com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
#0 507.6               - Incompatible because this component declares a component, compatible with Java 11 and the consumer needed a component, compatible with Java 8
#0 507.6               - Other compatible attribute:
#0 507.6                   - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
#0 507.6           - Variant 'sourcesElements' capability com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0 declares a component for use during runtime, and its dependencies declared externally:
#0 507.6               - Incompatible because this component declares documentation and the consumer needed a library
#0 507.6               - Other compatible attributes:
#0 507.6                   - Doesn't say anything about its target Java version (required compatibility with Java 8)
#0 507.6                   - Doesn't say anything about its elements (required them packaged as a jar)
#0 507.6                   - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
#0 507.6
#0 507.6 * Try:
#0 507.6 > Run with --info or --debug option to get more log output.
#0 507.6 > Run with --scan to get full insights.
#0 507.6
#0 507.6 * Exception is:
#0 507.6 org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'oss-review-toolkit'.
#0 507.6        at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:84)
#0 507.6        at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:77)

#0 507.7 Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':classpath'.
#0 507.7        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.mapFailure(DefaultConfiguration.java:1595)
#0 507.7        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access$3900(DefaultConfiguration.java:166)
#0 50

#0 507.7 Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0.
#0 507.7 Required by:
#0 507.7     project : > com.autonomousapps.dependency-analysis:com.autonomousapps.dependency-analysis.gradle.plugin:1.19.0
#0 507.7 Caused by: org.gradle.internal.component.NoMatchingConfigurationSelectionException: No matching variant of com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.0.2' but:
#0 507.7   - Variant 'apiElements' capability com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0 declares a library, packaged as a jar, and its dependencies declared externally:
#0 507.7       - Incompatible because this component declares a component for use during compile-time, compatible with Java 11 and the consumer needed a component for use during runtime, compatible with Java 8
#0 507.7       - Other compatible attribute:
#0 507.7           - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
#0 507.7   - Variant 'javadocElements' capability com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0 declares a component for use during runtime, and its dependencies declared externally:
#0 507.7       - Incompatible because this component declares documentation and the consumer needed a library
#0 507.7       - Other compatible attributes:
#0 507.7           - Doesn't say anything about its target Java version (required compatibility with Java 8)
#0 507.7           - Doesn't say anything about its elements (required them packaged as a jar)
#0 507.7           - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
#0 507.7   - Variant 'runtimeElements' capability com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
#0 507.7       - Incompatible because this component declares a component, compatible with Java 11 and the consumer needed a component, compatible with Java 8
#0 507.7       - Other compatible attribute:
#0 507.7           - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
#0 507.7   - Variant 'sourcesElements' capability com.autonomousapps:dependency-analysis-gradle-plugin:1.19.0 declares a component for use during runtime, and its dependencies declared externally:
#0 507.7       - Incompatible because this component declares documentation and the consumer needed a library
#0 507.7       - Other compatible attributes:
#0 507.7           - Doesn't say anything about its target Java version (required compatibility with Java 8)
#0 507.7           - Doesn't say anything about its elements (required them packaged as a jar)
#0 507.7           - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.2')
#0 507.7        at org.gradle.internal.component.model.AttributeConfigurationSelector.selectVariantsUsingAttributeMatching(AttributeConfigurationSelector.java:113)
#0 507.7 * Get more help at https://help.gradle.org
#0 507.7
#0 507.7 BUILD FAILED in 54s
------
ERROR: failed to solve: executor failed running [/bin/sh -c export GRADLE_USER_HOME=/var/tmp/gradle     && sudo chown -R "$USER". ${HOME}/src/ort /var/tmp/gradle     && scripts/set_gradle_proxy.sh     && ./gradlew --no-daemon --stacktrace         -Pversion=$ORT_VERSION         :cli:installDist         :helper-cli:startScripts     && mkdir /opt/ort     && cp -a ${HOME}/src/ort/cli/build/install/ort /opt/     && cp -a ${HOME}/src/ort/scripts/*.sh /opt/ort/bin/     && cp -a ${HOME}/src/ort/helper-cli/build/scripts/orth /opt/ort/bin/     && cp -a ${HOME}/src/ort/helper-cli/build/libs/helper-cli-*.jar /opt/ort/lib/]: exit code: 1

@sschuberth
Copy link
Member

Sorry, I got confused with Java versions myself: ORT (even before 29d6e76) did not support Java 8 anymore. The lowest Java version we support is 11.

@dineshr93
Copy link
Contributor Author

Hi @sschuberth Thanks. One more question. We have gradle projects which have own devenv (with custom gradle config properties). We have to source /custom_devenv.sh for the build to be successful. How to use ort docker to analyze the project in that case ?

@sschuberth
Copy link
Member

ORT (even before 29d6e76) did not support Java 8 anymore.

Yet one more clarification on this: We did never support building ORT / the Docker image with Java 8. However, you might be lucky to be able to build with Java 11, and still be able to analyze Java 8 projects. Just give it a try.

We have to source /custom_devenv.sh for the build to be successful. How to use ort docker to analyze the project in that case ?

You only chance is to run that script manually then before starting the analysis. Besides, I believe it's really bad engineering practice if running such a script is necessary in the first place. Gradle is powerful enough to offer completely self-contained one-step builds.

@dineshr93
Copy link
Contributor Author

ORT (even before 29d6e76) did not support Java 8 anymore.

Yet one more clarification on this: We did never support building ORT / the Docker image with Java 8. However, you might be lucky to be able to build with Java 11, and still be able to analyze Java 8 projects. Just give it a try.

This worked! Thanks for the guidance.

We have to source /custom_devenv.sh for the build to be successful. How to use ort docker to analyze the project in that case ?

You only chance is to run that script manually then before starting the analysis. Besides, I believe it's really bad engineering practice if running such a script is necessary in the first place. Gradle is powerful enough to offer completely self-contained one-step builds.

Yes indeed! I ll check how to handle this. I'll close this issue

@dineshr93
Copy link
Contributor Author

Hi @sschuberth One more question. How to get inside a docker to execute some commands? I think bash is not there in the docker image built. ?

@sschuberth
Copy link
Member

I think bash is not there in the docker image built.

Yes it is. As you can see here, the base image is just Ubuntu.

But please, do not hijack this issue for further unrelated questions, but start a dedicated discussion for each question that you might have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer About the analyzer tool docker About Docker topics question An issue that is actually a question
Projects
None yet
Development

No branches or pull requests

2 participants