Jump to content
Excelsior Forums

Search the Community

Showing results for tags 'configuration'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Excelsior JET
    • News
    • How Do I?
    • Defect Reports
    • General Discussion
    • Archive (read-only)
  • Other Excelsior Products
    • Excelsior Installer / Excelsior Delivery
    • xFunction
    • Native XDS-x86/XDS-C
    • JFCMark

Found 1 result

  1. Load external configuration file

    am using the Excelsior Jet Gradle plug-in to secure our java web application based on Ratpack. Using the excelsiorJet block below I have successfully compiled and ran the application using gradle jetTestRun. excelsiorJet { //UNCOMMENT THIS ONCE YOU HAVE RUN GRADLE TEST RUN globalOptimizer = true mainClass = 'ratpack.groovy.GroovyRatpackMain' groupId = 'com.reshufl' version = '1.0.1' //jvmArgs "-Xms256m", "-Xmx512m", "-Djava.class.path=./config/" jvmArgs "-Xms256m", "-Xmx512m" stackAllocation = true inlineExpansion = 'aggressive' compilerOptions = ["-Djet.gc.ratio=11", "-Djet.gc.no.swap", "-Djava.class.path=./config/application.properties"] //compilerOptions = ["-Djet.gc.ratio=11", "-Djet.gc.no.swap"] optimizationPreset = 'smart' dependencies { dependency { groupId = 'com.reshufl' isLibrary = false } //dependency { // path = new File(project.projectDir, "src/ratpack/application.properties") // packagePath = 'config' // pack = 'none' //} } packageFiles { file { path = new File(project.projectDir, "src/ratpack/application.properties") packagePath = "config" } } runtime { flavor = 'server' components = ['jce'] } } On startup Ratpack is configured to load the configuration file "src/ratpack/application.properties" that is currently being built into the deployment package. I am trying to externalize this configuration file so that it is read from a config directory created by the installer so that the end user can modify the application properties on start-up. So far I managed to create a copy of the file under the config directory however I've been unable to modify the classpath to read this version of the file first. I've looked at the documentation but just don't seem to be able to get this going. Please could you point me in the right direction for how to do this using the gradle plug in.
×