facebook

Deployment to sandbox – does not pick up compiled sources

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

    aqbrown
    Member

    Hi,

    I have a project that needs to work with both Maven and in eclipse. java sources are in /src/main/java and resources in /src/main/resources. These two folders are listed as source folders in eclipse, and they compile to /target/classes.

    The web root folder is /src/main/webapp. The eclipse project is maven enabled.

    When I deploy to the sandbox, only the /arc/main/webapp resources are put into tomcat. The lib folder is built with the Maven dependencies in th exploded deployment. But the classes folder in WEB-INF does not exist. I have to copy the classes folder to the webapp/WEB-INF folder by hand to get the classes deployed. Howver, if I do this there is no automatic code replacement and the debugger does not stop on breakpoints.

    Another really strange thing is I have another project in the workspace, and if that project is open its compiled targets in its /target/classes are copied to the WEB-INF/classes folder in the deployment !
    The other project is not a web project and is not a dependent project.

    What exactly is required to get this to work. Can you explain the rules about how the builders are supposed to work ?

    #295739 Reply

    Unfortunately, this scenario is not yet supported. We plan to work on proper Maven deployment support in our next releases.

    #295745 Reply

    aqbrown
    Member

    Ok, so it is not supported, but can you tell me how the deployment builder works so I can do something in the meantime ?

    How does it determine where to obtain the classes for the WEB-INF folder ?

    It certainly seems that no matter what support for Maven there is, the builder is not working right by incorporating unrelated projects into the deployment.

    #295752 Reply

    The classes should be built to ${webroot}/WEB-INF/classes

    #295753 Reply

    aqbrown
    Member

    Right, but how is the builder deciding what classes to put there ?

    #295754 Reply

    See Java Build Path project property page, Source tab. MyEclipse will configure this using your pom.xml.

    #295755 Reply

    aqbrown
    Member

    Except … it is not respecting the values listed for the build path target folders as configured in eclipse. But, maybe it is getting confused since the pom does not explicitly list the target destination but relies on maven defaults. I will try explicitly listing it in the pom to see if that works.

    #295757 Reply

    It is not designed to work with output folders other then WEB-INF/classes. There are some conflicting requirements that mandate such behavior.

    #295775 Reply

    aqbrown
    Member

    Ok I got it working.

    setup was :
    default build target : src/main/webapp/WEB-INF/classes
    webroot : src/main/webapp

    and, most important of all, I disabled workspace resolution in Maven4MyEclipse. Not sure what use this setting really has but it was pulling in all projects in the workspace as Maven dependencies even if the dependency was not in the pom. By disabling this I prevented the deployment of unwanted classes and resources from other projects to WEB-INF/classes This was the original problem that sent me on my journey trying to specify the build paths, which led to it not finding the classes for deployment.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Deployment to sandbox – does not pick up compiled sources

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