Skip to content

Instantly share code, notes, and snippets.

@ekopradesga
Last active April 8, 2018 09:24
Show Gist options
  • Save ekopradesga/817b65474046b72f57859dac3ccc62d0 to your computer and use it in GitHub Desktop.
Save ekopradesga/817b65474046b72f57859dac3ccc62d0 to your computer and use it in GitHub Desktop.
Gradle Build Files For Spring, Hibernate, Postgresql And Tomcat In Java Website Development
/*
* This build file was generated by the Gradle 'init' task.
*
* This generated file contains a commented-out sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* user guide available at https://docs.gradle.org/4.1/userguide/tutorial_java_projects.html
*/
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.akhikhl.gretty:gretty:+'
}
}
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'org.akhikhl.gretty'
group = 'com.rsia.madura' // Generated output GroupId
version = '1.0-SNAPSHOT' // Version in generated output
sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceSets {
main {
java {
srcDir 'src'
}
resources {
srcDir 'WebContent'
}
}
}
repositories {
jcenter()
mavenLocal()
mavenCentral()
}
dependencies {
compile (
'javax.servlet:jstl:1.2',
'org.springframework:spring-webmvc:5.0.2.RELEASE',
'org.springframework:spring-tx:5.0.2.RELEASE',
'org.springframework:spring-orm:5.0.2.RELEASE',
'org.hibernate:hibernate-core:5.2.12.Final',
'org.hibernate:hibernate-c3p0:5.2.12.Final',
'org.postgresql:postgresql:42.2.0'
)
providedCompile(
'javax.servlet:javax.servlet-api:3.1.0',
)
}
gretty {
webAppDirName = "WebContent"
httpPort = 8081
contextPath = ''
servletContainer = 'tomcat8'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment