Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Eclipse Maven Project exporting as Maven Project
Eclipse Maven Project exporting as Maven Project [message #1800525] Tue, 01 January 2019 12:00 Go to next message
Benjamin F is currently offline Benjamin FFriend
Messages: 2
Registered: January 2019
Junior Member
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 #1800542 is a reply to message #1800525] Wed, 02 January 2019 05:13 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30896
Registered: July 2009
Senior Member
Sorry, but this doesn't seem so sensible to me. By "remove Eclipse dependencies" I assume you don't mean the actual dependencies of the project, as specified in the MANIFEST.MF, but rather something else. But what that something else is, isn't at all clear. Nor is it clear how these "Eclipse dependencies" are related to Git and more specifically what is confusing about the EGit UI compared to what you can do with a Git command line; they should both behave the same way, i.e., show you what's changed and allow you to stage and unstage those things to commit them. So you should be able to use the Git command line without changing the structure/content of your projects. Is that not the case? If not, why not, and what did you want to "remove" so that it will be the case?

Re: Eclipse Maven Project exporting as Maven Project [message #1800567 is a reply to message #1800542] Wed, 02 January 2019 14:58 Go to previous messageGo to next message
Benjamin F is currently offline Benjamin FFriend
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 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30896
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.
Previous Topic:How to copy console rext ?
Next Topic:How To Make Single Line Comments Start At Col 105
Goto Forum:
  


Current Time: Sat Feb 22 16:16:46 GMT 2020

Powered by FUDForum. Page generated in 0.03180 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top