Skip to content

Commit

Permalink
Add gradle task to copy resources to out folder
Browse files Browse the repository at this point in the history
  • Loading branch information
dreab8 committed Nov 10, 2017
1 parent 20422cd commit f92bffa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions build.gradle
Expand Up @@ -268,6 +268,21 @@ subprojects { subProject ->
// }
}

/*
The latest versions of IntelliJ copy and use the test resources into out/test/resources
this occurs before the placeholder in the test config file are substituted
with the testing values.
This behaviour prevents the execution of the hibernate tests from inside the IDE.
A solution is to enable the 'After Build' Execution of the copyResourcesToIntelliJOutFolder task
from the 'Gradle project' IntelliJ tool window ( The task can be found under hibernate-orm > Task > other)
*/
task copyResourcesToIntelliJOutFolder(type: Copy) {
from "$subProject.buildDir/resources/test"
into 'out/test/resources'
}

processTestResources.doLast( {
copy {
from( sourceSets.test.java.srcDirs ) {
Expand Down

0 comments on commit f92bffa

Please sign in to comment.