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

Maven -> Update Projects vs checked in files #2227

Open
cdietrich opened this issue Apr 16, 2023 · 13 comments
Open

Maven -> Update Projects vs checked in files #2227

cdietrich opened this issue Apr 16, 2023 · 13 comments

Comments

@cdietrich
Copy link
Contributor

Maven -> Update Projects changes checked in files .classpath, .project. these might also leave projects uncompilable e.g. generatorxxx folders in xtend.core vanish

we should check what we can do about this

@LorenzoBettini
Copy link
Contributor

Yes, I know. In fact, in oomph setup I disabled the corresponding options. As far as I know, there are a few open bugs in m2e. For the moment, there's not much we can do about that.

Concerning the generator folders in xtend core maybe we can configure build helper maven plugin appropriately to add those folders as source folders..

@HannesWell
Copy link
Contributor

On my Windows computer I also notice that some extend files are generated with different line separators in strings compared to how they are committed. This leads to about 8 changed files in my Git-Staging when I run a full workspace build.
I wonder if those xtend-generated files can be ignored by git, if they are generated anyways.

Yes, I know. In fact, in oomph setup I disabled the corresponding options. As far as I know, there are a few open bugs in m2e. For the moment, there's not much we can do about that.

Can you point me to the exact bugs?

@cdietrich
Copy link
Contributor Author

Regarding Xtend

#2293
xtext/xtext-monorepo#12

@LorenzoBettini
Copy link
Contributor

Can you point me to the exact bugs?

IIRC,
eclipse-m2e/m2e-core#1200
eclipse-m2e/m2e-core#1239
eclipse-m2e/m2e-core#1278

@LorenzoBettini
Copy link
Contributor

Concerning generatorxxx folders in xtend.core, I guess that is due to the build.properties:

src.excludes = generator/,\
               generator-xtend-gen/

and I guess we want it that way?

@cdietrich
Copy link
Contributor Author

we want to have this a source folders but not package. also building with maven is not a must

@LorenzoBettini
Copy link
Contributor

I don't understand the last part.

@cdietrich
Copy link
Contributor Author

cdietrich commented Apr 19, 2023

we dont run the workflow from maven. so there is no strict need to compile with maven. i also dont know if it would cause of the jflex thing.
also strictly the generator stuff and the rest would need to be compiled in 2 steps

@LorenzoBettini
Copy link
Contributor

but I don't understand what you propose...

@cdietrich
Copy link
Contributor Author

cdietrich commented Apr 19, 2023

i propose nothing. i dont know a solution yet.

@szarnekow
Copy link
Contributor

Is it possible in maven to have something next to src/main and src/test? What we effectively need is src/generator, so a source folder that is neither test nor production.

@mickaelistria
Copy link

The issue comes from m2e, as linked by @LorenzoBettini earlier. PRs to fix that in m2e would be highly welcome!

@mickaelistria
Copy link

FWIW, I investigated it in m2e and the .project changes proposed by m2e do happen from time to time, but are stable: as long as the Maven Nature is present and Maven Builder is the last one defined in the .project, m2e shouldn't modify the .project. So maybe you can just commit those .project is m2e has "fixed" them (it can happen eg if you enable another builder, it usually becomes the last on the list and then m2e will want to modify your .project as long as it's not the last one running).
For the .classpath, I would recommend that one usually does not check them into SCM unless they have specific manually maintained configuration in those. If the pom.xml are configured in a standard enough way, the .classpath will always be correct and regenerated on project update. So it's often better to just not check it in and .gitignore it.

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

5 participants