Skip to content

Play2War configuration

Damien Lecan edited this page Jun 20, 2014 · 14 revisions

Build configuration

Servlet container target version

  • Key: Play2WarKeys.servletVersion
  • Expected value: String, in ["2.5", "3.0", "3.1"]
  • Default value: 3.0

Target WAR file name

  • Key: Play2WarKeys.targetName
  • Expected value: Option[String]
  • Default value: $projectsName-$projectsVersion.war

Destination folder cannot be configured (YOUR_PROJECT/target).

Disable warning when web.xml file not found

  • Key: Play2WarKeys.disableWarningWhenWebxmlFileFound
  • Expected value: Boolean
  • Default value: false
  • Since: 0.9.1

When servlet container >= 3.0 is configured and a web.xml can be found in YOUR_PROJECT/war, a warning is displayed. This key to skip this warning.

Artifacts to filter out from war

  • Key: Play2WarKeys.filteredArtifacts
  • Expected value: Seq[(groupId: String, artifactId: String)]
  • Default value: Seq(("javax.servlet", "servlet-api"))
  • Since: 0.9.1

Exploded mode for main project's artifact

  • Key: Play2WarKeys.explodedJar
  • Expected value: Boolean
  • Default value: false (not exploded)
  • Since: 0.9.1

Instead of being packaged into WAR_FILE!/WEB-INF/lib, your project's artifact (containing controllers, views, ...) can be packaged exploded into WAR_FILE!/WEB-INF/classes.

Runtime configuration

All theses keys have to be added in YOUR_APP/conf/application.conf file.

key = value
### Servlet 3.1 asynchronous timeout in milliseconds * Key: `servlet31.asynctimeout` * Expected value: milliseconds as integer (a timeout value of zero or less indicates no timeout) * Default value: `-1` * Since: 1.2-beta5 ### Servlet 3.0 asynchronous timeout in milliseconds * Key: `servlet30.asynctimeout` * Expected value: milliseconds as integer (a timeout value of zero or less indicates no timeout) * Default value: `-1` ### Servlet 2.5 synchronous timeout in milliseconds * Key: `servlet25.synctimeout` * Expected value: milliseconds as integer (a timeout value of zero or less indicates no timeout) * Default value: `60` (`10` for Play2war >= 0.9.1) ### Servlet 3.1 internal buffer size for upload. A higher value will consume an upload faster but with higher memory consumption. * Key: `servlet31.upload.internalbuffersize` * Expected value: integer * Default value: 8kb * Since: 1.2-beta5