Standardize Build

The build now uses spring build conventions to simplify the build

Fixes gh-4284
This commit is contained in:
Rob Winch
2017-03-28 15:45:30 -05:00
parent 5a65da400d
commit dd6fc48dd8
119 changed files with 1110 additions and 2227 deletions

View File

@@ -1,29 +0,0 @@
sonarqube.skipProject = true
dependencies {
provided "javax.servlet:javax.servlet-api:$servletApiVersion"
compile project(":spring-security-web"),
project(":spring-security-config"),
"org.hsqldb:hsqldb:$hsqlVersion",
"javax.validation:validation-api:$validationApiVersion",
"org.hibernate:hibernate-validator:$hibernateValidatorVersion",
"org.springframework:spring-webmvc:$springVersion",
"org.springframework:spring-orm:$springVersion",
"org.springframework:spring-context:$springVersion",
"org.springframework:spring-aop:$springVersion",
"org.springframework:spring-tx:$springVersion",
"org.springframework:spring-beans:$springVersion",
"org.springframework:spring-instrument:$springVersion",
"org.springframework:spring-core:$springVersion",
"org.springframework:spring-aspects:$springVersion",
"org.thymeleaf:thymeleaf-spring4:$thymeleafVersion",
"nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:2.0.4",
"org.eclipse.persistence:javax.persistence:$javaPersistenceVersion"
compile("org.hibernate:hibernate-entitymanager:$hibernateVersion") {
exclude group:'javassist', module: 'javassist'
}
compile("org.springframework.data:spring-data-jpa:$springDataJpaVersion") {
exclude group:'org.aspectj', module:'aspectjrt'
}
}

View File

@@ -0,0 +1,29 @@
apply plugin: 'io.spring.convention.spring-sample-war'
dependencies {
compile project(':spring-security-config')
compile project(':spring-security-web')
compile 'javax.validation:validation-api'
compile 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:2.0.4'
compile 'org.eclipse.persistence:javax.persistence'
compile('org.hibernate:hibernate-entitymanager') {
exclude group:'javassist', module: 'javassist'
}
compile 'org.hibernate:hibernate-validator'
compile 'org.hsqldb:hsqldb'
compile('org.springframework.data:spring-data-jpa') {
exclude group:'org.aspectj', module:'aspectjrt'
}
compile 'org.springframework:spring-aop'
compile 'org.springframework:spring-aspects'
compile 'org.springframework:spring-beans'
compile 'org.springframework:spring-context'
compile 'org.springframework:spring-core'
compile 'org.springframework:spring-instrument'
compile 'org.springframework:spring-orm'
compile 'org.springframework:spring-tx'
compile 'org.springframework:spring-webmvc'
compile 'org.thymeleaf:thymeleaf-spring5'
provided 'javax.servlet:javax.servlet-api'
}

View File

@@ -28,9 +28,9 @@ import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.thymeleaf.TemplateEngine;
import org.thymeleaf.spring4.SpringTemplateEngine;
import org.thymeleaf.spring4.templateresolver.SpringResourceTemplateResolver;
import org.thymeleaf.spring4.view.ThymeleafViewResolver;
import org.thymeleaf.spring5.SpringTemplateEngine;
import org.thymeleaf.spring5.templateresolver.SpringResourceTemplateResolver;
import org.thymeleaf.spring5.view.ThymeleafViewResolver;
import org.thymeleaf.templatemode.TemplateMode;
@EnableWebMvc
@@ -65,7 +65,7 @@ public class WebMvcConfiguration extends WebMvcConfigurerAdapter {
}
@Bean
public TemplateEngine templateEngine() {
public SpringTemplateEngine templateEngine() {
SpringTemplateEngine engine = new SpringTemplateEngine();
engine.setEnableSpringELCompiler(true);
engine.setTemplateResolver(templateResolver());