From f010139c416a372af1affc77980f5803672dbe1a Mon Sep 17 00:00:00 2001 From: Huw Ayling-Miller Date: Sat, 22 Feb 2020 23:55:01 +0000 Subject: [PATCH] #132 Create rocker-compiler.conf in generated-sources --- .../compiler/JavaGeneratorRunnable.java | 2 +- rocker-test-reload/pom.xml | 27 ++++++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/rocker-compiler/src/main/java/com/fizzed/rocker/compiler/JavaGeneratorRunnable.java b/rocker-compiler/src/main/java/com/fizzed/rocker/compiler/JavaGeneratorRunnable.java index c913097..d5fb798 100644 --- a/rocker-compiler/src/main/java/com/fizzed/rocker/compiler/JavaGeneratorRunnable.java +++ b/rocker-compiler/src/main/java/com/fizzed/rocker/compiler/JavaGeneratorRunnable.java @@ -117,7 +117,7 @@ public void run() throws RuntimeException{ // use resource name, but strip leading slash // place it into the classes directory (not the compile directory) try{ - File configFile = new File(this.configuration.getClassDirectory(), RockerRuntime.CONF_RESOURCE_NAME.substring(1)); + File configFile = new File(this.configuration.getOutputDirectory(), RockerRuntime.CONF_RESOURCE_NAME.substring(1)); this.configuration.write(configFile); log.info("Generated rocker configuration " + configFile); }catch(IOException iox){ diff --git a/rocker-test-reload/pom.xml b/rocker-test-reload/pom.xml index b993b08..92fcba9 100644 --- a/rocker-test-reload/pom.xml +++ b/rocker-test-reload/pom.xml @@ -46,6 +46,31 @@ + + org.codehaus.mojo + build-helper-maven-plugin + 1.7 + + + add-generated-resources + generate-test-resources + + add-test-resource + + + + + ${basedir}/target/generated-test-sources/rocker + ${basedir}/target/test-classes + + **/*.conf + + + + + + + @@ -124,4 +149,4 @@ - \ No newline at end of file +