# The ear plugin adds war modules imported as project deps as jars

**URL:** <https://discuss.gradle.org/t/the-ear-plugin-adds-war-modules-imported-as-project-deps-as-jars/10755>\
**Category:** Bugs\
**Created:** [July 23, 2015, 7:00am UTC](https://discuss.gradle.org/t/the-ear-plugin-adds-war-modules-imported-as-project-deps-as-jars/10755 "2015-07-23T07:00:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertpanzer](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/robertpanzer/32/2598_2.png) [@robertpanzer](https://discuss.gradle.org/u/robertpanzer)\
**Post date:** [July 23, 2015, 7:00am UTC](https://discuss.gradle.org/t/the-ear-plugin-adds-war-modules-imported-as-project-deps-as-jars/10755/1 "2015-07-23T07:00:09Z")

</div>

What I think is an error can be nicely reproduced via the sample `ear/earWithWar`.  
This project contains two subprojects: One that builds a war and another one that builds an ear which uses the war in a deploy dependency:

```gradle
    deploy project(':war')

```

I would expect that I’d find a `war.war` in the ear after `gradle ear`, but instead I see a `war.jar`.

Tested with gradle 2.4.

Instead I have to add the dependency like this:

```gradle
	deploy project(path: ':war', configuration: 'archives')

```

I’m ok with this but it would be good to document this.
