How to install tomcat plugin on an air-gapped machine?

I use Gradle successfully on an air-gapped machine for Java CLI apps. (I define dependencies { implementation fileTree(...) } and then Gradle finds every JAR in my local lib directory! :slight_smile: )

Now I try use Gradle for Tomcat app dev deployment. I assume bmuschko’s gradle-tomcat-plugin is the way to go. However, as mentioned above, the machine I run Gradle on is air-gapped (no Internet), so I need to download the plugin JAR separately. Can I somehow explicitly download it from plugins.gradle.org?

plugins.gradle.org is effectively just a Maven repository with some custom UI.
So you can download it from https://plugins.gradle.org/m2/com/bmuschko/gradle-tomcat-plugin/2.7.0/.
Btw. fileTree or files is suboptimal as dependencies.
It is much better to use a flatDir repository and declaring the dependencies.
Then you for example can also see the dependencies in a ./gradlew dependencies report and so on.

1 Like