gradle-processes icon indicating copy to clipboard operation
gradle-processes copied to clipboard

Could not find property 'Fork' on root project XXX

Open meltzow opened this issue 9 years ago • 6 comments

after installed like describe I got an error (see headline) gradleWrapperVersion=2.3

any ideas why?

meltzow avatar May 06 '15 11:05 meltzow

Also getting this with JavaFork, any clue?

UPDATE: you need to import it

tsouza avatar Jul 27 '15 15:07 tsouza

I have the same problem, yet I can't fix it by importing the class. This is using gradle 2.7.

I tried using both approaches that are published here: https://plugins.gradle.org/plugin/com.github.johnrengelman.processes

Always returns the following:

Could not find property 'JavaFork' on project

kungfoo avatar Oct 21 '15 15:10 kungfoo

As @tsouza pointed out, you need to import the Fork/JavaFork task in your build file:

import com.github.jengelman.gradle.plugins.processes.tasks.*

ChristophSchaal avatar Jan 14 '16 14:01 ChristophSchaal

Similar to @kungfoo, I'm importing it as well, using the import string provided by @ChristophSchall and still getting the same error. (Using Gradle 2.11)

import org.gradle.internal.os.OperatingSystem;
import com.github.jengelman.gradle.plugins.processes.tasks.*
...
project.plugins.each {
    println it
}

task runJavaServer(type: JavaFork) {
    main = 'com.something.JavaServer'
    classpath = sourceSets.main.runtimeClasspath
    jvmArgs "-Xmx1g"
    args "--someArgs"
}

But still getting this output (the plugins are printed out to show that it is being imported):

gradle runJavaServer
org.gradle.api.plugins.HelpTasksPlugin@58da76
com.dorongold.gradle.tasktree.TaskTreePlugin@46a59486
com.github.jengelman.gradle.plugins.processes.ProcessesPlugin@688a9d9e
org.gradle.api.plugins.ReportingBasePlugin@647225b0
org.gradle.testing.jacoco.plugins.JacocoPlugin@518eea9a
org.gradle.language.base.plugins.LifecycleBasePlugin@685ec827
org.gradle.api.plugins.BasePlugin@1b2caac2
org.gradle.language.base.plugins.LanguageBasePlugin@64ee13f
org.gradle.platform.base.plugins.BinaryBasePlugin@6e1a8535
org.gradle.api.plugins.JavaBasePlugin@bcbc73
org.gradle.api.plugins.JavaPlugin@370bf5a4

FAILURE: Build failed with an exception.

* Where:
Script '/code/full-tree/trunk/backend/functions.gradle' line: 79

* What went wrong:
A problem occurred evaluating script.
> Could not find property 'JavaFork' on root project 'backend'.

@johnrengelman Any thoughts?

SeamusReynolds avatar Mar 02 '16 18:03 SeamusReynolds

also seeing this on gradle 2.11 with Fork works fine on 2.10

a1dutch avatar Mar 09 '16 08:03 a1dutch

I'm seeing this with gradle 5.5

ddelponte avatar Jul 25 '19 22:07 ddelponte