- This topic has 1 reply, 2 voices, and was last updated 17 years ago by Loyal Water.
-
AuthorPosts
-
binyanMemberCurrently 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
Loyal WaterMemberThank you for your feed back. This has already been filed for the dev team.
-
AuthorPosts