Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Compile Maven Project with Guava using j2cl-maven-plugin #270

Open
loveslikey opened this issue Oct 17, 2024 · 0 comments
Open

Comments

@loveslikey
Copy link

I am currently working on a project where I'm attempting to use the j2cl-maven-plugin to compile Java code for use in a browser environment. I've noticed that in the official demo, bazel-helloworld, libraries like Guava are being utilized successfully. However, when I try to import these same libraries (e.g., Guava ) into my Maven project using the j2cl-maven-plugin, the compilation fails.
I've searched for documentation or examples that might explain how to properly include these libraries in a Maven project with j2cl-maven-plugin, but haven't found anything relevant.

Could you please provide guidance on how to successfully use libraries like Guava with j2cl-maven-plugin in a Maven project? Is there a special configuration or additional steps that I need to follow?

Thank you for your assistance!

Error info:
ImmutableList cannot be resolved to a type [ERROR] com.major.j2cl:acss:1.0-SNAPSHOT/transpiled_js: Error:E:\project\idea_speace\j2clDemo\target\gwt3BuildCache\...\stripped_sources\App.java:39: ImmutableList cannot be resolved

maven dependency
<dependency>\n <groupId>com.google.guava</groupId> <artifactId>guava-gwt</artifactId> <version>32.1.1-jre</version> </dependency>

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

No branches or pull requests

1 participant