Skip to content

Commit b872349

Browse files
committed
Upgrading to Grails 3.2.8 with "plugin" profile
1 parent 2b63aea commit b872349

File tree

12 files changed

+92
-40
lines changed

12 files changed

+92
-40
lines changed

build.gradle

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
buildscript {
2-
ext {
3-
grailsVersion = project.grailsVersion
4-
}
52
repositories {
63
mavenLocal()
74
maven { url "https://repo.grails.org/grails/core" }
85
}
96
dependencies {
107
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
8+
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.8.2"
119
}
1210
}
1311

@@ -19,23 +17,11 @@ apply plugin:"idea"
1917
apply plugin:"org.grails.grails-plugin"
2018
apply plugin:"org.grails.grails-plugin-publish"
2119

22-
ext {
23-
grailsVersion = project.grailsVersion
24-
gradleWrapperVersion = project.gradleWrapperVersion
25-
}
26-
2720
repositories {
2821
mavenLocal()
2922
maven { url "https://repo.grails.org/grails/core" }
3023
}
3124

32-
dependencyManagement {
33-
imports {
34-
mavenBom "org.grails:grails-bom:$grailsVersion"
35-
}
36-
applyMavenExclusions false
37-
}
38-
3925
dependencies {
4026
compile "org.springframework.boot:spring-boot-starter-logging"
4127
compile "org.springframework.boot:spring-boot-autoconfigure"
@@ -49,6 +35,13 @@ dependencies {
4935
testCompile "org.grails:grails-plugin-testing"
5036
}
5137

38+
bootRun {
39+
jvmArgs("-Dspring.output.ansi.enabled=always")
40+
addResources = true
41+
}
42+
// enable if you wish to package this plugin as a standalone application
43+
bootRepackage.enabled = false
44+
5245
grailsPublish {
5346
githubSlug = "wizpanda/multi-file-upload"
5447
userOrg = "wizpanda"

gradle.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
grailsVersion=3.1.11
2-
gradleWrapperVersion=2.13
1+
grailsVersion=3.2.8
2+
gormVersion=6.1.0.RELEASE
3+
gradleWrapperVersion=3.4.1

gradle/wrapper/gradle-wrapper.jar

-818 Bytes
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Sep 12 19:18:52 IST 2016
1+
#Fri Nov 27 23:09:32 CET 2015
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-bin.zip

gradlew.bat

100644100755
File mode changed.

grails-app/conf/application.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
1+
---
12
grails:
23
profile: plugin
34
codegen:
45
defaultPackage: multi.file.upload
56
spring:
67
transactionManagement:
78
proxies: false
9+
gorm:
10+
# Whether to autowire entities.
11+
# Disabled by default for performance reasons.
12+
autowire: false
13+
reactor:
14+
# Whether to translate GORM events into Reactor events
15+
# Disabled by default for performance reasons
16+
events: false
817
info:
918
app:
1019
name: '@info.app.name@'
1120
version: '@info.app.version@'
1221
grailsVersion: '@info.app.grailsVersion@'
1322
spring:
23+
main:
24+
banner-mode: "off"
1425
groovy:
1526
template:
1627
check-template-location: false
28+
1729
# Spring Actuator Endpoints are Disabled by Default
1830
endpoints:
1931
enabled: false

grails-app/conf/logback.groovy

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
11
import grails.util.BuildSettings
22
import grails.util.Environment
3+
import org.springframework.boot.logging.logback.ColorConverter
4+
import org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter
5+
6+
import java.nio.charset.Charset
7+
8+
conversionRule 'clr', ColorConverter
9+
conversionRule 'wex', WhitespaceThrowableProxyConverter
310

411
// See http://logback.qos.ch/manual/groovy.html for details on configuration
512
appender('STDOUT', ConsoleAppender) {
613
encoder(PatternLayoutEncoder) {
7-
pattern = "%level %logger - %msg%n"
14+
charset = Charset.forName('UTF-8')
15+
16+
pattern =
17+
'%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} ' + // Date
18+
'%clr(%5p) ' + // Log level
19+
'%clr(---){faint} %clr([%15.15t]){faint} ' + // Thread
20+
'%clr(%-40.40logger{39}){cyan} %clr(:){faint} ' + // Logger
21+
'%m%n%wex' // Message
822
}
923
}
1024

11-
root(ERROR, ['STDOUT'])
12-
1325
def targetDir = BuildSettings.TARGET_DIR
14-
if (Environment.isDevelopmentMode() && targetDir) {
26+
if (Environment.isDevelopmentMode() && targetDir != null) {
1527
appender("FULL_STACKTRACE", FileAppender) {
1628
file = "${targetDir}/stacktrace.log"
1729
append = true
@@ -21,3 +33,4 @@ if (Environment.isDevelopmentMode() && targetDir) {
2133
}
2234
logger("StackTrace", ERROR, ['FULL_STACKTRACE'], false)
2335
}
36+
root(ERROR, ['STDOUT'])
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package multi.file.upload
2+
3+
class UrlMappings {
4+
5+
static mappings = {
6+
"/$controller/$action?/$id?(.$format)?" {
7+
constraints {
8+
// apply constraints here
9+
}
10+
}
11+
12+
"/"(view: "/index")
13+
"500"(view: "/error")
14+
"404"(view: "/notFound")
15+
}
16+
}

grails-app/init/multi/file/upload/Application.groovy renamed to grails-app/init/com/wizpanda/Application.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package multi.file.upload
1+
package com.wizpanda
22

33
import grails.boot.*
44
import grails.boot.config.GrailsAutoConfiguration

grails-app/init/BootStrap.groovy renamed to grails-app/init/com/wizpanda/BootStrap.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package com.wizpanda
2+
13
class BootStrap {
24

35
def init = { servletContext ->

grails-app/views/error.gsp

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
3-
<head>
4-
<title><g:if env="development">Grails Runtime Exception</g:if><g:else>Error</g:else></title>
5-
<meta name="layout" content="main">
6-
<g:if env="development"><asset:stylesheet src="errors.css"/></g:if>
7-
</head>
8-
<body>
9-
<g:if env="development">
10-
<g:renderException exception="${exception}" />
11-
</g:if>
12-
<g:else>
13-
<ul class="errors">
14-
<li>An error has occurred</li>
15-
</ul>
16-
</g:else>
17-
</body>
3+
<head>
4+
<title><g:if env="development">Grails Runtime Exception</g:if><g:else>Error</g:else></title>
5+
<meta name="layout" content="main">
6+
<g:if env="development"><asset:stylesheet src="errors.css"/></g:if>
7+
</head>
8+
9+
<body>
10+
<g:if env="development">
11+
<g:if test="${Throwable.isInstance(exception)}">
12+
<g:renderException exception="${exception}"/>
13+
</g:if>
14+
<g:elseif test="${request.getAttribute('javax.servlet.error.exception')}">
15+
<g:renderException exception="${request.getAttribute('javax.servlet.error.exception')}"/>
16+
</g:elseif>
17+
<g:else>
18+
<ul class="errors">
19+
<li>An error has occurred</li>
20+
<li>Exception: ${exception}</li>
21+
<li>Message: ${message}</li>
22+
<li>Path: ${path}</li>
23+
</ul>
24+
</g:else>
25+
</g:if>
26+
<g:else>
27+
<ul class="errors">
28+
<li>An error has occurred</li>
29+
</ul>
30+
</g:else>
31+
</body>
1832
</html>

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name="multi-file-upload"

0 commit comments

Comments
 (0)