Reputation: 2240
I have a very annoying and unexplainable behaviour in IntelliJ 2016.1:
If using Gradle copy task in a build file IntelliJ adds upon any edit in this file this import on top:
com.sun.org.apache.xalan.internal.xsltc.compiler.Copy
which is of course not necessary since this task is built-in Gradle. Upon execution this leads to this error:
Cannot create task of type 'Copy' as it does not implement the Task interface.
Copy Task is just a simple one like this:
task copyNodeModules(type: Copy) {
group="_webapp"
from('./src/main/ts/node_modules') {
include '**/*'
exclude '**/lite-server'
exclude '**/json-server'
exclude '**/.bin'
}
into project.buildDir.path + '/resources/someFolder'
}
Upvotes: 23
Views: 2794
Reputation: 51
check your build.gradle see if it contains at the 1st line, just remove this line will fix the issue.
import com.sun.org.apache.xalan.internal.xsltc.compiler.Copy
Upvotes: 2
Reputation: 16615
Going to
Settings -> Auto Import -> Exclude from auto import and completion
and adding
'com.sun.org.apache.xalan.internal.xsltc.compiler'
fixed this for me.
Upvotes: 18