Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 61 lines (49 sloc) 2.042 kb
3e17890 1.1 branch is now trunk
graeme authored
1 /*
2 * Copyright 2004-2005 the original author or authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
b5876f6 @graemerocher more build refactoring. Moved code a lot of code out of _GrailsPackage a...
graemerocher authored
17 import org.codehaus.groovy.grails.project.packaging.*
0371004 cleanup
Burt Beckwith authored
18
3e17890 1.1 branch is now trunk
graeme authored
19 /**
20 * Gant script that creates a WAR file from a Grails project
21 *
22 * @author Graeme Rocher
23 *
24 * @since 0.4
25 */
26
27 includeTargets << grailsScript("_GrailsClean")
28 includeTargets << grailsScript("_GrailsPackage")
29
30 includeJars = true
a379299 @graemerocher Moved the configuration of more variables up a level to improve startup ...
graemerocher authored
31 buildExplodedWar = getPropertyValue("grails.war.exploded", false).toBoolean()
0bb9a46 @graemerocher completed refactor of _GrailsWar into separate classes
graemerocher authored
32 warCreator = new GrailsProjectWarCreator(grailsSettings, eventListener, projectPackager, ant, isInteractive)
3e17890 1.1 branch is now trunk
graeme authored
33
0bb9a46 @graemerocher completed refactor of _GrailsWar into separate classes
graemerocher authored
34 defaultWarDependencies = warCreator.defaultWarDependencies
3e17890 1.1 branch is now trunk
graeme authored
35
835947f @burtbeckwith cleanup
burtbeckwith authored
36 target (configureRunningScript: "Sets the currently running script, in case called directly") {
0371004 cleanup
Burt Beckwith authored
37 System.setProperty('current.gant.script', "war")
3e17890 1.1 branch is now trunk
graeme authored
38 }
835947f @burtbeckwith cleanup
burtbeckwith authored
39
3e17890 1.1 branch is now trunk
graeme authored
40 target (war: "The implementation target") {
e31359b bug fix - was ignoring the commandline war file name
Burt Beckwith authored
41 depends(parseArguments, configureRunningScript, cleanWarFile, packageApp, compilegsp, configureWarName)
651454b whitespace, cleanup, STS warnings
Burt Beckwith authored
42 warCreator.packageWar()
3e17890 1.1 branch is now trunk
graeme authored
43 }
44
45 target(createDescriptor:"Creates the WEB-INF/grails.xml file used to load Grails classes in WAR mode") {
0bb9a46 @graemerocher completed refactor of _GrailsWar into separate classes
graemerocher authored
46 warCreator.createDescriptor()
fec3d9b @graemerocher Refactored/improved war command and made it take into account the config...
graemerocher authored
47 }
48
3e17890 1.1 branch is now trunk
graeme authored
49 target(cleanUpAfterWar:"Cleans up after performing a WAR") {
50 ant.delete(dir:"${stagingDir}", failonerror:true)
51 }
52
53 target(warPlugins:"Includes the plugins in the WAR") {
fec3d9b @graemerocher Refactored/improved war command and made it take into account the config...
graemerocher authored
54 def pluginInfos = pluginSettings.supportedPluginInfos
0bb9a46 @graemerocher completed refactor of _GrailsWar into separate classes
graemerocher authored
55 warCreator.warPluginsInternal(pluginInfos)
fec3d9b @graemerocher Refactored/improved war command and made it take into account the config...
graemerocher authored
56 }
57
3e17890 1.1 branch is now trunk
graeme authored
58 target(configureWarName: "Configuring WAR name") {
e31359b bug fix - was ignoring the commandline war file name
Burt Beckwith authored
59 warCreator.configureWarName(argsMap.params ? argsMap.params[0] : null)
3e17890 1.1 branch is now trunk
graeme authored
60 }
Something went wrong with that request. Please try again.