opencaesar / owl-adapter

The OML adapter for OWL
Apache License 2.0
0 stars 2 forks source link

[BUG] - Currently the adapter may only be built with a very old version of Gradle (4.x) -- attempts to build with Gradle 6 fail. #28

Closed JWT007 closed 3 years ago

JWT007 commented 3 years ago

Description

It is currently only possible to build the oml2owl adapter with a very old version of Gradle (4.10.3).

Steps to Reproduce

Steps to reproduce the behavior:

Expected Behavior

Builds should work with modern versions of gradle (ie. 6.5.1)

FAILS

[/c/JWT/DEV/CAESAR/REPO/owl-adapter/owl-adapter][A306518]  $ gradle --version

------------------------------------------------------------
Gradle 6.5.1
------------------------------------------------------------

Build time:   2020-06-30 06:32:47 UTC
Revision:     66bc713f7169626a7f0134bf452abde51550ea0a

Kotlin:       1.3.72
Groovy:       2.5.11
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          1.8.0_221 (Oracle Corporation 25.221-b11)
OS:           Windows 10 10.0 amd64

[/c/JWT/DEV/CAESAR/REPO/owl-adapter/owl-adapter][A306518]  $ gradle build

FAILURE: Build failed with an exception.

* Where:
Script 'C:\JWT\DEV\CAESAR\REPO\owl-adapter\owl-adapter\gradle\maven-deployment.gradle' line: 51

* What went wrong:
A problem occurred evaluating script.
> Could not get unknown property 'distZip' for object of type org.gradle.api.publish.maven.internal.publication.DefaultMavenPublication.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 2s

SUCCEEDS

[/c/JWT/DEV/CAESAR/REPO/owl-adapter/owl-adapter][A306518]  $ /c/Software/gradle-4.10.3/bin/gradle --version

------------------------------------------------------------
Gradle 4.10.3
------------------------------------------------------------

Build time:   2018-12-05 00:50:54 UTC
Revision:     e76905e3a1034e6f724566aeb985621347ff43bc

Kotlin DSL:   1.0-rc-6
Kotlin:       1.2.61
Groovy:       2.4.15
Ant:          Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM:          1.8.0_221 (Oracle Corporation 25.221-b11)
OS:           Windows 10 10.0 amd64

[/c/JWT/DEV/CAESAR/REPO/owl-adapter/owl-adapter][A306518]  $ /c/Software/gradle-4.10.3/bin/gradle build
> Task :oml2owl:generateXtext

> Task :oml2owl:compileJava
Note: C:\JWT\DEV\CAESAR\REPO\owl-adapter\owl-adapter\oml2owl\src\main\xtend-gen\io\opencaesar\oml2owl\utils\OwlApi.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :oml2owl:createVersion
> Task :oml2owl:pluginDescriptors
> Task :oml2owl:processResources
> Task :oml2owl:classes
> Task :oml2owl:jar
> Task :oml2owl:startScripts
> Task :oml2owl:distTar
> Task :oml2owl:distZip
> Task :oml2owl:javadoc
> Task :oml2owl:javadocJar
> Task :oml2owl:sourcesJar
> Task :oml2owl:assemble
> Task :oml2owl:pluginUnderTestMetadata
> Task :oml2owl:generateTestXtext
> Task :oml2owl:compileTestJava
> Task :oml2owl:processTestResources
> Task :oml2owl:testClasses
> Task :oml2owl:test
> Task :oml2owl:validateTaskProperties
> Task :oml2owl:check
> Task :oml2owl:build

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 26s
18 actionable tasks: 18 executed
melaasar commented 3 years ago

I noticed that you build using "gradle" and not "gradlew" (gradle wrapper) as the instructions suggest. The latter allows using a bundled gradle version that has been tested for the project, as opposed to whatever is installed on the build machine. Is there a reason why you build with gradle vs. gradlew?

Anyway, I upgraded the gradlew to version 6.5.1, so this should be OK now for both cases.

JWT007 commented 3 years ago

habit I guess ... I usually run 'gradle' to perform the full build as defined instead of 'gradlew' to run the wrapper.

but now it is up-to-date either way :) which should be a good thing!

Closing the issue. Thanks Maged!