# Kotlinc required with maven/ant?

**URL:** <https://discuss.kotlinlang.org/t/kotlinc-required-with-maven-ant/2514>\
**Category:** Uncategorized\
**Created:** [April 21, 2017, 4:53pm UTC](https://discuss.kotlinlang.org/t/kotlinc-required-with-maven-ant/2514 "2017-04-21T16:53:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam.x.hughes](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@adam.x.hughes](https://discuss.kotlinlang.org/u/adam.x.hughes)\
**Post date:** [April 21, 2017, 4:53pm UTC](https://discuss.kotlinlang.org/t/kotlinc-required-with-maven-ant/2514/1 "2017-04-21T16:53:28Z")

</div>

I have a small project with mixed .java and .kt files. We’re going to deploy onto a linux server and had planned to create a simple custom build script, rather than relying on Ant/Maven. However, I just realized that the servers would not have `kotlinc`, and so we couldn’t complie the .kt files. Working in a large enterprise, it’s probably easier to just transcribe the kotlin files back to java and use `javac` than try to get the kotlin compiler installed on our servers.

My question: if I were to use maven/ant, would this circumvent the need to have `kotlinc` installed on these boxes, or would the build tool just be calling `kotlinc` under the hood anyway?

---

<div class="post-metadata">

**Author:** ![ilya.gorbunov](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/ilya.gorbunov/32/1645_2.png) [@ilya.gorbunov](https://discuss.kotlinlang.org/u/ilya.gorbunov)\
**Post date:** [April 21, 2017, 5:04pm UTC](https://discuss.kotlinlang.org/t/kotlinc-required-with-maven-ant/2514/2 "2017-04-21T17:04:42Z")

</div>

I always thought ‘deploy’ means that you take the compiled binaries and put them on server rather take the sources and compile them on server to get binaries.

But anyway, `kotlinc` is just a batch file that calls a java application. Is it really hard to get `kotlinc` along with your sources? AFAIK no install steps are required, just unpack `kotlin-compiler.zip` distribution and run `bin/kotlinc` from there.

You can get the latest kotlin-compiler.zip from github release page: [Release 1.1.1 · JetBrains/kotlin · GitHub](https://github.com/JetBrains/kotlin/releases/tag/v1.1.1)

---

<div class="post-metadata">

**Author:** ![adam.x.hughes](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@adam.x.hughes](https://discuss.kotlinlang.org/u/adam.x.hughes)\
**Post date:** [April 21, 2017, 5:20pm UTC](https://discuss.kotlinlang.org/t/kotlinc-required-with-maven-ant/2514/3 "2017-04-21T17:20:19Z")

</div>

You’re right- sorry, we’re going to “build” it on our dev server, not deploy it. You’re right, it’s probably easier to get it than I had envisioned…

Anyway, just for my knowledge, would a build tool still use the kotlin compiler under the hood? It must, right?

---

<div class="post-metadata">

**Author:** ![yole](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/yole/32/1425_2.png) [@yole](https://discuss.kotlinlang.org/u/yole)\
**Post date:** [April 21, 2017, 7:48pm UTC](https://discuss.kotlinlang.org/t/kotlinc-required-with-maven-ant/2514/4 "2017-04-21T19:48:32Z")

</div>

Maven or Gradle would automatically download kotlinc; you wouldn’t need a separate installation. For Ant, you’d need to provide the .jar files with the Kotlin compiler and Ant task definitions, but you can store them in the source code repository of your project if you need to.
