Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/WASdev/ci.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Tian committed Feb 19, 2018
2 parents f7db4bb + 5708226 commit 7ae2834
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ci.gradle [![Build Status](https://travis-ci.org/WASdev/ci.gradle.svg?branch=master)](https://travis-ci.org/WASdev/ci.gradle) [![Maven Central Latest](https://maven-badges.herokuapp.com/maven-central/net.wasdev.wlp.gradle.plugins/liberty-gradle-plugin/badge.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22net.wasdev.wlp.gradle.plugins%22%20AND%20a%3A%22liberty-gradle-plugin%22) [![Build status](https://ci.appveyor.com/api/projects/status/ebq1a5qtt8ndhc57?svg=true)](https://ci.appveyor.com/project/wasdevb1/ci-gradle-6hm2g)
# ci.gradle [![Build Status](https://travis-ci.org/WASdev/ci.gradle.svg?branch=master)](https://travis-ci.org/WASdev/ci.gradle) [![Maven Central Latest](https://maven-badges.herokuapp.com/maven-central/net.wasdev.wlp.gradle.plugins/liberty-gradle-plugin/badge.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22net.wasdev.wlp.gradle.plugins%22%20AND%20a%3A%22liberty-gradle-plugin%22) [![Build status](https://ci.appveyor.com/api/projects/status/ebq1a5qtt8ndhc57/branch/master?svg=true)](https://ci.appveyor.com/project/wasdevb1/ci-gradle-6hm2g)

The Liberty Gradle plugin supports install and operational control of Liberty runtime and servers. Use it to manage your application on Liberty for integration test and to create Liberty server packages.

Expand Down
12 changes: 5 additions & 7 deletions src/main/groovy/net/wasdev/wlp/gradle/plugins/Liberty.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,12 @@ class Liberty implements Plugin<Project> {

//Uplift the jst.web facet version to 3.0 if less than 3.0 so WDT can deploy properly to Liberty.
//There is a known bug in the wtp plugin that will add duplicate facets, the first of the duplicates is honored.
project.tasks.getByName('eclipseWtpFacet').facet.file.whenMerged {
if(project.plugins.hasPlugin('war')) {
setFacetVersion(project, 'jst.web', JST_WEB_FACET_VERSION)
} else if(project.plugins.hasPlugin('ear')) {
setFacetVersion(project, 'jst.ear', JST_EAR_FACET_VERSION)
}
if(project.plugins.hasPlugin('war')) {
setFacetVersion(project, 'jst.web', JST_WEB_FACET_VERSION)
}

if (project.plugins.hasPlugin('ear')) {
setFacetVersion(project, 'jst.ear', JST_EAR_FACET_VERSION)
project.getGradle().getTaskGraph().whenReady {
Dependency[] deps = project.configurations.deploy.getAllDependencies().toArray()
deps.each { Dependency dep ->
Expand Down Expand Up @@ -351,7 +348,8 @@ class Liberty implements Plugin<Project> {
}

private boolean dependsOnFeature(ServerExtension server) {
return (server.features.name != null && !server.features.name.isEmpty())
return ((server.features.name != null && !server.features.name.isEmpty())
|| server.features.acceptLicense)
}

private static File getInstallDir(Project project) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ class InstallAppsTask extends AbstractServerTask {
protected void installFromFile(File file, String appsDir) {
Files.copy(file.toPath(), new File(getServerDir(project).toString() + '/' + appsDir + '/' + file.name).toPath(), StandardCopyOption.REPLACE_EXISTING)
validateAppConfig(file.name, file.name.take(file.name.lastIndexOf('.')), appsDir)
if (server.looseApplication) {
logger.warn('Application ' + file.getName() + ' was installed as a file as specified. To install as a loose application, specify the plugin or task generating the archive. ')
}
}

protected void installFileList(List<File> appFiles, String appsDir) {
Expand Down

0 comments on commit 7ae2834

Please sign in to comment.