[GRADLE-1770] eclipse-wtp plugin doesn't respect webAppDirName Created: 29/Aug/11  Updated: 04/Jan/13  Resolved: 01/Sep/11

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-4
Fix Version/s: 1.0-milestone-5

Type: Bug
Reporter: Andrew Oberstar Assignee: Szczepan Faber
Resolution: Fixed Votes: 0

Attachments: Zip Archive war.zip    

 Description   

Even if you change the webAppDirName property in a WAR build, the WST file still sets it's deployment path to src/main/webapp. Looking through the source code I found a TODO saying that it was not being evaluated lazily, so this seems to be a known issue.

build.gradle

apply plugin: 'war'
apply plugin: 'eclipse-wtp'

sourceSets {
main

{ java.srcDir 'JavaSource' resources.srcDir 'JavaSource' }

}

webAppDirName = 'WebContent'

.settings/org.eclipse.wst.common.component

<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="2.0">
<wb-module deploy-name="war">
<property name="context-root" value="war"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="JavaSource"/>
<wb-resource deploy-path="/" source-path="src/main/webapp"/>
</wb-module>
</project-modules>


Generated at Wed Jun 30 12:03:54 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.