Hi Jerod,

On Jul 4, 2008, at 5:21 PM, Hans Dockter wrote:

I don't understand why this does not work at, as you describe. I have attached a sample war project (gradlep.zip) which works for me with 0.2.

It has the layout:

src/main/webapp
src/main/content
src/additionalWebInf

The content of webapp is automatically added to the war. The content of 'content' is added as a fileset. The content of additionalWebInf is added as a webinf fileset. Everythings works except one bug. The web.xml from webapp is not added. This is strange as we even have an integration test for this. I have filed a Jira: http://jira.codehaus.org/browse/GRADLE-139

I was fortunately wrong. There is no bug in Gradle but the error lies in the build script. See below:


But this bug is not a big problem. You can specify the web.xml directly. Here is the build file.

import org.gradle.api.tasks.util.FileSet

group = 'gradle'
version = '1.0'
usePlugin('war')
targetCompatibility = '1.5'
sourceCompatibility = '1.5'

gradlep_war {
    fileSet(dir: file('src/main/content'))
webInfFileSets = [new FileSet(dir: new File('src/ additionalWebInf'))]
    webXml = file('src/main/webapp/WEB-INF/web.xml')
}

We overwrite the default webInfFileSet here: The correct version is:

gradlep_war {
    fileSet(dir: file('src/main/content'))
webInfFileSets = webInfFileSets + [new FileSet(dir: file('src/ additionalWebInf'))]
}

Than everything is fine. Of course this points out that we need a webInfFileSet method as described above.

If any of your code is not working as expected please send me a test case for reproducing this.

- Hans

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to