Skip to content

Commit 582ffe8

Browse files
committed
Doesn't work...output directory deleted
Signed-off-by: Scott Kurz <skurz@us.ibm.com>
1 parent a4b90ad commit 582ffe8

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/main/groovy/io/openliberty/tools/gradle/tasks/AbstractFeatureTask.groovy

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ import io.openliberty.tools.common.plugins.util.ServerFeatureUtil
2424
import io.openliberty.tools.gradle.utils.ArtifactDownloadUtil
2525
import org.gradle.api.Project
2626
import org.gradle.api.logging.LogLevel
27+
import org.gradle.api.tasks.Input
2728
import org.gradle.api.tasks.Internal
29+
import org.gradle.api.tasks.OutputDirectory
2830
import org.gradle.api.tasks.options.Option
2931
import org.gradle.testfixtures.ProjectBuilder
3032
import org.gradle.api.artifacts.Configuration
33+
import org.gradle.api.file.FileCollection
3134

3235
public class AbstractFeatureTask extends AbstractServerTask {
3336

@@ -186,8 +189,9 @@ public class AbstractFeatureTask extends AbstractServerTask {
186189
}
187190
return result;
188191
}
192+
189193

190-
protected Set<String> getSpecifiedFeatures(String containerName) throws PluginExecutionException {
194+
public Set<String> getSpecifiedFeatures(String containerName) throws PluginExecutionException {
191195
InstallFeatureUtil util = getInstallFeatureUtil(null, containerName);
192196
// if createNewInstallFeatureUtil failed to create a new InstallFeatureUtil instance, then features are installed via ant
193197
if (installFeaturesFromAnt) {

src/main/groovy/io/openliberty/tools/gradle/tasks/InstallFeatureTask.groovy

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ import java.util.Set
1919

2020
import org.gradle.api.artifacts.ResolveException
2121
import org.gradle.api.logging.LogLevel
22+
import org.gradle.api.tasks.OutputDirectory
2223
import org.gradle.api.tasks.TaskAction
2324
import org.gradle.api.tasks.options.Option
25+
import org.gradle.api.tasks.Input
26+
import org.gradle.api.tasks.Internal
27+
import org.gradle.api.tasks.OutputDirectory
2428

2529
import io.openliberty.tools.common.plugins.util.InstallFeatureUtil
2630
import io.openliberty.tools.common.plugins.util.DevUtil
@@ -43,6 +47,16 @@ class InstallFeatureTask extends AbstractFeatureTask {
4347
this.containerName = containerName;
4448
}
4549

50+
@Input
51+
public Set<String> getSpecifiedFeatures() throws PluginExecutionException {
52+
return super.getSpecifiedFeatures(containerName)
53+
}
54+
55+
@OutputDirectory
56+
public File getLibDirectory() {
57+
return new File(getInstallDir(project),"/lib")
58+
}
59+
4660
@TaskAction
4761
void installFeature() {
4862
// If non-container mode, check for Beta version and skip if needed. Container mode does not need to check since featureUtility will check when it is called.

0 commit comments

Comments
 (0)