facebook

Support enhanced Web Project deployments

  1. MyEclipse IDE
  2.  > 
  3. Feature Requests
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #279660 Reply

    binyan
    Member

    Currently ME when adding the Web Project Capabilities to a project ME mucks with the project’s output folder and this really shouldn’t happen nor be necessary. For us, this is causing an unnecessary conflict with another tool. Thus it would be nice if ME didn’t do that. The current behavior is to configure eclipse to output the classes/resources to <webroot>/WEB-INF/classes and when ME does a deploy, it likely does a timestamp comparison (for exploded deployments) and copies all changed from the <webroot>/ on down to the deployment directory.

    That is needed is for ME to use the following psuedo code to support deployment without mucking with the output folders:

    String webRoot = "src/main/webapp"; // or something along these lines
    String webDeploymentFolder = getWebDeploymentFolder();
    
    // Let's copy the bulk of the war file's contents here
    copyWarContents(webRoot, webDeploymentFolder);
    
    String classesRoot = webRoot + "/WEB-INF/classes"; // eclipse project directory
    String classesDeploymentFolder = webDeploymentFolder + "/WEB-INF/classes";
    List<SourceFolder> sourceFolders = getAllSourceFolders();
    for (SourceFolder sourceFolder : sourceFolders)
    {
        if (classesRoot.equals(sourceFolder.getBuildOutputPath()))
        {
            continue; // nothing to do, these aren't the droids we're looking for.
        }
        else if (getDeploymentType() == DeploymentType.EXPLODED)
        {
            // if we're building an exploded app then sync this folder's output with the
            // deployment folder's output
            syncFolder(sourceFolder.getBuildOutputPath(), classesDeploymentFolder);
        }
        else if (getDeploymentType() == DeploymentType.WAR)
        {
            // we have a war deployment to lets just copy everything into the war 
            // staging directroy like normal
            copyWarContents(sourceFolder.getBuildOutputPath(), classesDeploymentFolder);
        }
        else
        {
            // what could this be??
            throw new MyEclipseException("WTF?");
        }
    }
    

    The above code will increase external tool integration and is backward compatible.

    P.S.

    BTW, it’s been approx. 2.5 years since I posted here, so I’m amazed that my account is still active.

    Binyan

    #279691 Reply

    Loyal Water
    Member

    Thank you for your feed back. This has already been filed for the dev team.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Support enhanced Web Project deployments

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