cincheo / jsweet

A Java to JavaScript transpiler.
http://www.jsweet.org
Other
1.45k stars 160 forks source link

[JSweet 3 + J4TS] package exists in another module #599

Closed rfvbgt54 closed 3 years ago

rfvbgt54 commented 4 years ago

I get a lot of errors starting with

> package exists in another module: java.desktop at C\:Users\...\xxx.java

i do not know how i came over it.

pom.xml is following.

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jsweet</groupId>
            <artifactId>jsweet-core</artifactId>
            <version>5-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.jsweet</groupId>
            <artifactId>j4ts</artifactId>
            <version>0.7.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.jsweet.candies.j4ts</groupId>
            <artifactId>j4ts-file</artifactId>
            <version>0.0.1-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.jsweet.candies</groupId>
            <artifactId>jquery</artifactId>
            <version>1.10.0-20170726</version>
        </dependency>
    </dependencies>

※Other Infomation ・jsweet.transpiler.version  3.0.0-RC2 ・jsweet-maven-plugin    3.0.0-RC2

lgrignon commented 4 years ago

Thanks for reporting @rfvbgt54 Actually JSweet 3 is not compatible with j4ts.

This is something we want to fix at some point because many users need J4TS.

In the mean time, I recommend you either to use JSweet 2.3.x with J4TS and Java 8, or using JSweet 3 without J4TS.

Would it work for you?

Porting J4TS for JSweet is maybe not that hard but we did not succeed yet, and contributions are welcomed on this topic.

lgrignon commented 3 years ago

Hello @rfvbgt54 Eventually, after several discussions in the team, j4ts will be supported with JSweet 3.

lgrignon commented 3 years ago

Done: https://github.com/lgrignon/j4ts-example/