org.ninjaframework:ninja-ebean-demo

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Categories

Categories

Ebean Data ORM Ninja User Interface Web Frameworks
GroupId

GroupId

org.ninjaframework
ArtifactId

ArtifactId

ninja-ebean-demo
Last Version

Last Version

1.4.0
Release Date

Release Date

Type

Type

war
Description

Description

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Download ninja-ebean-demo

How to add to project

<!-- https://jarcasting.com/artifacts/org.ninjaframework/ninja-ebean-demo/ -->
<dependency>
    <groupId>org.ninjaframework</groupId>
    <artifactId>ninja-ebean-demo</artifactId>
    <version>1.4.0</version>
    <type>war</type>
</dependency>
// https://jarcasting.com/artifacts/org.ninjaframework/ninja-ebean-demo/
implementation 'org.ninjaframework:ninja-ebean-demo:1.4.0'
// https://jarcasting.com/artifacts/org.ninjaframework/ninja-ebean-demo/
implementation ("org.ninjaframework:ninja-ebean-demo:1.4.0")
'org.ninjaframework:ninja-ebean-demo:war:1.4.0'
<dependency org="org.ninjaframework" name="ninja-ebean-demo" rev="1.4.0">
  <artifact name="ninja-ebean-demo" type="war" />
</dependency>
@Grapes(
@Grab(group='org.ninjaframework', module='ninja-ebean-demo', version='1.4.0')
)
libraryDependencies += "org.ninjaframework" % "ninja-ebean-demo" % "1.4.0"
[org.ninjaframework/ninja-ebean-demo "1.4.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.ninjaframework : ninja-servlet jar 3.0.0
org.ninjaframework : ninja-ebean-module jar 1.4.0

provided (1)

Group / Artifact Type Version
javax.servlet : javax.servlet-api jar 3.0.1

test (1)

Group / Artifact Type Version
org.ninjaframework : ninja-test-utilities jar 3.0.0

Project Modules

There are no modules declared in this project.
 _______  .___ _______        ____.  _____   
 \      \ |   |\      \      |    | /  _  \  
 /   |   \|   |/   |   \     |    |/  /_\  \
/    |    \   /    |    \/\__|    /    |    \
\____|__  /___\____|__  /\________\____|__  /
     web\/framework   \/                  \/

Ebean support for Ninja

Ebean is a simple and powerful ORM tool. This plugin allows to use Ebean in any Ninja application.

More

Getting started

Configuring the module for your application is quite easy. There is a demo application that shows you how to do it. Check out subproject ninja-ebean-demo/pom.xml for further information.

More about Ebean: https://ebean.io/

Overview

This module works with the Ebean version 12.1.1+.

If you need compatibility with earlier versions of Ebean please see v2.0.0 which supports a minimum Ebean version v3.2.5, and has also been tested with the later versions in the 6.x-8.x series.

If you need compatibility with earlier versions of Ebean please see v1.5.1 which supports a minimum Ebean version v3.2.5, and has also been tested with the later versions in the 4.x series.

NOTE: This module only supports a single (default) Ebean server. Feel free to contribute code to the project if you need other features. Thanks!

Setup

  1. Add your db conf to your application.conf file. For a simple H2 database:

    ebean.datasource.databaseUrl=jdbc:h2:testdatabase:tests;DB_CLOSE_DELAY=-1;AUTO_SERVER=TRUE

For a MySQL database (you'll also need to add the MySQL driver dependency to your project)

ebean.ddl.generate = false
ebean.ddl.run = false
ebean.models = com.company.models.*,org.otherorg.models.Foo
ebean.datasource.name = NameOfEbeanServer
ebean.datasource.databaseUrl = jdbc:mysql://localhost:3306/dbname
ebean.datasource.databaseDriver = com.mysql.jdbc.Driver
ebean.datasource.username = root
ebean.datasource.password = test

Please note that ebean.models accepts a comma delimited list of both class names as well as packages (just make sure it ends with .*)

  1. Add the ninja-ebeans dependency to your pom.xml:

    org.ninjaframework ninja-ebean-module 3.0.0
  2. Add ebean's enhancer plugin to your pom.xml:

    io.ebean ebean-maven-plugin 12.1.1 ebean-enhancer process-classes ${project.build.outputDirectory} models debug=1 enhance
  3. Install the module in your conf.Module:

    protected void configure() {

     // This installs the NinjaModule and handles the lifecycle
     install(new NinjaEbeanModule());
    

    }

And that's it already :)

Releasing (committers only)

Make sure you got gpg installed on your machine. Gpg is as good as gpg2, so there's not much difference. But the gpg plugin in maven works better with gpg, so we go with that one

brew install gpg

Make sure to create a key

gpg --gen-key

Then list the keys and send the public key to a keyserver so that people can verify that it's you:

gpg --keyserver hkp://pool.sks-keyservers.net --send-keys YOUR_PUBLIC_KEY

Make sure to set

export GPG_TTY=$(tty)

... that way any input of gpg will be properly shown (entering your passphrase for instance)...

Make sure you set the sonatype credentials in your ~/.m2/settings.xml:

<settings>

  <servers>
    <server>
      <id>ossrh</id>
      <username>USERNAME</username>
      <password>PASSWORD</password>
    </server>
  </servers>

</settings>

Then you can create a new release like so:

mvn release:clean -Prelease
mvn release:prepare -Prelease
mvn release:perform -Prelease
org.ninjaframework

Ninja Web Framework

Versions

Version
1.4.0
1.3
1.2.2
1.2
1.1
1.0