Skip to content

Commit

Permalink
Follow-up fix for #93: "Groovy version conflicts when running farmSta…
Browse files Browse the repository at this point in the history
…rt with a war file.". Now fixed groovy version conflicts when running spring-boot products.
  • Loading branch information
akhikhl committed Oct 9, 2014
1 parent 5baff12 commit 0977366
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ class GrettyPlugin implements Plugin<Project> {
transitive = false
}
grettyStarter
runtimeNoSpringBoot {
productRuntime {
extendsFrom project.configurations.runtime
exclude group: 'org.springframework.boot'
// We exclude groovy from product, because it is already included in runner configuration
// (see gretty-runner dependencies). Thus we avoid groovy version conflicts.
exclude module: 'groovy-all'
}
}
if(!project.configurations.findByName('providedCompile'))
Expand Down Expand Up @@ -575,7 +578,7 @@ class GrettyPlugin implements Plugin<Project> {
}

void apply(final Project project) {

if(project.gradle.gradleVersion.startsWith('1.')) {
int releaseNumber = project.gradle.gradleVersion.split('\\.')[1] as int
if(releaseNumber < 10)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class ProductConfigurer {
for(File f in (webappDir.listFiles() ?: []))
webappsDir.add(f, appDir)
def resolvedClassPath = new LinkedHashSet<URL>()
resolvedClassPath.addAll(ProjectUtils.getClassPathJars(proj, 'runtimeNoSpringBoot'))
resolvedClassPath.addAll(ProjectUtils.getClassPathJars(proj, 'productRuntime'))
resolvedClassPath.addAll(ProjectUtils.resolveClassPath(proj, wconfig.classPath))
files = resolvedClassPath.collect { new File(it.path) }
files -= getRunnerFileCollection().files
Expand Down Expand Up @@ -300,7 +300,7 @@ Version: ${project.version}"""
if(!sconfig.logbackConfigFile && product.autoGenerateLogbackConfig)
logbackConfig = LogbackUtils.generateLogbackConfig(sconfig)
jsonConfig = writeConfigToJson()
createLaunchScripts()
createLaunchScripts()
}

protected void writeConfigFiles() {
Expand Down

0 comments on commit 0977366

Please sign in to comment.