2011-07-19 8 views

答えて

4
あなたは http://grails.org/doc/latest/guide/17.%20Deployment.html

からクラスパス

// This closure is passed the command line arguments used to start the 
// war process. 
grails.war.copyToWebApp = { args -> 
fileset(dir:"web-app") { 
    include(name: "js/**") 
    include(name: "css/**") 
    include(name: "WEB-INF/**") 
} 
// This closure is passed the location of the staging directory that 
// is zipped up to make the WAR file, and the command line arguments. 
// Here we override the standard web.xml with our own. 
grails.war.resources = { stagingDir, args -> 
copy(file: "grails-app/conf/custom-web.xml", tofile: "${stagingDir}/WEB-INF/web.xml") 

}

に拾われるはずです/ WEB-INFでBuildConfig.groovy 何で戦争に含まれるファイルを設定することができます

BuildConfigで依存関係を指定して、grails.war.dependencies を使用して、warに追加のlibsを含めることもできます

def deps = [ 
"hibernate3.jar", 
"groovy-all-*.jar", 
"standard-${servletVersion}.jar", 
"jstl-${servletVersion}.jar", 
"oscache-*.jar", 
"commons-logging-*.jar", 
"sitemesh-*.jar", 
"spring-*.jar", 
"log4j-*.jar", 
"ognl-*.jar", 
"commons-*.jar", 
"xstream-1.2.1.jar", 
"xpp3_min-1.1.3.4.O.jar" ] 

grails.war.dependencies = { 
fileset(dir: "libs") { 
    deps.each { pattern -> 
     include(name: pattern) 
    } 
} 

}

関連する問題