Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Gradle 5.1 > Cannot infer Scala class path because no Scala library Jar was found #81

Closed
ghilainm opened this issue Jan 17, 2019 · 4 comments

Comments

@ghilainm
Copy link

Hi guys,

I have used a simple setup following your conventions and got the following error:
Cannot infer Scala class path because no Scala library Jar was found

I have run gradle gatlingRun.

build.gradle:

plugins {
    id "com.github.lkishalmi.gatling" version "3.0.2"
}

gatling {
    toolVersion = '3.0.2'
    scalaVersion = '2.11.8'
    includeMainOutput = false
    includeTestOutput = false
    jvmArgs = [ '-server', '-Xms512M', '-Xmx512M' ]
}

Output of --dry-run

Configuration on demand is an incubating feature.
:system-tests:compileJava SKIPPED
:system-tests:compileScala SKIPPED
:system-tests:processResources SKIPPED
:system-tests:classes SKIPPED
:system-tests:compileTestJava SKIPPED
:system-tests:compileTestScala SKIPPED
:system-tests:processTestResources SKIPPED
:system-tests:testClasses SKIPPED
:system-tests:compileGatlingJava SKIPPED
:system-tests:compileGatlingScala SKIPPED
:system-tests:processGatlingResources SKIPPED
:system-tests:gatlingClasses SKIPPED
:system-tests:gatlingRun SKIPPED

I don't understand why the task :system-tests:compileTestScala is created as I have excluded mainOutput and testOutput .

It seems to be the culprit :).

Thx for your help.

@eshepelyuk
Copy link
Collaborator

eshepelyuk commented Jan 17, 2019

Have you tried with Gradle 4.x ? If not - plz do and report. Also plz attach project archive to be able to reproduce the issue.

@ghilainm
Copy link
Author

@eshepelyuk I didn't try with Gradle 4.X. My project was a minimal example, I can't unfortunately publish it. But I just applied the plugin as shown in your documentation and followed your conventions, nothing fancy. Did you find the issue?

@eshepelyuk
Copy link
Collaborator

Hello

  1. plz try in 4.x
  2. just obfuscate the code and send me a minimal project reproducing the bug, the project must contain gradle wrapper as well. Unfortunately this is a single way to debug the issues. Otherwise I won't be able to help.

@zeburek
Copy link

zeburek commented Oct 25, 2019

@eshepelyuk

Made a little investigation. Configuration like this breaks gatlingRun.

Removing scalaVersion from configuration and cleaning project makes it run again.

It seems that scalaVersion works wrong way. Tested on Gradle 5.3 and 4.10

plugins {
    id "com.github.lkishalmi.gatling" version "3.2.9"
}

repositories {
    mavenCentral()
}

group 'test'
version '0.0.1'

apply plugin: 'scala'

dependencies {
    compile 'org.scala-lang:scala-library:2.13.1'
}

gatling {
    toolVersion = '3.2.1'
    scalaVersion = '2.13.1'
    includeMainOutput = false
    includeTestOutput = false
}

I will reopen this issue because I've found a cause.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants