Search code examples
eclipsem2eclipsesubclipse

m2eclipse, subclipse - Checking out web application


In the SVN repository browser I can right click on 'trunk' which gives me the option to 'checkout as maven project'. I have two problems:

  1. When it checks out the project, it is giving it the directory structure mavenxxxx > trunk > src. How do I configure this so it is MyProjectName > src and skip the trunk folder and only check out it's contents?
  2. When I check out my project it appears as a java project when I want it to be a web application project, is it supposed to be picking up that it is a web application from my pom file, or do I have to follow any other additional steps to configure it?

Thanks


Solution

  • Check Out From SVN

    It sounds like you are not selecting the "trunk" folder when you checkout your project. If your project name is Mavenxxxx and you select 'Mavenxxxx" when you check out, then you will get see the behavior you've described.

    In your post, you said you did, in fact, right-click on "trunk." So I would suggest checking out your project another way. Try this:

    1. File > New > Other...
    2. Type "SVN"
    3. Select "Project from SVN"
    4. Click "Next" then choose/create your repository and click "Next"
    5. Click Browse... and navigate to your project
    6. Highlight the "trunk" folder and click "Ok" then click "Finish"
    7. In the popup window, choose "Check out project with the name specified"
    8. Click "Finish"

    If that doesn't work, then there must be folder at the root level of your project named "trunk." As in Mavenxxxx > trunk > trunk.


    Enable Web Application Project

    To answer your question:

    ...is it supposed to be picking up that it is a web application from my pom file, or do I have to follow any other additional steps to configure it?

    What you are trying to do is change the nature of your project. That can't be done from the POM file.

    Instead, right click your project, go to the "Project Facets" section.

    That is where you should be able to set it as a web application project.

    If you see a link that says, "convert to faceted form..." then do that. Next, choose the facet related to WebApps. I don't have my eclipse setup for Web Application projects so I can't tell you the exact wording that you'll see. I think you need the Eclipse IDE for Java Developers to see that and I have the J2EE version.


    I hope that helps...