Skip to content

Commit

Permalink
Merge pull request #50 from Nosto/play1.7_update-take2
Browse files Browse the repository at this point in the history
Play1.7 update
  • Loading branch information
renat-nosto authored Apr 11, 2022
2 parents 170a4de + d7e83ab commit 8463acc
Show file tree
Hide file tree
Showing 1,001 changed files with 5,302 additions and 253,056 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Pull Requests

on:
push:
pull_request:

concurrency:
# Only run once for latest commit per ref and cancel other (previous) runs.
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
testing:
runs-on: ${{ matrix.os }}

strategy:
matrix:
jdk: [ 11, 17 ]
os: [ubuntu-latest, windows-latest]
exclude:
- os: windows-latest
jdk: 11

name: Check / Tests -> JDK-${{ matrix.jdk }}/${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves
fetch-depth: 0

- name: Set up python 3
uses: actions/setup-python@v3
with:
python-version: '3.x'
architecture: 'x64'
cache: 'pip'
cache-dependency-path: '**/requirements.txt'
- run: pip install -r python/requirements.txt

- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.jdk }}
distribution: 'adopt'

- name: Build with Ant
working-directory: ./framework
run: ant test

build:
needs:
- testing
runs-on: ubuntu-latest
name: BUILD ${{ github.sha }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves
fetch-depth: 0

- name: Set up python 2
uses: actions/setup-python@v2
with:
python-version: '2.x'
architecture: 'x64'

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'adopt'

- name: Build with Ant
working-directory: ./framework
run: ant artifact

- name: ziping artifact
uses: actions/upload-artifact@v2
with:
name: play-${{ github.sha }}
if-no-files-found: error
path: |
./framework/dist/*
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

16 changes: 8 additions & 8 deletions README.textile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
h1. Welcome to Play framework
h1. Welcome to Play framework

!https://travis-ci.org/playframework/play1.svg?branch=1.4.x!:https://travis-ci.org/playframework/play1 !https://badges.gitter.im/playframework/play1.svg(Join the chat at https://gitter.im/playframework/play1)!:https://gitter.im/playframework/play1?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
!https://github.com/playframework/play1/actions/workflows/build-test.yml/badge.svg!:https://github.com/playframework/play1/actions/workflows/build-test.yml/badge.svg !https://badges.gitter.im/playframework/play1.svg(Join the chat at https://gitter.im/playframework/play1)!:https://gitter.im/playframework/play1?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

Play framework makes it easier to build Web applications with Java. It is a clean alternative to bloated Enterprise Java stacks. It focuses on developer productivity and targets RESTful architectures. Play is a perfect companion to agile software development.

Expand Down Expand Up @@ -28,10 +28,10 @@ bc. play run /opt/myFirstApp

6. Start developing your new application:

* "Your first application — the ‘Hello World’ tutorial":https://www.playframework.com/documentation/1.3.0-RC1/firstapp
* "Tutorial — Play guide, a real world app step-by-step":https://www.playframework.com/documentation/1.3.0-RC1/guide1
* "Your first application — the ‘Hello World’ tutorial":https://www.playframework.com/documentation/1.5.x/firstapp
* "Tutorial — Play guide, a real world app step-by-step":https://www.playframework.com/documentation/1.5.x/guide1
* "The essential documentation":https://www.playframework.com/documentation/1.5.x/home
* "Java API":https://www.playframework.com/@api/index.html
* "Java API":https://www.playframework.com/documentation/1.5.x/api/index.html

h2. Get the source

Expand All @@ -51,9 +51,9 @@ h2. Learn More

* "www.playframework.com":https://www.playframework.com
* "Download":https://www.playframework.com/download
* "Install":https://www.playframework.com/documentation/1.3.x/install
* "Create a new application":https://www.playframework.com/documentation/1.3.x/guide1
* "Build from source":https://www.playframework.com/documentation/1.3.x/install#build
* "Install":https://www.playframework.com/documentation/1.5.x/install
* "Create a new application":https://www.playframework.com/documentation/1.5.x/guide1
* "Build from source":https://www.playframework.com/documentation/1.5.x/install#build
* "Modules":https://www.playframework.com/modules
* "Search or create issues":http://play.lighthouseapp.com/projects/57987-play-framework
* "Get help":http://stackoverflow.com/questions/tagged/playframework
Expand Down
17 changes: 9 additions & 8 deletions documentation/commands/cmd-status.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
~
~ Synopsis:
~ ~~~~~~~~~
~ play status [app_path] [--url=http://...] [--status-key=...]
~ play status [app_path] [--url=http://...] [--secret=...]
~
~ Description:
~ ~~~~~~~~~~~~
Expand All @@ -20,13 +20,14 @@
~ Options:
~ ~~~~~~~~
~ --url:
~ The script try to connect to the application at the localhost domain. If you want to monitor an application running on
~ a remote server, specify the application URL using this option (eg. play status --url=http://myapp.com)
~ By default this command connects to the application running on the localhost domain. If you want to monitor an
~ application running on a remote server, specify the application URL using this option
~ (eg. play status --url=http://myapp.com)
~
~ --status-key:
~ The script uses the status key to generate an authorization token. It assumes that the status key available from the
~ app_path/conf/application.conf is valid (see setting `application.statusKey`).
~ If not you can provide your own status key using this option (eg. play status --status-key=bghjT7ZG7ZGCO8)
~ --secret:
~ This command uses the secret status key as authorization token. By default this command uses the status key
~ found in `app_path/conf/application.conf` (see setting `application.statusKey`).
~ With this option you can provide your own status key from the command line (eg. play status --secret=bghjT7ZG7ZGCO8).
~
~ If you provide both options, you can run this command without a local application directory (app_path is not required).
~
~
26 changes: 22 additions & 4 deletions documentation/manual/configuration.textile
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,11 @@ You can then access this database from your application’s Java by using this n

bc. EntityManager em = JPA.em("student");

You can also assign a specific database within each @model@ by using the name with @@PersistenceUnit@ like this:

bc. @Entity
@PersistenceUnit(name="student")
public class [MODEL_name] extends Model {

h3(#db). db

Expand Down Expand Up @@ -358,11 +363,17 @@ Valid values are @NONE@, @READ_UNCOMMITTED@, @READ_COMMITTED@, @REPEATABLE_READ@

Default: database dependent, usually @READ_COMMITTED@

h3(#db.evolutions.enabled). db.[DB_name].evolutions.enabled

Allows to disable database evolutions on a specific database.

Default: true.

h3(#db.pass). db.pass

Database connection password, used with "db.url":#db.url.

Default: no value, or an empty string when "db":#db is set to @mem@ or @fs@.
Default: no value, or an empty string when "db":#db is set to @mem@ or @fs@.

h3(#db.pool.acquireIncrement). db.pool.acquireIncrement

Expand Down Expand Up @@ -745,11 +756,11 @@ h3(#java.source). java.source

Java source level, which overrides the @java.version@ system property. For example:

bc. java.source=1.8
bc. java.source=11

Values: @1.7@ (No longer supported since 1.5.0), @1.8@, @9@, @10@.
Values: @1.7@ (No longer supported since 1.5.0), @1.8@ (No longer supported since 1.7.0), @9@ (No longer supported since 1.7.0), @10@ (No longer supported since 1.7.0), @11@, @12@, @13@, @14@, @15@, @17@.

Default: @1.8@
Default: @11@


h2(#jpa). JPA
Expand Down Expand Up @@ -832,6 +843,13 @@ Defines which port is used by JPDA when application is in debug mode. For exampl

Default: @8000@

h3(#jpda.address). jpda.address

Defines which address is used by JPDA when application is in debug mode. For example:
jpda.address=0.0.0.0
jpda.address=* # Special value only for JDK >= 9, will bind to 0.0.0.0.

Default: none, in that case the listening address will be 127.0.0.1 only for JDK >= 9

h2(#keystore). keystore

Expand Down
1 change: 1 addition & 0 deletions documentation/manual/evolutions.textile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ DROP TABLE User;
As you see you have to delimitate the both *Ups* and *Downs* section by using comments in your SQL script.

Evolutions are automatically activated if a database is configured in @application.conf@ and evolution scripts are present. You can disable them by setting "evolutions.enabled":configuration#evolutions.enabled to @false@. For example when tests set up their own database you can disable evolutions for the test environment.
In multiple databases context, there is the ability to disable the evolutions on a specific database by setting the "db.[DB_name].evolutions.enabled":configuration#db.evolutions.enabled parameter to @false@.

When **evolutions** are activated, Play will check your database schema state before each request in DEV mode, or before starting the application in PROD mode. In DEV mode, if your database schema is not up to date, an error page will suggest that you synchronise your database schema by running the appropriate SQL script.

Expand Down
3 changes: 3 additions & 0 deletions documentation/manual/home.textile
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ h2. <a name="versionnotes">Version notes</a>
New versions of Play include certain changes. Check older release notes for:

# "About Play releases":releases/releases
# "Play 1.7.0":releases/release1.7.x/releasenotes-1.7.0
# "Play 1.6.0":releases/release1.6.x/releasenotes-1.6.0
# "Play 1.5.3":releases/release1.5.x/releasenotes-1.5.3
# "Play 1.5.2":releases/release1.5.x/releasenotes-1.5.2
# "Play 1.5.1":releases/release1.5.x/releasenotes-1.5.1
# "Play 1.5.0":releases/release1.5.x/releasenotes-1.5.0
Expand Down
6 changes: 3 additions & 3 deletions documentation/manual/install.textile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ h1. Installation guide

h2. <a name="prerequisites">Prerequisites</a>

To run the Play framework, you need "Java 8 or later":http://java.sun.com. If you wish to build Play from source, you will need the "Git source control client":http://git-scm.com/ to fetch the source code and "Ant":http://ant.apache.org/ to build it.
To run the Play framework, you need "Java 11 or later":http://java.sun.com. If you wish to build Play from source, you will need the "Git source control client":http://git-scm.com/ to fetch the source code and "Ant":http://ant.apache.org/ to build it.

Be sure to have Java in the current path (enter @java -version@ to check). Play will use the default Java or the one available at the @$JAVA_HOME@ path if defined.

Expand All @@ -17,15 +17,15 @@ h3. Generic instructions
In general, the installation instructions are as follows.

# Install Java.
# Download the latest "Play binary package":http://download.playframework.com/ and extract the archive.
# Download the latest "Play binary package":https://www.playframework.com/releases and extract the archive.
# Add the ‘play’ command to your system path and make sure it is executable.


h3. Mac OS X

Java is built-in, or installed automatically, so you can skip the first step.

# Download the latest "Play binary package":http://download.playframework.com/ and extract it in @/Applications@.
# Download the latest "Play binary package":https://www.playframework.com/releases and extract it in @/Applications@.
# Edit @/etc/paths@ and add the line @/Applications/play-1.2.5@ (for example).

An alternative on OS X is:
Expand Down
13 changes: 12 additions & 1 deletion documentation/manual/jpa.textile
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ bc. Post.find("byTitle", "My first post").fetch();
Post.find("byTitleLike", "%hello%").fetch();
Post.find("byAuthorIsNull").fetch();
Post.find("byTitleLikeAndAuthor", "%hello%", connectedUser).fetch();
Post.find("byTitleOrderByTitle", "A nice post").fetch();
Post.find("byTitleOrderByNbCommentsDesc", "A nice post").fetch();

Simple queries follow the following syntax <code>==[Property][Comparator]And?==</code> where Comparator can be the following:
Simple queries follow the following syntax <code>==[Property][Comparator]And?[Orderdirective]?==</code> where Comparator can be the following:

* @LessThan@ - less than the given value
* @LessThanEquals@ - less than or equal a give value
Expand All @@ -133,6 +135,15 @@ Simple queries follow the following syntax <code>==[Property][Comparator]And?==<
* @IsNotNull@ - Not a null value (doesn't require an argument)
* @IsNull@ - Is a null value (doesn't require an argument)

and Orderdirective can be (e.g for a property named @name@) :

* @OrderByName@ - default ascending order
* @OrderByNameDesc@ - descending order

you can also use several attributes in Orderdirective :
* @OrderByNameAndAge@
* @OrderByNameAndAgeDesc@

h3. Find using a JPQL query

You can use a JPQL query:
Expand Down
23 changes: 14 additions & 9 deletions documentation/manual/logs.textile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
h1. Logging configuration

The Play logger is built on "Log4j":http://logging.apache.org/log4j/1.2/index.html. Since most Java libraries use Log4j or a wrapper able to use Log4j as a backend, you can easily configure logging that is well-suited to your application.
The Play logger is built on "Log4j":https://logging.apache.org/log4j/2.x. Since most Java libraries use Log4j or a wrapper able to use Log4j as a backend, you can easily configure logging that is well-suited to your application.


h2. <a name="logging">Logging from your application</a>
Expand Down Expand Up @@ -30,14 +30,19 @@ If you need to fully configure Log4j, create a @log4j.properties@ file in the @c

The default Log4j configuration is the following:

bc. log4j.rootLogger=ERROR, Console

log4j.logger.play=INFO

# Console
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p ~ %m%n
bc. # appender Console
appender.console.type = Console
appender.console.name = STDOUT
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d [%t] %p %c - %m%n
appender.console.filter.threshold.type = ThresholdFilter
appender.console.filter.threshold.level = INFO
# play logger
logger.app.name = play
logger.app.level = INFO
# root logger
rootLogger.level = INFO
rootLogger.appenderRef.console.ref = STDOUT

Copy this file and update it for your specifics needs!

Expand Down
31 changes: 20 additions & 11 deletions documentation/manual/production.textile
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,26 @@ For production it’s a good idea to use rolling log files. Do not send logging

Create a custom @log4j.properties@ in the @conf/@ directory:

bc. log4j.rootLogger=ERROR, Rolling

log4j.logger.play=INFO

# Rolling files
log4j.appender.Rolling=org.apache.log4j.RollingFileAppender
log4j.appender.Rolling.File=application.log
log4j.appender.Rolling.MaxFileSize=1MB
log4j.appender.Rolling.MaxBackupIndex=100
log4j.appender.Rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.Rolling.layout.ConversionPattern=%d{ABSOLUTE} %-5p ~ %m%n
bc. # appender Console
appender.fileLogger.type = RollingFile
appender.fileLogger.name = fileLogger
appender.fileLogger.fileName= logs/application.log
appender.fileLogger.filePattern= logs/application%i.log
appender.fileLogger.layout.type = PatternLayout
appender.fileLogger.layout.pattern = %d [%t] %p %c - %m%n
appender.fileLogger.policies.type = Policies
appender.fileLogger.policies.size.type = SizeBasedTriggeringPolicy
appender.fileLogger.policies.size.size = 1MB
appender.fileLogger.strategy.type = DefaultRolloverStrategy
appender.fileLogger.strategy.max = 100
appender.fileLogger.filter.threshold.type = ThresholdFilter
appender.fileLogger.filter.threshold.level = ERROR
# play logger
logger.app.name = play
logger.app.level = ERROR
# root logger
rootLogger.level = ERROR
rootLogger.appenderRef.fileLogger.ref = fileLogger

h2. <a name="server">Front-end HTTP server</a>

Expand Down
Loading

0 comments on commit 8463acc

Please sign in to comment.