Play 2.1.1 depending on the design

I am new to the Play platform and am working on Java Webapp using it. I understand that we must use SBT to create applications 2.1.1.

Questions:

  • Is this a standard build system for the Play? Don't we have any Play platform teams that will create, test, resolve dependencies, etc.?

  • Can I use a play structure with a Maven / Maven repository, or if I need to use only SBT, can I use SBT with a Maven repository? Is this a good practice?

  • I tried to install SBT. Extract the downloaded zip file and add the <SBT_HOME>\bin to the Windows path variable. When I execute the sbt command, I get the following error:

    The system cannot find the file C:\installations\sbt\bin\sbtconfig.txt. java.io.FileNotFoundException: C:\Windows\system32\config\systemprofile\.sbt\boot\update.log (The system cannot find the path specified)

Am I doing something wrong in the installation?

+4
source share
1 answer
  • Is this a standard build system for the Play?

    Yes, sbt is the default build system for the Play app.

  • Can I use the Play framework with the Maven / Maven repository?

    Yes, by default, Play uses the Maven2 repository and Typesafe repository . Here's the default recognizer:

     resolvers ++= Seq( "Maven Repository" at "http://repo1.maven.org/maven2/", "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/" ) 

    If you need to find add dependency, you can just go to Maven2 repository.

    For example, this is a repository for Google Guice

    http://mvnrepository.com/artifact/com.google.code.guice/guice/1.0

    You should see the sbt tab and find the code that needs to be written in Build.scala

    libraryDependencies += "com.google.code.guice" % "guice" % "1.0"

  • There is no need to install sbt if you installed the game.

    Just cd into the project directory and run play .

+3
source

Source: https://habr.com/ru/post/1482405/


All Articles