katalonPluginPackage task failed when executed across platforms

I have a Github project ksbackyard to develop my Katalon Studio custom keywords. I am trying to build a jar of keywords by Gradle as instructed in How to develop Custom Keywords Plugins

I have 2 enviroments to work on.

  1. Windows 7, Katalon Studio 6.0.6
  2. Mac OSX, Katalon Studio 5.10.1

I have worked out on my Windows environement for ksbackyard and successfully built a jar with the command:

$ gradle katalonPluginPackage

I pushed to code set to the remote repository.

Now I moved to my Mac environement, git pulled from the remote repository, and tried to build the jar on Mac by katalonPluginPackage, and got error.

STDOUT message: out.txt (130 Bytes)

STDERR message:err.txt (10.0 KB)


FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':compileClasspath'.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.kms.katalon.core_1.0.0.201903080806.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/configuration/resources/lib/bcpkix-jdk15on-1.58.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/configuration/resources/lib/bcprov-jdk15on-1.58.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/configuration/resources/lib/browsermob-core-2.1.5.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/configuration/resources/lib/dnsjava-2.1.8.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/configuration/resources/lib/java-client-5.0.4.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/configuration/resources/lib/jna-4.1.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/configuration/resources/lib/jna-platform-4.1.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/configuration/resources/lib/jzlib-1.1.3.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/configuration/resources/lib/kat-server.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/configuration/resources/lib/littleproxy-1.1.0-beta-bmp-17.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/configuration/resources/lib/mitm-2.1.5.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/configuration/resources/lib/netty-all-4.0.51.Final.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/configuration/resources/lib/repackaged-guava-19.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/configuration/resources/lib/repackaged-sikuli-api-1.0.2-standalone.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/configuration/resources/lib/selenium-leg-rc-3.7.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/configuration/resources/lib/selenium-server-standalone-3.7.1.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/configuration/resources/lib/testng-6.11.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/net.sf.supercsv.super-csv_2.1.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.apache.poi_3.9.0.v201405241750.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.apache.poi.ooxml_3.9.0.v201405241905.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.apache.poi.ooxml.schemas_3.9.0.v201405241750.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.dom4j_1.6.1.v201312101416.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.apache.commons.io_2.4.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.apache.commons.lang_2.6.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.apache.xmlbeans_2.6.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.google.gson_2.8.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.jsoup_1.7.2.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.mysql.jdbc_5.1.38.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.microsoft.sqlserver.sqljdbc4_4.1.5605.100.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.apache.commons.dbutils_1.6.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.oracle.jdbc.ojdbc7_12.1.0.2.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.postgresql.jdbc41_9.4.1208.jre7.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.eclipse.osgi_3.11.3.v20170209-1843.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.kms.katalon.constant_1.0.0.201903080806.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.eclipse.persistence.eclipselink_2.5.0.RC1.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.kms.katalon.selenium-standalone_1.0.0.201903080806.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/atu.testrecorder.screen-recorder_2.1.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.google.guava_23.0.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.kms.katalon.util_1.0.0.201903080806.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.apache.httpcomponents.httpclient_4.5.1.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.apache.httpcomponents.httpcore_4.4.4.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.apache.httpcomponents.httpmime_4.5.1.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.apache.commons.lang3_3.6.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.greenrobot.eventbus_3.1.1.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.assertj.core_3.10.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.junit_4.12.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.fasterxml.jackson.core.jackson-databind_2.9.1.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.fasterxml.jackson.core.jackson-core_2.9.6.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.fasterxml.jackson.core.jackson-annotations_2.9.1.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.slf4j.api_1.7.2.v20121108-1250.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/ch.qos.logback.classic_1.2.3.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/ch.qos.logback.core_1.2.3.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/slf4j.api_1.7.25.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.fusesource.jansi_1.17.1.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.kms.katalon.netlightbody_1.0.0.201903080806.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.apache.commons.codec_1.7.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.apache.commons.logging_1.2.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.hamcrest.core_1.3.0.v201303031735.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.beanshell.bsh_2.0.0.0b4.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.apache.ant.launcher_1.9.6.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.kms.katalon.core.appium_1.0.0.201903080806.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.eclipse.equinox.common_3.8.0.v20160509-1230.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.kms.katalon.core.webui_1.0.0.201903080806.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.json_20140107.0.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.kms.katalon.core.mobile_1.0.0.201903080806.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/org.apache.commons.validator_1.5.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.kms.katalon.core.cucumber_1.0.0.201903080806.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/io.cucumber.core_3.0.2.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/io.cucumber.datatable_1.0.3.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/io.cucumber.datatable-dependencies_1.0.3.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/io.cucumber.expressions_5.0.19.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/io.cucumber.gherkin_5.0.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/io.cucumber.html_0.2.7.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/io.cucumber.java_3.0.2.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/io.cucumber.tag-expressions_1.1.1.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/io.cucumber.junit_3.0.2.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.kms.katalon.core.webservice_1.0.0.201903080806.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/wsdl4j_1.6.2.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.google.oauth-client.google-oauth-client_1.22.0.jar' to a file.
> Cannot convert URL 'C:/Katalon_Studio_Windows_64-6.0.6/plugins/com.google.http-client.google-http-client_1.22.0.jar' to a file.
> Cannot convert URL 'C:/Users/qcq0264/katalon-workspace/ksbackyard/Drivers/ashot-1.5.4.jar' to a file.
> Cannot convert URL 'C:/Users/qcq0264/katalon-workspace/ksbackyard/Drivers/ImageDifference-0.8.0.jar' to a file.
> Cannot convert URL 'C:/Users/qcq0264/katalon-workspace/ksbackyard/Drivers/Materials-0.36.1.jar' to a file.
> Cannot convert URL 'C:/Users/qcq0264/katalon-workspace/ksbackyard/Drivers/thumbnailator-0.4.8.jar' to a file.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s

The message indicates that configuration information on Windows is recorded somewhere in the repository, transfered to my Mac environment, which caused gradle katalonPluginPackage on Mac to fail.

I do not see why this insident occurs.

@devalex88

Do you have any insight?

2 Likes

I tried

$ rm -rf .gradle
$ gradle katalonPluginPackage --refresh-dependencies

but the problem remained.

2 Likes

I tried $ gradle katalonPluginPackage --reflesh-dependencies --stacktrace
The prolem still remains. The stderr is attached: err2.txt (807.8 KB)
This shows many stacktraces but I could not find any clue in it.

ーーーーーーー

I can vaguely remember that I once included the <projectdir>/build/ and <projectdir>/.gradle/ directory into the git repository and pushed it to GitHub, because I forgot to insert lines

build/
.gradle/

into the <projectdir>/.gitignore file. I did it on my Windows PC. It it likely that I pulled the branch of this status to my Mac. This implies some configuration information in cache was transfered from my Windows machine to my Mac. Of course I corrected my .gitignore, and did $ git rm -r .gradle/ and git push already. Still I have the above mentioned error. I am wondering how to resolve this.

2 Likes

Please open the plugin project using KS first to repopulate the .classpath file. The package task use these paths to look up KS libraries. I should have emphasize it in the tutorial but I forgot.

Should I gitignore the .classpath file ? For exampl,

# Eclipse
.project
.classpath
.settings
1 Like

Yes I usually ignore it.

How do you deal with
.project

Do you include it, or exclude it?

2 Likes

I never tried excluding it. But this is an interesting question. I’ll try it later and let you know.

OK, I will follow you.

1 Like

You can ignore the .project file.