facebook

Deploying Maven Web Project

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #302849 Reply

    Heikki Pakkala
    Participant

    I can’t quite understand the logic of deploying a MyEclipse Maven project with Web project capabilities. Previously I’ve used projects with Web capabilities and deploying them is very straight forward. Now when Maven is also involved I’m confused who is controlling what during the deployment.

    After deployment, the directory structure of MyProject in server’s file system looks like this:

    
    webapps\-META-INF : MANIFEST.MF
           |
           |-src---main : empty
           |     |
           |     |-test : empty
           |
           |-target---classes---mypackage : .class-files
           |        |         | 
           |        |         |-META-INF : persistence.xml
           |        |
           |        |-MyProject---META-INF : empty
           |        |           |
           |        |           |-WEB-INF---classes---mypackage : .class-files      
           |        |                     |         |
           |        |                     |         |-META-INF : persistence.xml    
           |        |                     |
           |        |                     |-lib : all jars
           |        |
           |        |-test-classes : .class-files of test classes
           |
           - WEB-INF---classes : empty
                     |
                     --lib : empty
    

    1) Why is the src directory structure deployed and why without any files in it? How can I omit the src from deploying?

    2) Why is the target directory structure deployed and why are the contents of target\classes and target\MyProject\WEB-INF\classes identical?

    3) Why are WEB-INF\classes and WEB-INF\lib empty? Aren’t these just the directories that should contain the .class-files and jars instead of target\MyProject\WEB-INF\classes and target\MyProject\WEB-INF\lib?

    In my opinion, the src and target should not be deployed at all and .class-files and jars should be inside webapps\WEB-INF.

    I have deleted the deployed directory structure, started MyEclipse as -clean and redeployed, but the structure remains the same. I’m using Eclipse 3.4.1 / MyEclipse 7.0 under Windows XP.

    #302863 Reply

    Currently MyEclipse tools support only Maven projects created using MyEclipse wizards.

    #302877 Reply

    Heikki Pakkala
    Participant

    This project was created using MyEclipse wizards: first new MyEclipse/Maven/Maven Java Project and then MyEclipse -> Project Capabilities -> Add Web Project Capabilities.

    #302878 Reply

    Oh. This looks like a bug. That wizard does not properly update Maven configuration.

    Can you start as Web project with Maven support and then migrate the contents?

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Deploying Maven Web Project

You must be logged in to post in the forum log in