How to disable MyEclipse Maven capabilities?

Home Forums MyEclipse IDE Maven for MyEclipse (Maven4MyEclipse) How to disable MyEclipse Maven capabilities?

This topic contains 43 replies, has 19 voices, and was last updated by Profile photo of hoshposh hoshposh 5 years, 3 months ago.

Viewing 15 posts - 1 through 15 (of 44 total)
  • Author
    Posts
  • #286581
    Profile photo of trapongx
    trapongx
    Member

    I have SVNed web project created with ME 6.0.1 GA. I have m2eclipse installed and I “Enable Maven Dependencies” using m2eclipse’s menu.

    Now when I open this project on ME 6.5 I have an issues. m2eclipse doesn’t work anymore. No menu, no preference page, and dependencies not linked. I guess ME play a trick with it. How can I stop this.

    Even I change
    com.genuitec.eclipse.maven.maven2Nature
    back to
    org.maven.ide.eclipse.maven2Nature
    ,
    it doesn’t help. Maven not shown in Package Explorer but in project build path dialog. However, it’s empty.

    My situation is
    – Can’t go forward because ME 6.5, as announced, does not support Maven Capabilities on project created by older ME version or other tool. It only support project created by ME 6.5 and needed to have Maven capabilities checked on project creation.
    – Can’t go backward because m2eclipse not functioning.

    I can not head back to use ME 6.0.1 again because my Eclipse is managed by Pulse and it allow latest version of ME only.

    !!!!!

    #286652
    Profile photo of Riyad Kalla
    Riyad Kalla
    Member

    I think we can clear this up pretty quickly and the confusion is born out of 1 fundamental issue in 6.5: MyEclipse 6.5 includes a custom implementation of m2eclipse, so you can’t install m2eclipse along side MyEclipse 6.5 or later.

    The first step I would suggest is to remove m2eclipse completely and check your project out.

    NOTE: The suggested fix is to create a new project that has Maven enabled on it, and get it all setup correctly with the right dependencies then copy your original project artifacts into it, once it’s all setup you can either check that new project into your repo, or copy the entire project contents back (from the Navigator view so it includes all the hidden config files) back to the original project and then make sure it works and check it in.

    OR you can try and manually edit the project resource files to enable Maven on that project… this is totally unsupported and I would expect that it may not work… but you are welcome to try it. I wouldn’t suggest checking anything back in if you do this *until* you have completely confirmed that it worked.

    To get an idea of all the resources you need, create a new maven-ized MyEclipse project that you can refer to for the rest of my instructions. (Also use your Navigator view so you can see everything)

    You will need to copy across the maven builder and nature from the .project file. You will need to copy across the specialized .classpath entries as well. You might also want to take a look at the contents of the .settings directory and make sure your pom.xml is there in your project.

    AFter that, close and reopen your project, then Clean it (so it rebuilds)… make sure all is right with the world. Add any missing dependencies, etc.

    You should be good to go after that.

    Sorry for the trouble, at some point we want to add the “Add Maven Capabilities” option, but given how complex Maven setups can be, this opens a can of worms to some extent that have to be fully researched first.

    #286681
    Profile photo of jgrabow2
    jgrabow2
    Member

    Hi,

    I’ve got the same problem, but my situation seems to be a little more complicated.

    Whole the team i work in uses myeclipse. For that reason to simplify our work we share configuration for myeclipse (.project.xml) in SVN.
    It’s not possible to force whole the team in one moment to upgrade to 6.5.0 with maven4eclipse as i did.
    Now, if i change my
    <nature>org.maven.ide.eclipse.maven2Nature</nature>
    to
    <nature>com.genuitec.eclipse.maven.maven2Nature</nature>
    everything works ok for me, but i cannot commit the .project.xml because it’s bust for the rest developers.
    For this reason it would be much better if i could disable maven4eclipse plugin (or make some kind of aliases for org.maven.ide.eclipse.maven2Nature? or sth?). Or i’ve got to downgrade myeclipse…

    Another serious problem i’ve got with maven4eclipse is that the ‘attach sources’ feature does not work on the libraries accessed as maven dependencies from maven4eclipse.

    Any suggestions for both above issues would be helpful.

    Regards, Jan

    #286706
    Profile photo of Riyad Kalla
    Riyad Kalla
    Member

    Jan,
    Why not just make the change locally, for the nature, for your .project file, and then never check that resource back in until the rest of the team has migrated? That will avoid breaking anything for the rest of the team.

    There currently is no way to deactivate the Maven4MyEclipse plugin, without manually erasing the plugins and that’s an unsupported and untested setup… I’m sure it would break some project wizards if you did that.

    I’ll have someone from the Maven4MyEclipse team look at the attachment issue, hang tight.

    #286735

    @jgrabow2 wrote:

    Another serious problem i’ve got with maven4eclipse is that the ‘attach sources’ feature does not work on the libraries accessed as maven dependencies from maven4eclipse.

    Can you explain? What I did:
    1. Added Hibernate dependency.
    2. Opened random class from the Hibernate jar.
    3. Clicked “Attach Sources” in the editor.
    4. Selected Jar file.

    Evrything seems working.

    #286743
    Profile photo of jgrabow2
    jgrabow2
    Member

    Thank you for your reply.

    What i actually do is not commiting the xml. And it works of course, but i treat it like a temporary workaround. Maybe all the team will upgrade to myeclipse 6.0.1.

    Returning to the second problem, i did the same:

    1. Added Hibernate dependency.
    2. Opened random class from the Hibernate jar.
    3. Clicked “Attach Sources” in the editor. (Or open lib’s property window and adequate tab)
    4. Selected Jar file.
    […]
    5. Closed properties window with OK button
    5. The classes’ sources are not displayed after dbl-clicking on class icon
    6. When i’m back to the lib’s properties window -> Java Source Attachement -> Location Path it is empty again

    It’s hard to say if it is my fault, don’t now where to find any logs, there is no response that anything went wrong. But what i’m sure is:
    – it works for jars added to classpath directly (not using maven plugin)
    – it dose not work in maven4eclipse also for all other libs i tried: hibernate, common-beanutils, spring, etc …
    – other team workers report me the same problem in m2 plugin in myeclipse
    – i’m sure everthing was ok in eclipse (not myeclipse) maven plugin i used to try some time ago

    My workaround was to use jadclipse to decompile classes (there are some consequnces of course – line mismatches, debugging problems – that’s why i need Java Source Attachement) but at all it works fine to view srcs.

    #286751

    For most Hibernate versions you can use “Download source” action to download the source files.

    What VCS do you use? Could it be that some file is read-only and thus Eclipse cannot store the path to the file?

    #287310

    I’m going to throw my two cents in here and say the Maven4MyEclipse is rather lacking when compared to the version I can currently download. Or at the very least I find it counter-intuitive compared to m2eclipse. For example: I have a existing Maven-based project that I bring into Eclipse. M4ME doesn’t recognize act activate any of it’s features. When I try, it instead wipes out the POM file and creates a new one. Perhaps I’m just misunderstanding your implementation….?

    #287312

    @daorriss wrote:

    I’m going to throw my two cents in here and say the Maven4MyEclipse is rather lacking when compared to the version I can currently download. Or at the very least I find it counter-intuitive compared to m2eclipse. For example: I have a existing Maven-based project that I bring into Eclipse. M4ME doesn’t recognize act activate any of it’s features. When I try, it instead wipes out the POM file and creates a new one. Perhaps I’m just misunderstanding your implementation….?

    Maven4MyEclipse currently only supports projects created using our wizards. We do not support arbitrary projects at this point.

    #287313

    @support-eugene wrote:

    @daorriss wrote:
    I’m going to throw my two cents in here and say the Maven4MyEclipse is rather lacking when compared to the version I can currently download. Or at the very least I find it counter-intuitive compared to m2eclipse. For example: I have a existing Maven-based project that I bring into Eclipse. M4ME doesn’t recognize act activate any of it’s features. When I try, it instead wipes out the POM file and creates a new one. Perhaps I’m just misunderstanding your implementation….?

    Maven4MyEclipse currently only supports projects created using our wizards. We do not support arbitrary projects at this point.

    Maven projects are not “arbitrary”. The have a consistent and predictable layout. You have effectively made m2eclipse useless with your M4ME implementation. Because of this I’ll most likely not move to newer versions of MyEclipse past 6.0.

    #287321
    Profile photo of seanpg
    seanpg
    Member

    @daorriss wrote:

    I’m going to throw my two cents in here and say the Maven4MyEclipse is rather lacking when compared to the version I can currently download. Or at the very least I find it counter-intuitive compared to m2eclipse. For example: I have a existing Maven-based project that I bring into Eclipse. M4ME doesn’t recognize act activate any of it’s features. When I try, it instead wipes out the POM file and creates a new one. Perhaps I’m just misunderstanding your implementation….?

    +1

    I have several hundred maven projects that work just fine with m2eclipse but are useless with Maven4MyEclipse.

    Hopefully future versions will become compatible but until then i will not upgrade.

    #287377
    Profile photo of Brad
    Brad
    Member

    I’m having the same problem. Why do we need a “custom implementation” of m2eclipse? Why do we need custom implementations of anything? I don’t mind new features being added to MyEclipse, but if each new version is going to break my existing setup, it begins to become tedius. Especially if there is no easy way to disable a conflicting feature from within the “Manage Your Configuration.”

    Creating a new project and copying things into it is simply not an option.

    #287385
    Profile photo of Brad
    Brad
    Member

    Okay, I have now been able to disable Maven4MyEclipse and have the original m2eclipse working again (on MyEclipse 6.5). I figured what’s the worst that can happen? I won’t be able to use 6.5?

    Here’s what I did to manually uninstall Maven4MyEclipse:

    1. In the directory C:\Program Files\MyEclipse 6.5\myeclipse\eclipse\features\
    – I removed com.genuitec.myeclipse.maven_6.5.0.zmyeclipse650200806 folder
    2. In the directory C:\Program Files\MyEclipse 6.5\myeclipse\eclipse\plugins\
    – I removed com.genuitec.myeclipse.maven_6.5.0.zmyeclipse650200806 folder
    These next two may have only been there because I tried re-installing m2eclipse so if you don’t find them don’t worry.
    3. In the direcory C:\Program Files\MyEclipse 6.5\eclipse\features\
    – I looked for and removed any other files and folders that started with “org.maven.*”
    4. In the direcory C:\Program Files\MyEclipse 6.5\eclipse\plugins\
    – I looked for and removed any other files and folders that started with “org.maven.*”
    5. Restart MyEclipse with the “-clean” option. (I modified my quicklaunch shortcut and added -clean at the end of the Target line)
    6. Add the codehaus M2Eclipse remote update site: http://m2eclipse.codehaus.org/update/ and install as normal.

    This worked for me – your mileage may vary.

    #287496
    Profile photo of Riyad Kalla
    Riyad Kalla
    Member

    Hey guys, just coming back around on this issue, we are doing Maven support because you guys needed it and we absolutely want to make sure that we do it right (e.g. that it works for everybody).

    6.5 represents our *first* release of a major new feature, we are far from done and if folks are running into specific problems with it we really want to hear from you guys. We are going to keep iterating on that feature set forever, just like every other feature set, so if you can send us specific issues you had with it, or things you liked about it, we can make sure to direct it in such a way that it meets your exact needs.

    We didn’t just toss this puppy out, wipe our hands and say “ok we’re done, let’s move on”, we really do want to get feedback on what we borked, what rocked and where we could make common operations even easier. We *did* absolutely have to scope down what our initial delivery looked like though so we weren’t in R&D for a year with nothing to show for it, so that’s why there are some things missing like EAR-support for Maven and adding Maven Capabilities to existing projects that we need to address.

    So that being said, you can fire off comments to support@genuitec.com ATTN Riyad, with your comments or post them here if that’s easier. Please make sure it’s mroe than “this sucked” though, it’s hard to file a PR in our issue tracker for the dev team with a description like that. The more specific the issues the faster we can turn those into actionable items to address for everybody.

    Thanks again for your patience guys, we know for the Maven gurus out there this might be a pot-hole in the road right now and we want to fill it in for you.

    #287514

    Riyad,

    The crux of the issue here is that m2Eclipse is very powerful, very flexible and works with existing projects *or* new ones. I can take any maven-based project and just use it. Maven4Myecilpse appears only to work for Newbies at the expense of those of us who already have Maven-based projects. So, for people like me, M4ME offers *none* of the value that M2E does. And as a result I’ll probably do what’s been recommended above and pry your component out in favor of putting M2E in.

Viewing 15 posts - 1 through 15 (of 44 total)

You must be logged in to reply to this topic.