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

Compilation error in Eclipse/maven #265

Open
frankbenoit opened this issue Jan 7, 2022 · 0 comments
Open

Compilation error in Eclipse/maven #265

frankbenoit opened this issue Jan 7, 2022 · 0 comments

Comments

@frankbenoit
Copy link

I have a setup, where I use auto-value-gson in an Eclipse plugin project and with a maven build.
From Eclipse, the normal internal JDT build works.
On Jenkins, without Eclipse running parallel, this work.
But when i try to run the maven build from inside Eclipse, it fails:

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:2.5.0:compile (default-compile) on project xyz: 
Fatal error compiling: 1. ERROR: Failed to write external TypeAdapter for element "x.X" with reason 
"Source file already exists : x.X_GsonTypeAdapter"

In Eclipse I have a 'src' source directory with the annotated classes, and an 'apt-gen' source directory where the generated classes from auto-value and auto-value-gson are written to.
In maven, the generated classes are normally written into target\generated-sources\annotations

The maven build from inside Eclipse works, when I delete the content of the apt-gen directory.
This is not necessary for plugins, that use auto-value classes only.

It seems to me, that auto-value-gson somehow conflicts with the apt-gen directory. Can this be fixed please?

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