# Official tomcat plugin

**URL:** <https://discuss.gradle.org/t/official-tomcat-plugin/525>\
**Category:** Old Forum Archive\
**Created:** [January 14, 2012, 8:35pm UTC](https://discuss.gradle.org/t/official-tomcat-plugin/525 "2012-01-14T20:35:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![phil\_swenson](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@phil\_swenson](https://discuss.gradle.org/u/phil_swenson)\
**Post date:** [January 14, 2012, 8:35pm UTC](https://discuss.gradle.org/t/official-tomcat-plugin/525/1 "2012-01-14T20:35:00Z")

</div>

I think Gradle should have a tomcat plugin in addition to the jetty one. tomcat is more popular and jetty has been made overly complex by eclipse (big surprise). possibly use this one: [https://github.com/bmuschko/gradle-tomcat-plugin](https://github.com/bmuschko/gradle-tomcat-plugin)

I would also note that a co-worker commented that gradle was “immature” in not having a tomcat plugin as further evidence we should be using gradle.

---

<div class="post-metadata">

**Author:** ![luke\_daley](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/luke_daley/32/9890_2.png) [@luke\_daley](https://discuss.gradle.org/u/luke_daley)\
**Post date:** [January 14, 2012, 9:14pm UTC](https://discuss.gradle.org/t/official-tomcat-plugin/525/2 "2012-01-14T21:14:00Z")

</div>

Hi Phil,

Is there something the tomcat plugin doesn’t do that you need? I think it’s a drop in replacement for the jetty plugin and does everything it does. The author has been historically very good at fixing issues and ensuring compatability.

---

<div class="post-metadata">

**Author:** ![bmuschko1](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/bmuschko1/32/7194_2.png) [@bmuschko1](https://discuss.gradle.org/u/bmuschko1)\
**Post date:** [January 14, 2012, 10:00pm UTC](https://discuss.gradle.org/t/official-tomcat-plugin/525/3 "2012-01-14T22:00:00Z")

</div>

In case you guys decide to pull it into Gradle core I’d be happy to make this happen. Either way I will make sure feature requests get implemented and potential bugs fixed.

---

<div class="post-metadata">

**Author:** ![phil\_swenson](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@phil\_swenson](https://discuss.gradle.org/u/phil_swenson)\
**Post date:** [January 16, 2012, 7:16pm UTC](https://discuss.gradle.org/t/official-tomcat-plugin/525/4 "2012-01-16T19:16:00Z")

</div>

The tomcat plugin is fine. But it requires a lot of declaration in your build.gradle and the

jetty plugin is just

```gradle
apply plugin: jetty

```

---

<div class="post-metadata">

**Author:** ![bmuschko1](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/bmuschko1/32/7194_2.png) [@bmuschko1](https://discuss.gradle.org/u/bmuschko1)\
**Post date:** [January 16, 2012, 8:02pm UTC](https://discuss.gradle.org/t/official-tomcat-plugin/525/5 "2012-01-16T20:02:00Z")

</div>

The Jetty plugin only supports one specific version of Jetty as Gradle core provides its dependencies so there’s no way to switch between versions. The Tomcat plugin supports the version you specify based on your configuration. Even if the Tomcat plugin would be moved into Gradle core you’d have to define its dependencies as it would cause classloading issues otherwise if you would mix them up.

This is a general issue with Gradle plugins at the moment as there is no way to define a plugin’s dependencies in a descriptor.

---

<div class="post-metadata">

**Author:** ![luke\_daley](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/luke_daley/32/9890_2.png) [@luke\_daley](https://discuss.gradle.org/u/luke_daley)\
**Post date:** [January 17, 2012, 1:31am UTC](https://discuss.gradle.org/t/official-tomcat-plugin/525/6 "2012-01-17T01:31:00Z")

</div>

Hi Benjamin,

I’m not familiar with the issue you are referring to. That is, I’m not aware of any issues with resolving transitive dependencies of plugins. Can you provide some more info?

---

<div class="post-metadata">

**Author:** ![bmuschko1](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/bmuschko1/32/7194_2.png) [@bmuschko1](https://discuss.gradle.org/u/bmuschko1)\
**Post date:** [January 17, 2012, 2:06am UTC](https://discuss.gradle.org/t/official-tomcat-plugin/525/7 "2012-01-17T02:06:00Z")

</div>

Hi Luke,

Maybe I didn’t communicate this correctly. There’s no problem with resolving transitive dependencies of plugins. The issue I am referring to is the fact that the Jetty plugin gets its dependencies provides by Gradle core (lib/plugins). In case you’d move the Tomcat plugin into Gradle Phil would like its dependencies to be provided by Gradle as well and not declaratively by a custom configuration. Jetty’s dependencies would clash with the ones needed by the Tomcat plugin e.g. the JSP API version.

In terms of Gradle plugins I am referring to feature requests that I would like to see e.g. that plugins should declare its dependencies in a descriptor like Grails does it for example. It would be great if the user wouldn’t have to declare this if they don’t want to. I will put together my ideas and thoughts in a new post soon.

---

<div class="post-metadata">

**Author:** ![bmuschko1](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/bmuschko1/32/7194_2.png) [@bmuschko1](https://discuss.gradle.org/u/bmuschko1)\
**Post date:** [January 24, 2012, 12:39pm UTC](https://discuss.gradle.org/t/official-tomcat-plugin/525/8 "2012-01-24T12:39:00Z")

</div>

I was thinking more down the line of Hans’ posting about a plugin portal and the support for plugins in general: [http://forums.gradle.org/gradle/topics/plugin\_portal\_improving\_plugin\_development](http://forums.gradle.org/gradle/topics/plugin_portal_improving_plugin_development). It’s great to see it on the roadmap and I am looking forward to the result. One more think that I think should be addressed is classloading isolation for plugins.
