|
|
Re: Eclipse Maven Project exporting as Maven Project [message #1800567 is a reply to message #1800542] |
Wed, 02 January 2019 14:58 |
Benjamin F Messages: 2 Registered: January 2019 |
Junior Member |
|
|
Okay sorry,
I was pretty imprecisely mostly because fear of a big IDE like Eclipse dominated my first contribution.
I had to work often with eclipse and when you develop for example JavaEE projects it is very difficult to separate eclipse project files (e.g. this MANIFEST.MF) and other stuff injected by the IDE and the actually relevant files that are necessary to run the code. I am never 100% sure what can be removed and which parts are necessary for the project. This problem doesn't exist when you for example setup a project via a Maven archetype. In this case you can just make a "mvn clean" and track all remaining files to commit and push to your Git.
I am currently learning to use XText, Xtend and so on. It is difficult for me to determine which files are necessary and which are redundant so I am in this case not sure which exactly I have to track.
Another point is, that I would like to be able to build and manage my project w/o Eclipse. I noticed that this is not always the case (even with added Maven nature (in JavaEE Projects) ). So Some projects created with Eclipse and I've tried to execute only with Maven and there were a lot of problems which I had to fix first. When I create a web project via a Maven Archetype and later add it as Maven Project to Eclipse (my preferred way) I never had any problems. Except for some warnings or even error messages but these I could always just ignore and still everything worked.
You say that all Eclipse dependent files that are not necessary for the project itself are denoted in "MANIFEST.MF" is there a way to automatically add these to my ignore-list?
PS.: EGit - last time I used it is five years ago and I remember that cherry picking for example was horrible back then, can't tell you the details anymore. But we were five people none of us really managed to use it and be more productive so that we all decided that command line Git is the way to go. (Since than I always used Git via command line)
[Updated on: Thu, 03 January 2019 10:57] Report message to a moderator
|
|
|
Re: Eclipse Maven Project exporting as Maven Project [message #1800592 is a reply to message #1800567] |
Thu, 03 January 2019 05:30 |
Ed Merks Messages: 33113 Registered: July 2009 |
Senior Member |
|
|
Yes, Xtext generates a lot of code, much of which you can avoid tracking. But if you don't track them, something in your Maven build will still need to generate them; you'd be best off using the Xtext forum to ask about such things:
https://www.eclipse.org/forums/index.php/f/27/
No, I didn't say that all the files are tracked by the MANIFEST.MF, I suggested that dependencies are tracked in this way.
In my projects that use Xtext, e.g., Xcore, these are the files I ignored:
https://git.eclipse.org/c/emf/org.eclipse.emf.git/tree/plugins/org.eclipse.emf.ecore.xcore/.gitignore
So I mostly track all files (e.g., *.java files derived from *.xtend files, and also src-gen files) so that I don't have to generate them as part of my Maven build. And my Maven build uses Tycho so I can resolve dependencies directly from p2 repositories.
https://ci.eclipse.org/emf/
I found Git overall horribly complicated when I started, but its grown to seem intuitive. That's always the way things are. So I rarely use the command line, except when I want to script something. E.g., this script to "clean" a git repository#!/bin/sh
CWD=$PWD
for i in $(echo .git */.git); do
if [ -d $i ]; then
cd $i
cd ..
pwd
git reset --hard
git clean -xdf
git status
git pull
cd $CWD
fi
done
I'd suggest learning the Git UI and when something isn't comfortable, then use the command line. You don't need to use one or the other exclusively.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.06244 seconds