Skip to content

"Check out as Maven Project" on parent directory breaks Subclipse connectivity #15

@logological

Description

@logological

When m2eclipse's "Check out as Maven Project…" command is run on an SVN folder which is a parent of the one containing the POM, it checks out the project without any complaints, putting it in a workspace directory with a placeholder name such as maven.1424425443350. Inside this directory it creates a subdirectory with the name of the Maven artifact. This confuses Subclipse: it immediately forgets that the project is under version control, so the "Team" context menu in the Java perspective shows only "Share Project…" and "Apply Patch…". Command-line Subversion is similarly confused; if you invoke svn status from the command line in the maven.1424425443350 directory, it will tell you that the directory is under version control but that all the version-controlled files are missing.

The only workaround is to delete the project and check it out again, this time making sure that the checkout is performed on a directory containing a POM rather than some higher-level directory. A better overall solution would be for m2eclipse to refuse to run "Check out as Maven Project…" on directories which don't contain a POM, or else to better handle cases where it tries to do so anyway by searching subdirectories for Maven projects.

Reproducibility: Always

Steps to reproduce:

  1. Open the SVN Repository Exploring perspective.
  2. Add the repository https://uby.googlecode.com/svn/
  3. Right-click on the "trunk" folder in the "ubyVisWebInterface" directory and select "Check out as Maven Project…". Accept the default options in the dialogs that result.
  4. Go to the Java perspective. Right-click on the ubyvis-webapp project or on any file it contains.

Observed behaviour:
5. The "Team" context menu contains only "Share Project…" and "Apply Patch…", as if the project you just checked out is not under version control.

Expected behaviour:
5. The "Team" context menu should contain all the usual SVN commands for updating, committing, etc.

This issue was original reported for Subclipse (see Issue 1622) though it was established there that this is a problem with m2eclipse.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions