You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when scala is cross compiling java files, I get an duplicate class error:
Executing org.gradle.api.internal.tasks.scala.ZincScalaCompiler@23c084bd in compiler daemon.
Compiling with Zinc Scala compiler.
Compiling 1 Java source to /Users/ggr/Downloads/demo/build/classes/main...
/Users/ggr/.gradle/caches/modules-2/files-2.1/com.vaadin/vaadin-server/7.7.5/28bc909336b9b399d93926b99148ce66d1bf3ed3/vaadin-server-7.7.5.jar(com/vaadin/annotations/JavaScript.java):58: error: duplicate class: com.vaadin.annotations.JavaScript
public @interface JavaScript {
^
/Users/ggr/.gradle/caches/modules-2/files-2.1/com.vaadin/vaadin-server/7.7.5/28bc909336b9b399d93926b99148ce66d1bf3ed3/vaadin-server-7.7.5.jar(com/vaadin/server/Page.java):36: error: cannot access JavaScript
import com.vaadin.ui.JavaScript;
^
bad source file: /Users/ggr/.gradle/caches/modules-2/files-2.1/com.vaadin/vaadin-server/7.7.5/28bc909336b9b399d93926b99148ce66d1bf3ed3/vaadin-server-7.7.5.jar(com/vaadin/ui/JavaScript.java)
file does not contain class com.vaadin.ui.JavaScript
Please remove or make sure it appears in the correct subdirectory of the sourcepath.
Exception executing org.gradle.api.internal.tasks.scala.ZincScalaCompiler@23c084bd in compiler daemon: org.gradle.api.internal.tasks.compile.CompilationFailedException: javac returned nonzero exit code.
:compileScala FAILED
:compileScala (Thread[main,5,main]) completed. Took 4.81 secs.
When I remove the java files in the vaadin-server jar file, it works. When I only use java (no scala) it is also no problem, that java files are contained in the jar side to side with the class files.
Demo to reproduce problem is attached. Just extract, go in and type ./gradlew clean testClasses --info
The text was updated successfully, but these errors were encountered:
@lrytz said:
"Please remove or make sure it appears in the correct subdirectory of the sourcepath" sounds like gradle / zinc is passing /Users/ggr/.gradle/caches/modules-2/files-2.1/com.vaadin/vaadin-server/7.7.5/28bc909336b9b399d93926b99148ce66d1bf3ed3/vaadin-server-7.7.5.jar as -sourcepath.
Also, the error ("bad source file") seems to come from the Java compiler, not the Scala compiler. So it seems not to be a bug on our end.
Hi,
when scala is cross compiling java files, I get an duplicate class error:
When I remove the java files in the
vaadin-server
jar file, it works. When I only use java (no scala) it is also no problem, thatjava
files are contained in the jar side to side with the class files.Demo to reproduce problem is attached. Just extract, go in and type
./gradlew clean testClasses --info
The text was updated successfully, but these errors were encountered: