Skip to content

template project of JavaEE-Glassfish application for IntelliJ IDEA and Gradle

License

Notifications You must be signed in to change notification settings

mike-neck/idea-gradle-javaee-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

idea-gradle-javaee-template

template project of JavaEE-Glassfish application for IntelliJ IDEA and Gradle

get start

  1. clone this repository
  2. run gradle rmDummy task and then run idea task.
  3. open IntelliJ IDEA with created ipr file.
  4. create new Run/Debug Configuration for glassfish server as follows

Run/Debug Configuration

  • The context root is the project name.

generate persistence.xml

To generate persistence.xml, add task with type JpaPersistenceXml.

task persistenceXml(type: JpaPersistenceXml) {
    baseJdbcUrl 'jdbc:h2:tcp://localhost:9092/~/h2database'
    jdbcUser 'sa'
    jdbcPassword 'sa'
}

Available configurations are listed bellow.

configuration type description default
version String jpa version 2.1
unitName String persistence unit name javaee
transactionType String type of transaction JTA
providerName String name of JPA provider eclipse
jdbcDriver String a name of fully qualified class name of JDBC Driver org.h2.Driver
baseJdbcUrl String a base name of database url jdbc:h2:tcp://localhost:9092/~/h2
jdbcUser String user name of database null
jdbcPassword String password of the user null
jdbcProperties Map jpa's property key and value [:]

About

template project of JavaEE-Glassfish application for IntelliJ IDEA and Gradle

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages