I have a single WAR-project which builds without any problems. Creates a WAR
file without any issues, but now I'm trying to move to a multiproject build
because I have a separate jar file which is going to be included into the
WAR file.

First issue I ran into was this:

 flatDir (name: 'localLibrary', dirs: 'library')

When I run the project with a multiproject build, this results in an error
because now the project is no longer able to find the directory named
library. I could fix this by adding the project name/directory into the
flatDir, but I ran into other issues also.

My goal is that I would like to run gradle from within the project itself
doing regular tasks such as unit tests etc, but at the same time I would
like to be able to run from the parent project which packages everything
together. This doesn't seem applicable with the way I've set up the
multiproject build. Is this intended? If not - how can ensure that paths are
working also in a multiproject build.

Here's my parent project build.gradle file:

dependsOnChildren()

subprojects {
    usePlugin 'java'
    group = 'mygroup'
    version = '0.1'
    sourceCompatibility = 1.6
    targetCompatibility = 1.6
    manifest.mainAttributes(
        'Implementation-Title': 'Project',
        'Implementation-Version': version,
        'Implementation-Vendor': 'ACME AS'
    )
}

project(':WebAppProj') {
    dependencies {
        compile project(':AppletProj')
    }
}

My settings.gradle:

include 'AppletProj', 'WebAppProj'


Any pointers on how to resolve this issue would be appreciated.


------- Trond

Reply via email to