The ear plugin bug is not fixed since 2011?

I’m trying to use the ear plugin with war. This is the instruction.

dependencies {
// The following dependencies will be the ear modules and
// will be placed in the ear root
deploy project(‘:war’)

// The following dependencies will become ear libs and will
// be placed in a dir configured via the libDirName property
// earlib group: 'log4j', name: 'log4j'


But instead, I have to use this from the threads in the forum.

deploy project(path:‘:war’,configuration:‘archives’)

Could you please provide a reproducible example project or point me to the bug report? :slight_smile:

Here’s the discussion for the bug. There’s a workaround.
And here’s the bug reporting 5 years ago. And it’s never fixed.

Thank you for the pointer Seto! This is unfortunately not easy to fix. It will require usage-aware dependency resolution, so we can tell apart the case “I want to compile against this project” from “I want to package this project for deployment”.

I’ve corrected the user guide to use the workaround discussed in the bug report.

Where did you update the user guide? I found it’s not fixed yet. Or does it apply to the next version user guide?

The updated user guide will be part of the Gradle 3.1 release.

Hi. I found the example in 3.1 doc is still “deploy project(’:war’)”. Or do I miss something?

Thanks for the heads-up! I had missed that second sample project and only changed the first one. Fixed for 3.2.