FINERACT-1421: Fixing Eclipse build/debug

This commit is contained in:
Petri Tuomola
2021-11-04 07:47:04 +01:00
committed by Aleksandar Vidakovic
parent d3400888fa
commit 344e4fe21a
4 changed files with 29 additions and 10 deletions
+16
View File
@@ -19,7 +19,9 @@
description = 'Fineract Provider'
apply plugin: 'org.zeroturnaround.gradle.jrebel'
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'openjpa'
apply plugin: 'com.gorylenko.gradle-git-properties'
@@ -175,6 +177,20 @@ war {
enabled = true
}
// If we are running Gradle within Eclipse to enhance classes with OpenJPA,
// set the classes directory to point to Eclipse's default build directory
if (project.hasProperty('env') && project.getProperty('env') == 'eclipse')
{
sourceSets.main.java.outputDir = new File(rootProject.projectDir, "fineract-provider/bin/main")
}
eclipse
{
project {
buildCommand([ LaunchConfigHandle: "<project>/.externalToolBuilders/OpenJPA Enhance Builder.launch" ], 'org.eclipse.ui.externaltools.ExternalToolBuilder')
}
}
/* http://stackoverflow.com/questions/19653311/jpa-repository-works-in-idea-and-production-but-not-in-gradle */
sourceSets.main.output.resourcesDir = sourceSets.main.java.outputDir
sourceSets.test.output.resourcesDir = sourceSets.test.java.outputDir