2

I need to develop a Scala-Play application in a very controlled environment where they have Maven established but do not allow any other build tool e.g. sbt. I really want sbt of course but I can't have it here. Therefore my question, is it possible to use Maven only to setup a Scala - Play application? note I do not want to use Java i.e. productivity.

I have used Scala - Play and I am very accustomed to the Play sbt plugin that setups every nicely for activator etc but unfortunately I do not enjoy that choice here ... however, I can do anything with Maven.

Needless to say I have tried to setup SBT and Activator locally to fetch dependencies tunneling via the existing Nexus Maven without success. The nexus instance doesn't have an ivy2 repository and I am not allowed to create one.

Marek J
  • 1,364
  • 8
  • 18
  • 33
SkyWalker
  • 13,729
  • 18
  • 91
  • 187
  • 1
    I have no experience to share on this, but couldn't you use a POM generator for sbt and make the build process happy that way ? http://stackoverflow.com/questions/5067501/sbt-to-maven-converter – GPI Jan 12 '17 at 09:55
  • 1
    I don't think Maven is capable of providing the incremental Scala compilation (i.e. only recompiling changed files and its dependents). So brace yourself for long compile times if you don't use SBT. – Haspemulator Jan 12 '17 at 14:31
  • 1
    It's capable - http://davidb.github.io/scala-maven-plugin/example_incremental.html, unfortunately, it's in maintenance mode – Andriy Kuba Jan 12 '17 at 16:18

1 Answers1

4

There is Play Maven plugin (though it still in beta): https://github.com/play2-maven-plugin/play2-maven-plugin

I did not use it, but I did few Play modules that depend on Play and build completely in Maven. I use Play from the Maven central repository. Hope this will help you.

<dependency>
    <groupId>com.typesafe.play</groupId>
    <artifactId>play-java_2.11</artifactId>
    <version>${play.version}</version>
    <scope>provided</scope>
</dependency>

<dependency>
    <groupId>com.typesafe.play</groupId>
    <artifactId>play-cache_2.11</artifactId>
    <version>${play.version}</version>
    <scope>provided</scope>
</dependency>

<dependency>
    <groupId>com.typesafe.play</groupId>
    <artifactId>play-json_2.11</artifactId>
    <version>${play.version}</version>
    <scope>provided</scope>
</dependency>
Andriy Kuba
  • 8,093
  • 2
  • 29
  • 46