Skip to content

Commit

Permalink
fizzed#122 Create rocker-compiler.conf in generated-sources
Browse files Browse the repository at this point in the history
  • Loading branch information
huw0 committed Feb 22, 2020
1 parent a950d9d commit 0bb0409
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
Expand Up @@ -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){
Expand Down
27 changes: 26 additions & 1 deletion rocker-test-reload/pom.xml
Expand Up @@ -46,6 +46,31 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-generated-resources</id>
<phase>generate-test-resources</phase>
<goals>
<goal>add-test-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${basedir}/target/generated-test-sources/rocker</directory>
<targetPath>${basedir}/target/test-classes</targetPath>
<includes>
<include>**/*.conf</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- adjusts how surefire plugin manipulates classpath for testing -->
<!-- only way to get compiling & reloading to work like we expect -->
<plugin>
Expand Down Expand Up @@ -124,4 +149,4 @@
</dependency>

</dependencies>
</project>
</project>

0 comments on commit 0bb0409

Please sign in to comment.