Struggling to install on Debian "Axelor" using source on Github

183 Views Asked by At

I'm trying to build "Axelor" I've followed all the steps for installing from source [Install on Linux :: Axelor][1] and have managed to succeed up until this point ./gradlew -x test build

But the build has failed and I'm not sure how or where to investigate to fix this, any help will be much appreciated.

Starting a Gradle Daemon (subsequent builds will be faster)
> Task :buildSrc:compileJava
> Task :buildSrc:compileGroovy NO-SOURCE
> Task :buildSrc:processResources NO-SOURCE
> Task :buildSrc:classes
> Task :buildSrc:jar
> Task :buildSrc:assemble
> Task :buildSrc:compileTestJava NO-SOURCE
> Task :buildSrc:compileTestGroovy NO-SOURCE
> Task :buildSrc:processTestResources NO-SOURCE
> Task :buildSrc:testClasses UP-TO-DATE
> Task :buildSrc:test NO-SOURCE
> Task :buildSrc:check UP-TO-DATE
> Task :buildSrc:build

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':war'.
> Could not resolve all task dependencies for configuration ':runtimeClasspath'.
   > Could not resolve project :modules:axelor-supplier-portal.
     Required by:
         project :
      > Unable to find a matching variant of project :modules:axelor-supplier-portal:
          - Variant 'apiElements' capability com.axelor.apps:axelor-supplier-portal:6.3.1:
              - Incompatible attributes:
                  - Required org.gradle.jvm.version '8' and found incompatible value '11'.
                  - Required org.gradle.usage 'java-runtime' and found incompatible value 'java-api'.
              - Other attributes:
                  - Found org.gradle.category 'library' but wasn't required.
                  - Required org.gradle.dependency.bundling 'external' and found compatible value 'external'.
                  - Required org.gradle.libraryelements 'jar' and found compatible value 'jar'.
          - Variant 'runtimeElements' capability com.axelor.apps:axelor-supplier-portal:6.3.1:
              - Incompatible attribute:
                  - Required org.gradle.jvm.version '8' and found incompatible value '11'.
              - Other attributes:
                  - Found org.gradle.category 'library' but wasn't required.
                  - Required org.gradle.dependency.bundling 'external' and found compatible value 'external'.
                  - Required org.gradle.libraryelements 'jar' and found compatible value 'jar'.
                  - Required org.gradle.usage 'java-runtime' and found compatible value 'java-
2

There are 2 best solutions below

0
On

Download java 8, and set up the JAVA_HOME to the installation location.

Alternatively, if you want java 8 for this project only, download and unpack/install java 8, got to the root folder of your project, add this line in settings.gradle

org.gradle.java.home=<path_to_java_8_install_dir>, careful, not to add the /bin at the end.

use ./gradlew instead of gradle to build.

Don't forget to change the compiler version to 8 in your IDE as well, else importing the project will generate errors.

0
On

This error message is telling you that the Required org.gradle.jvm.version '8' wasn't found, it found version 11 instead.

You'll want to download Java 8 (for this version, current versions use Java 11) and run export JAVA_HOME=/path/to/8/dir before retrying.