Eclipse Maven Project exporting as Maven Project [message #1800525] |
Tue, 01 January 2019 07:00  |
Eclipse User |
|
|
|
Greetings community and a happy new year,
I would like to know if it is possible to export an Eclipse - Maven - project as pure Maven project (XText Projects)?
(removing all Eclipse dependencies, project setting files whatever overhead Eclipse creates)
=> Intentions
This weird git plugin Eclipse uses is confusing me and when I am able to automatically remove all the project dependencies I am able to use git from command line manually.
So I plan to do sth. in my eclipse workspace on the project - export it as pure Maven project, so that builds, tests, clean ups can also be run just using Maven via command line. Afterwards, I can add it to git and later pull a new version created maybe by somebody else. This pulled version can afterwards imported as maven project into my eclipse workspace and after changing sth. I am able to export it again to the git branch.
Rather complicated expedition but I couldn't imagine a better way without getting annoyed by weird IDE dependencies I don't understand. Also this graphical git interface is just awkward...
Thank you very much in advance.
|
|
|
|
|
Re: Eclipse Maven Project exporting as Maven Project [message #1800592 is a reply to message #1800567] |
Thu, 03 January 2019 00:30  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.14130 seconds