-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: grails-core issue 13324 * chore: Back to snapshot (5.0.1 release failed) * build: update faulty build config * fix: revert removal of deprecated class * build: extend nexus publishing transition check period * build: update faulty build config * build(style): Consistent use of quotes * test: Extend timout in PubSubSpec
- Loading branch information
Showing
6 changed files
with
98 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
group = 'org.grails.plugins' | ||
|
||
tasks.named('bootJar').configure { | ||
tasks.named('bootJar') { | ||
enabled = false // Grails plugins shouldn't produce a boot jar | ||
} | ||
tasks.named('jar').configure { | ||
tasks.named('jar') { | ||
enabled = true | ||
archiveClassifier = '' // Skip the '-plain' suffix on the jar file name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
grails-plugin-async/src/main/groovy/grails/artefact/AsyncController.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* Copyright 2014 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package grails.artefact | ||
|
||
import grails.async.web.AsyncGrailsWebRequest | ||
import grails.events.Events | ||
import org.grails.web.util.GrailsApplicationAttributes | ||
import groovy.transform.CompileStatic | ||
import org.springframework.web.context.request.async.AsyncWebRequest | ||
import org.springframework.web.context.request.async.WebAsyncManager | ||
import org.springframework.web.context.request.async.WebAsyncUtils | ||
|
||
import javax.servlet.AsyncContext | ||
import javax.servlet.http.HttpServletRequest | ||
|
||
import org.grails.plugins.web.async.GrailsAsyncContext | ||
import org.grails.web.servlet.mvc.GrailsWebRequest | ||
import org.springframework.web.context.request.RequestContextHolder | ||
|
||
/** | ||
* | ||
* @author Jeff Brown | ||
* @since 3.0 | ||
* @deprecated Use {@link grails.async.web.AsyncController} instead | ||
*/ | ||
@CompileStatic | ||
@Deprecated | ||
trait AsyncController extends Events { | ||
|
||
/** | ||
* Raw access to the Servlet 3.0 startAsync method | ||
* | ||
* @return a new {@link javax.servlet.AsyncContext} | ||
*/ | ||
AsyncContext startAsync() { | ||
GrailsWebRequest webRequest = (GrailsWebRequest)RequestContextHolder.currentRequestAttributes() | ||
|
||
HttpServletRequest request = webRequest.currentRequest | ||
WebAsyncManager asyncManager = WebAsyncUtils.getAsyncManager(request) | ||
|
||
AsyncWebRequest asyncWebRequest = new AsyncGrailsWebRequest(request, webRequest.currentResponse, webRequest.servletContext) | ||
asyncManager.setAsyncWebRequest(asyncWebRequest) | ||
|
||
asyncWebRequest.startAsync() | ||
request.setAttribute(GrailsApplicationAttributes.ASYNC_STARTED, true) | ||
new GrailsAsyncContext(asyncWebRequest.asyncContext, webRequest) | ||
} | ||
} |