From 902fe9055bbd0877807c09007d53c5e9011f7818 Mon Sep 17 00:00:00 2001 From: "krystian.panek" Date: Thu, 23 May 2019 16:17:38 +0200 Subject: [PATCH] Major repackage --- .gitignore | 15 +++++------ .../gradle/aem/{common => }/AemDefaultTask.kt | 2 +- .../gradle/aem/{common => }/AemException.kt | 2 +- .../gradle/aem/{common => }/AemExtension.kt | 20 ++++++++++----- .../gradle/aem/{common => }/AemPlugin.kt | 4 +-- .../gradle/aem/{common => }/AemTask.kt | 2 +- .../TaskFacade.kt => AemTaskFacade.kt} | 13 ++++++---- .../gradle/aem/bundle/BundleException.kt | 2 +- .../cognifide/gradle/aem/bundle/BundleJar.kt | 10 ++++---- .../gradle/aem/bundle/BundlePlugin.kt | 4 +-- .../gradle/aem/common/CommonPlugin.kt | 2 ++ .../aem/common/{ => build}/Behaviors.kt | 2 +- .../aem/common/{ => build}/BuildScope.kt | 2 +- .../common/{ => build}/CollectingLogger.kt | 2 +- .../common/{ => build}/DependencyOptions.kt | 3 ++- .../common/{ => build}/ParallelExecutor.kt | 3 ++- .../common/{ => build}/ProgressCountdown.kt | 3 ++- .../common/{ => build}/ProgressIndicator.kt | 3 ++- .../aem/common/{ => build}/ProgressLogger.kt | 2 +- .../aem/common/{ => build}/PropertyParser.kt | 5 +++- .../gradle/aem/common/{ => build}/Retry.kt | 5 +++- .../gradle/aem/common/file/FileException.kt | 2 +- .../gradle/aem/common/file/FileOperations.kt | 6 ++--- .../gradle/aem/common/file/FileWatcher.kt | 6 ++--- .../file/downloader/HttpFileDownloader.kt | 4 +-- .../file/downloader/ProgressFileDownloader.kt | 4 +-- .../file/downloader/UrlFileDownloader.kt | 2 +- .../aem/common/file/resolver/FileResolver.kt | 2 +- .../aem/common/file/resolver/Resolver.kt | 10 ++++---- .../common/file/resolver/ResolverOptions.kt | 4 +-- .../gradle/aem/common/http/HttpClient.kt | 7 +++--- .../aem/common/http/RequestException.kt | 2 +- .../aem/common/http/ResponseException.kt | 2 +- .../{ => common}/instance/AbstractInstance.kt | 4 +-- .../aem/{ => common}/instance/Instance.kt | 12 ++++----- .../{ => common}/instance/InstanceAction.kt | 2 +- .../InstanceActionPerformer.kt} | 13 +++++----- .../instance/InstanceException.kt | 4 +-- .../instance/InstanceHttpClient.kt | 4 +-- .../common/{ => instance}/InstanceOptions.kt | 5 ++-- .../{ => common}/instance/InstanceProgress.kt | 6 ++--- .../{ => common}/instance/InstanceService.kt | 2 +- .../aem/{ => common}/instance/InstanceSync.kt | 12 ++++----- .../aem/{ => common}/instance/InstanceType.kt | 6 ++--- .../aem/{ => common}/instance/InstanceUrl.kt | 4 +-- .../{ => common}/instance/LocalInstance.kt | 9 ++++--- .../instance/LocalInstanceOptions.kt | 12 +++++---- .../{ => common}/instance/RemoteInstance.kt | 6 ++--- .../instance/action/AbstractAction.kt | 10 ++++---- .../instance/action/AwaitAction.kt | 14 +++++++---- .../instance/action/ReloadAction.kt | 10 ++++---- .../instance/action/ShutdownAction.kt | 18 ++++++------- .../instance/service/StateChecker.kt | 6 ++--- .../instance/service/groovy/GroovyConsole.kt | 14 +++++------ .../service/groovy/GroovyConsoleResult.kt | 2 +- .../instance/service/osgi/Bundle.kt | 2 +- .../instance/service/osgi/BundleState.kt | 6 ++--- .../instance/service/osgi/Component.kt | 2 +- .../instance/service/osgi/ComponentState.kt | 4 +-- .../instance/service/osgi/Event.kt | 2 +- .../instance/service/osgi/EventState.kt | 6 ++--- .../instance/service/osgi/OsgiFramework.kt | 8 +++--- .../instance/service/pkg/BuildResponse.kt} | 4 +-- .../instance/service}/pkg/DeleteResponse.kt | 2 +- .../instance/service}/pkg/ErrorPattern.kt | 2 +- .../instance/service}/pkg/HtmlResponse.kt | 2 +- .../instance/service}/pkg/InstallResponse.kt | 4 +-- .../instance/service}/pkg/ListResponse.kt | 3 +-- .../instance/service/pkg/Package.kt | 2 +- .../instance/service/pkg/PackageManager.kt | 21 ++++++++-------- .../instance/service}/pkg/PackageResolver.kt | 3 +-- .../instance/service/pkg/PackageState.kt | 2 +- .../service}/pkg/UninstallResponse.kt | 2 +- .../instance/service}/pkg/UploadResponse.kt | 2 +- .../aem/common/notifier/DorkboxNotifier.kt | 2 +- .../common/{ => notifier}/NotifierFacade.kt | 6 ++--- .../aem/{ => common}/pkg/PackageDefinition.kt | 8 +++--- .../aem/{ => common}/pkg/PackageException.kt | 4 +-- .../aem/{ => common}/pkg/PackageFileFilter.kt | 15 +++++------ .../aem/common/{ => pkg}/PackageOptions.kt | 5 ++-- .../aem/{ => common}/pkg/vlt/VltDefinition.kt | 4 +-- .../aem/{ => common}/pkg/vlt/VltFilter.kt | 10 ++++---- .../gradle/aem/common/tasks/Debug.kt | 14 +++++------ .../gradle/aem/common/tasks/InstanceTask.kt | 4 +-- .../aem/common/tasks/LocalInstanceTask.kt | 6 ++--- .../gradle/aem/common/tasks/PackageTask.kt | 4 +-- .../gradle/aem/common/tasks/Resolve.kt | 4 +-- .../aem/common/{ => tasks}/TaskSequence.kt | 2 +- .../gradle/aem/common/tasks/ZipTask.kt | 8 +++--- .../aem/common/tasks/lifecycle/Destroy.kt | 2 +- .../gradle/aem/common/tasks/lifecycle/Down.kt | 2 +- .../aem/common/tasks/lifecycle/Resetup.kt | 2 +- .../aem/common/tasks/lifecycle/Restart.kt | 2 +- .../aem/common/tasks/lifecycle/Setup.kt | 2 +- .../gradle/aem/common/tasks/lifecycle/Up.kt | 2 +- .../aem/common/{ => utils}/Collections.kt | 2 +- .../gradle/aem/common/{ => utils}/Formats.kt | 2 +- .../aem/common/{ => utils}/LineSeparator.kt | 2 +- .../gradle/aem/common/{ => utils}/Patterns.kt | 2 +- .../{ => utils}/formats/JsonPassword.kt | 4 +-- .../gradle/aem/environment/Environment.kt | 6 ++--- .../aem/environment/EnvironmentException.kt | 2 +- .../aem/environment/EnvironmentPlugin.kt | 2 +- .../docker/base/DockerContainer.kt | 2 +- .../docker/base/DockerException.kt | 2 +- .../environment/docker/base/DockerStack.kt | 2 +- .../aem/environment/docker/base/DockerType.kt | 2 +- .../docker/domain/HttpdContainer.kt | 2 +- .../docker/domain/HttpdReloader.kt | 2 +- .../aem/environment/docker/domain/Stack.kt | 2 +- .../aem/environment/health/HealthChecker.kt | 2 +- .../aem/environment/tasks/EnvironmentCheck.kt | 2 +- .../aem/environment/tasks/EnvironmentClean.kt | 2 +- .../environment/tasks/EnvironmentDestroy.kt | 2 +- .../aem/environment/tasks/EnvironmentDev.kt | 2 +- .../aem/environment/tasks/EnvironmentDown.kt | 2 +- .../aem/environment/tasks/EnvironmentHosts.kt | 2 +- .../environment/tasks/EnvironmentResetup.kt | 2 +- .../environment/tasks/EnvironmentRestart.kt | 2 +- .../aem/environment/tasks/EnvironmentUp.kt | 2 +- .../gradle/aem/instance/InstancePlugin.kt | 4 ++- .../{tasks => satisfy}/InstanceSatisfy.kt | 16 ++++++------ .../satisfy}/PackageGroup.kt | 6 ++--- .../satisfy}/PackageResolution.kt | 6 ++--- .../satisfy}/PackageResolver.kt | 6 ++--- .../aem/instance/tail/InstanceAnalyzer.kt | 2 +- .../instance/{tasks => tail}/InstanceTail.kt | 3 +-- .../aem/instance/tail/InstanceTailer.kt | 10 ++++---- .../instance/tail/InstanceTailerException.kt | 5 ++++ .../cognifide/gradle/aem/instance/tail/Log.kt | 10 ++++---- .../gradle/aem/instance/tail/LogChunk.kt | 2 +- .../gradle/aem/instance/tail/LogFilter.kt | 2 +- .../gradle/aem/instance/tail/LogNotifier.kt | 2 +- .../gradle/aem/instance/tail/TailException.kt | 5 ---- .../gradle/aem/instance/tail/io/LogFiles.kt | 2 +- .../gradle/aem/instance/tail/io/UrlSource.kt | 2 +- .../aem/instance/tasks/InstanceAwait.kt | 6 ++--- .../aem/instance/tasks/InstanceBackup.kt | 6 ++--- .../aem/instance/tasks/InstanceCollect.kt | 1 + .../aem/instance/tasks/InstanceCreate.kt | 12 ++++----- .../aem/instance/tasks/InstanceDestroy.kt | 4 +-- .../gradle/aem/instance/tasks/InstanceDown.kt | 6 ++--- .../aem/instance/tasks/InstanceReload.kt | 6 ++--- .../aem/instance/tasks/InstanceResetup.kt | 2 +- .../aem/instance/tasks/InstanceRestart.kt | 2 +- .../aem/instance/tasks/InstanceSetup.kt | 2 +- .../gradle/aem/instance/tasks/InstanceUp.kt | 8 +++--- .../cognifide/gradle/aem/pkg/PackagePlugin.kt | 6 ++--- .../gradle/aem/pkg/tasks/PackageActivate.kt | 4 +-- .../gradle/aem/pkg/tasks/PackageCompose.kt | 16 +++++++----- .../gradle/aem/pkg/tasks/PackageDelete.kt | 4 +-- .../gradle/aem/pkg/tasks/PackageDeploy.kt | 10 ++++---- .../gradle/aem/pkg/tasks/PackageInstall.kt | 4 +-- .../gradle/aem/pkg/tasks/PackagePurge.kt | 8 +++--- .../gradle/aem/pkg/tasks/PackageUninstall.kt | 4 +-- .../gradle/aem/pkg/tasks/PackageUpload.kt | 4 +-- .../aem/pkg/tasks/compose/ProjectOptions.kt | 2 +- .../gradle/aem/tooling/ToolingPlugin.kt | 10 ++++---- .../gradle/aem/tooling/rcp/{tasks => }/Rcp.kt | 7 +++--- .../gradle/aem/tooling/rcp/RcpClient.kt | 4 +-- .../gradle/aem/tooling/sync/Cleaner.kt | 21 +++------------- .../gradle/aem/tooling/sync/CleanerRule.kt | 2 +- .../gradle/aem/tooling/sync/Downloader.kt | 8 +++--- .../aem/tooling/sync/{tasks => }/Sync.kt | 25 +++++++++++-------- .../gradle/aem/tooling/vlt/{tasks => }/Vlt.kt | 5 ++-- .../gradle/aem/tooling/vlt/VltException.kt | 2 +- .../gradle/aem/tooling/vlt/VltRunner.kt | 4 +-- .../aem/test/HtmlResponseBuilderTest.kt | 6 ++--- .../cognifide/gradle/aem/test/TailerTest.kt | 2 +- 169 files changed, 446 insertions(+), 425 deletions(-) rename src/main/kotlin/com/cognifide/gradle/aem/{common => }/AemDefaultTask.kt (96%) rename src/main/kotlin/com/cognifide/gradle/aem/{common => }/AemException.kt (84%) rename src/main/kotlin/com/cognifide/gradle/aem/{common => }/AemExtension.kt (95%) rename src/main/kotlin/com/cognifide/gradle/aem/{common => }/AemPlugin.kt (92%) rename src/main/kotlin/com/cognifide/gradle/aem/{common => }/AemTask.kt (96%) rename src/main/kotlin/com/cognifide/gradle/aem/{common/TaskFacade.kt => AemTaskFacade.kt} (96%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => build}/Behaviors.kt (96%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => build}/BuildScope.kt (95%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => build}/CollectingLogger.kt (94%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => build}/DependencyOptions.kt (93%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => build}/ParallelExecutor.kt (93%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => build}/ProgressCountdown.kt (88%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => build}/ProgressIndicator.kt (96%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => build}/ProgressLogger.kt (98%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => build}/PropertyParser.kt (96%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => build}/Retry.kt (93%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/AbstractInstance.kt (92%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/Instance.kt (95%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/InstanceAction.kt (65%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ActionPerformer.kt => instance/InstanceActionPerformer.kt} (57%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/InstanceException.kt (64%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/InstanceHttpClient.kt (88%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => instance}/InstanceOptions.kt (95%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/InstanceProgress.kt (91%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/InstanceService.kt (74%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/InstanceSync.kt (60%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/InstanceType.kt (87%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/InstanceUrl.kt (96%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/LocalInstance.kt (97%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/LocalInstanceOptions.kt (94%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/RemoteInstance.kt (89%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/action/AbstractAction.kt (67%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/action/AwaitAction.kt (95%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/action/ReloadAction.kt (83%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/action/ShutdownAction.kt (86%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/service/StateChecker.kt (97%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/service/groovy/GroovyConsole.kt (88%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/service/groovy/GroovyConsoleResult.kt (93%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/service/osgi/Bundle.kt (97%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/service/osgi/BundleState.kt (94%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/service/osgi/Component.kt (97%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/service/osgi/ComponentState.kt (94%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/service/osgi/Event.kt (94%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/service/osgi/EventState.kt (91%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/service/osgi/OsgiFramework.kt (94%) rename src/main/kotlin/com/cognifide/gradle/aem/{pkg/PackageBuildResponse.kt => common/instance/service/pkg/BuildResponse.kt} (66%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common/instance/service}/pkg/DeleteResponse.kt (93%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common/instance/service}/pkg/ErrorPattern.kt (68%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common/instance/service}/pkg/HtmlResponse.kt (98%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common/instance/service}/pkg/InstallResponse.kt (94%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common/instance/service}/pkg/ListResponse.kt (82%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/service/pkg/Package.kt (97%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/service/pkg/PackageManager.kt (94%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common/instance/service}/pkg/PackageResolver.kt (94%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/instance/service/pkg/PackageState.kt (81%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common/instance/service}/pkg/UninstallResponse.kt (94%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common/instance/service}/pkg/UploadResponse.kt (89%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => notifier}/NotifierFacade.kt (96%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/pkg/PackageDefinition.kt (94%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/pkg/PackageException.kt (65%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/pkg/PackageFileFilter.kt (89%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => pkg}/PackageOptions.kt (94%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/pkg/vlt/VltDefinition.kt (96%) rename src/main/kotlin/com/cognifide/gradle/aem/{ => common}/pkg/vlt/VltFilter.kt (91%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => tasks}/TaskSequence.kt (90%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => utils}/Collections.kt (96%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => utils}/Formats.kt (99%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => utils}/LineSeparator.kt (92%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => utils}/Patterns.kt (97%) rename src/main/kotlin/com/cognifide/gradle/aem/common/{ => utils}/formats/JsonPassword.kt (78%) rename src/main/kotlin/com/cognifide/gradle/aem/instance/{tasks => satisfy}/InstanceSatisfy.kt (94%) rename src/main/kotlin/com/cognifide/gradle/aem/{pkg/resolver => instance/satisfy}/PackageGroup.kt (86%) rename src/main/kotlin/com/cognifide/gradle/aem/{pkg/resolver => instance/satisfy}/PackageResolution.kt (91%) rename src/main/kotlin/com/cognifide/gradle/aem/{pkg/resolver => instance/satisfy}/PackageResolver.kt (83%) rename src/main/kotlin/com/cognifide/gradle/aem/instance/{tasks => tail}/InstanceTail.kt (89%) create mode 100644 src/main/kotlin/com/cognifide/gradle/aem/instance/tail/InstanceTailerException.kt delete mode 100644 src/main/kotlin/com/cognifide/gradle/aem/instance/tail/TailException.kt rename src/main/kotlin/com/cognifide/gradle/aem/tooling/rcp/{tasks => }/Rcp.kt (93%) rename src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/{tasks => }/Sync.kt (90%) rename src/main/kotlin/com/cognifide/gradle/aem/tooling/vlt/{tasks => }/Vlt.kt (77%) diff --git a/.gitignore b/.gitignore index 1654986fa..06606277b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,3 @@ -### Project specific -.idea/ -*.iml -*.ipr -classes/ - ### Linux template *~ @@ -159,7 +153,7 @@ fabric.properties .AppleDouble .LSOverride -# Icon must end with two \r +# Icon must end with two /r Icon @@ -188,3 +182,10 @@ nbbuild/ dist/ nbdist/ .nb-gradle/ + +### Project specific +.idea/ +*.iml +*.ipr +classes/ +!src/main/kotlin/com/cognifide/gradle/aem/common/build \ No newline at end of file diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/AemDefaultTask.kt b/src/main/kotlin/com/cognifide/gradle/aem/AemDefaultTask.kt similarity index 96% rename from src/main/kotlin/com/cognifide/gradle/aem/common/AemDefaultTask.kt rename to src/main/kotlin/com/cognifide/gradle/aem/AemDefaultTask.kt index 5c974fc60..1ccfd0114 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/AemDefaultTask.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/AemDefaultTask.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem import org.gradle.api.DefaultTask import org.gradle.api.Task diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/AemException.kt b/src/main/kotlin/com/cognifide/gradle/aem/AemException.kt similarity index 84% rename from src/main/kotlin/com/cognifide/gradle/aem/common/AemException.kt rename to src/main/kotlin/com/cognifide/gradle/aem/AemException.kt index 444faffd5..1d89efa39 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/AemException.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/AemException.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem import org.gradle.api.GradleException diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/AemExtension.kt b/src/main/kotlin/com/cognifide/gradle/aem/AemExtension.kt similarity index 95% rename from src/main/kotlin/com/cognifide/gradle/aem/common/AemExtension.kt rename to src/main/kotlin/com/cognifide/gradle/aem/AemExtension.kt index fae327d01..d5076d3e0 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/AemExtension.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/AemExtension.kt @@ -1,17 +1,25 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem import com.cognifide.gradle.aem.bundle.BundlePlugin +import com.cognifide.gradle.aem.common.CommonPlugin +import com.cognifide.gradle.aem.common.build.* import com.cognifide.gradle.aem.common.file.FileOperations import com.cognifide.gradle.aem.common.file.FileWatcher import com.cognifide.gradle.aem.common.file.resolver.ResolverOptions import com.cognifide.gradle.aem.common.http.HttpClient +import com.cognifide.gradle.aem.common.instance.* +import com.cognifide.gradle.aem.common.notifier.NotifierFacade +import com.cognifide.gradle.aem.common.pkg.PackageDefinition +import com.cognifide.gradle.aem.common.pkg.PackageOptions +import com.cognifide.gradle.aem.common.pkg.vlt.VltFilter +import com.cognifide.gradle.aem.common.utils.Formats +import com.cognifide.gradle.aem.common.utils.LineSeparator +import com.cognifide.gradle.aem.common.utils.Patterns import com.cognifide.gradle.aem.environment.Environment import com.cognifide.gradle.aem.environment.EnvironmentPlugin import com.cognifide.gradle.aem.instance.* -import com.cognifide.gradle.aem.pkg.PackageDefinition import com.cognifide.gradle.aem.pkg.PackagePlugin import com.cognifide.gradle.aem.pkg.tasks.PackageCompose -import com.cognifide.gradle.aem.pkg.vlt.VltFilter import com.cognifide.gradle.aem.tooling.ToolingPlugin import com.cognifide.gradle.aem.tooling.vlt.VltException import com.fasterxml.jackson.annotation.JsonIgnore @@ -176,9 +184,9 @@ class AemExtension(@JsonIgnore val project: Project) : Serializable { /** * Provides API for easier creation of tasks (e.g in sequence) in the matter of Gradle task configuration avoidance. */ - val tasks = TaskFacade(this) + val tasks = AemTaskFacade(this) - fun tasks(configurer: TaskFacade.() -> Unit) { + fun tasks(configurer: AemTaskFacade.() -> Unit) { tasks.apply(configurer) } @@ -186,7 +194,7 @@ class AemExtension(@JsonIgnore val project: Project) : Serializable { * Provides API for performing actions affecting multiple instances at once. */ @JsonIgnore - val actions = ActionPerformer(this) + val instanceActions = InstanceActionPerformer(this) /** * Collection of all java packages from all projects applying bundle plugin. diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/AemPlugin.kt b/src/main/kotlin/com/cognifide/gradle/aem/AemPlugin.kt similarity index 92% rename from src/main/kotlin/com/cognifide/gradle/aem/common/AemPlugin.kt rename to src/main/kotlin/com/cognifide/gradle/aem/AemPlugin.kt index 67fc7f417..ae896589b 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/AemPlugin.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/AemPlugin.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem import com.fasterxml.jackson.databind.ObjectMapper import java.io.Serializable @@ -13,7 +13,7 @@ abstract class AemPlugin : Plugin { abstract fun Project.configure() - protected fun Project.tasks(configurer: TaskFacade.() -> Unit) { + protected fun Project.tasks(configurer: AemTaskFacade.() -> Unit) { return AemExtension.of(this).tasks(configurer) } diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/AemTask.kt b/src/main/kotlin/com/cognifide/gradle/aem/AemTask.kt similarity index 96% rename from src/main/kotlin/com/cognifide/gradle/aem/common/AemTask.kt rename to src/main/kotlin/com/cognifide/gradle/aem/AemTask.kt index 856a3a9a6..2ee8522d5 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/AemTask.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/AemTask.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem import java.io.File import org.gradle.api.Project diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/TaskFacade.kt b/src/main/kotlin/com/cognifide/gradle/aem/AemTaskFacade.kt similarity index 96% rename from src/main/kotlin/com/cognifide/gradle/aem/common/TaskFacade.kt rename to src/main/kotlin/com/cognifide/gradle/aem/AemTaskFacade.kt index e81954f8c..8f844bda9 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/TaskFacade.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/AemTaskFacade.kt @@ -1,14 +1,17 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem import com.cognifide.gradle.aem.bundle.BundleJar import com.cognifide.gradle.aem.common.tasks.Debug +import com.cognifide.gradle.aem.common.tasks.TaskSequence import com.cognifide.gradle.aem.common.tasks.lifecycle.* import com.cognifide.gradle.aem.environment.tasks.* +import com.cognifide.gradle.aem.instance.satisfy.InstanceSatisfy +import com.cognifide.gradle.aem.instance.tail.InstanceTail import com.cognifide.gradle.aem.instance.tasks.* import com.cognifide.gradle.aem.pkg.tasks.* -import com.cognifide.gradle.aem.tooling.rcp.tasks.Rcp -import com.cognifide.gradle.aem.tooling.sync.tasks.Sync -import com.cognifide.gradle.aem.tooling.vlt.tasks.Vlt +import com.cognifide.gradle.aem.tooling.rcp.Rcp +import com.cognifide.gradle.aem.tooling.sync.Sync +import com.cognifide.gradle.aem.tooling.vlt.Vlt import com.fasterxml.jackson.annotation.JsonIgnore import java.io.Serializable import org.gradle.api.Project @@ -20,7 +23,7 @@ import org.gradle.api.tasks.bundling.Jar import org.gradle.api.tasks.testing.Test @Suppress("TooManyFunctions") -class TaskFacade(private val aem: AemExtension) : Serializable { +class AemTaskFacade(private val aem: AemExtension) : Serializable { @JsonIgnore val project = aem.project diff --git a/src/main/kotlin/com/cognifide/gradle/aem/bundle/BundleException.kt b/src/main/kotlin/com/cognifide/gradle/aem/bundle/BundleException.kt index 138c0537f..32e1bf8e4 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/bundle/BundleException.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/bundle/BundleException.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.bundle -import com.cognifide.gradle.aem.common.AemException +import com.cognifide.gradle.aem.AemException class BundleException : AemException { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/bundle/BundleJar.kt b/src/main/kotlin/com/cognifide/gradle/aem/bundle/BundleJar.kt index 9165a8e23..c610b1d78 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/bundle/BundleJar.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/bundle/BundleJar.kt @@ -1,11 +1,11 @@ package com.cognifide.gradle.aem.bundle import aQute.bnd.gradle.BundleTaskConvention -import com.cognifide.gradle.aem.common.AemException -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.DependencyOptions -import com.cognifide.gradle.aem.common.Formats -import com.cognifide.gradle.aem.instance.service.osgi.Bundle +import com.cognifide.gradle.aem.AemException +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.build.DependencyOptions +import com.cognifide.gradle.aem.common.instance.service.osgi.Bundle +import com.cognifide.gradle.aem.common.utils.Formats import com.fasterxml.jackson.annotation.JsonIgnore import java.io.File import java.io.Serializable diff --git a/src/main/kotlin/com/cognifide/gradle/aem/bundle/BundlePlugin.kt b/src/main/kotlin/com/cognifide/gradle/aem/bundle/BundlePlugin.kt index f2a5eae77..bb87933db 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/bundle/BundlePlugin.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/bundle/BundlePlugin.kt @@ -1,7 +1,7 @@ package com.cognifide.gradle.aem.bundle -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.AemPlugin +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.AemPlugin import com.cognifide.gradle.aem.pkg.PackagePlugin import org.gradle.api.JavaVersion import org.gradle.api.Project diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/CommonPlugin.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/CommonPlugin.kt index 59b075487..20f5b5673 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/CommonPlugin.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/CommonPlugin.kt @@ -1,5 +1,7 @@ package com.cognifide.gradle.aem.common +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.AemPlugin import com.cognifide.gradle.aem.common.tasks.Debug import com.cognifide.gradle.aem.common.tasks.Resolve import java.util.* diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/Behaviors.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/build/Behaviors.kt similarity index 96% rename from src/main/kotlin/com/cognifide/gradle/aem/common/Behaviors.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/build/Behaviors.kt index 1e889f670..d2569d9d9 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/Behaviors.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/build/Behaviors.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.build object Behaviors { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/BuildScope.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/build/BuildScope.kt similarity index 95% rename from src/main/kotlin/com/cognifide/gradle/aem/common/BuildScope.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/build/BuildScope.kt index b154f8340..c4b4d05d9 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/BuildScope.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/build/BuildScope.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.build import org.gradle.api.Project diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/CollectingLogger.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/build/CollectingLogger.kt similarity index 94% rename from src/main/kotlin/com/cognifide/gradle/aem/common/CollectingLogger.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/build/CollectingLogger.kt index 987fbf406..995508d59 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/CollectingLogger.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/build/CollectingLogger.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.build import org.gradle.api.logging.LogLevel import org.gradle.api.logging.Logger diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/DependencyOptions.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/build/DependencyOptions.kt similarity index 93% rename from src/main/kotlin/com/cognifide/gradle/aem/common/DependencyOptions.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/build/DependencyOptions.kt index 7aa9ba603..e735b390e 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/DependencyOptions.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/build/DependencyOptions.kt @@ -1,5 +1,6 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.build +import com.cognifide.gradle.aem.common.utils.Collections import org.gradle.api.artifacts.ExternalModuleDependency import org.gradle.api.artifacts.dsl.DependencyHandler diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/ParallelExecutor.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/build/ParallelExecutor.kt similarity index 93% rename from src/main/kotlin/com/cognifide/gradle/aem/common/ParallelExecutor.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/build/ParallelExecutor.kt index 7db7800ee..1326393ff 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/ParallelExecutor.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/build/ParallelExecutor.kt @@ -1,5 +1,6 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.build +import com.cognifide.gradle.aem.AemExtension import kotlin.coroutines.CoroutineContext import kotlinx.coroutines.* diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/ProgressCountdown.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/build/ProgressCountdown.kt similarity index 88% rename from src/main/kotlin/com/cognifide/gradle/aem/common/ProgressCountdown.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/build/ProgressCountdown.kt index 5e8f69ed3..46eab1105 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/ProgressCountdown.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/build/ProgressCountdown.kt @@ -1,5 +1,6 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.build +import com.cognifide.gradle.aem.common.utils.Formats import org.gradle.api.Project class ProgressCountdown(project: Project, private val value: Long) { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/ProgressIndicator.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/build/ProgressIndicator.kt similarity index 96% rename from src/main/kotlin/com/cognifide/gradle/aem/common/ProgressIndicator.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/build/ProgressIndicator.kt index 14818c4bb..dd93e6526 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/ProgressIndicator.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/build/ProgressIndicator.kt @@ -1,5 +1,6 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.build +import com.cognifide.gradle.aem.common.utils.Formats import java.util.* import kotlinx.coroutines.* import org.gradle.api.Project diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/ProgressLogger.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/build/ProgressLogger.kt similarity index 98% rename from src/main/kotlin/com/cognifide/gradle/aem/common/ProgressLogger.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/build/ProgressLogger.kt index 48dfab594..27a792de2 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/ProgressLogger.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/build/ProgressLogger.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.build import java.util.* import java.util.concurrent.TimeUnit diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/PropertyParser.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/build/PropertyParser.kt similarity index 96% rename from src/main/kotlin/com/cognifide/gradle/aem/common/PropertyParser.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/build/PropertyParser.kt index 692cc264b..bd9e463b6 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/PropertyParser.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/build/PropertyParser.kt @@ -1,5 +1,8 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.build +import com.cognifide.gradle.aem.AemException +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.utils.Formats import com.mitchellbosecke.pebble.PebbleEngine import com.mitchellbosecke.pebble.lexer.Syntax import com.mitchellbosecke.pebble.loader.StringLoader diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/Retry.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/build/Retry.kt similarity index 93% rename from src/main/kotlin/com/cognifide/gradle/aem/common/Retry.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/build/Retry.kt index cd96a9d46..e18d28c68 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/Retry.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/build/Retry.kt @@ -1,4 +1,7 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.build + +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.utils.Formats class Retry private constructor(val aem: AemExtension) { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/file/FileException.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/file/FileException.kt index 8756d48b3..cefddf31e 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/file/FileException.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/file/FileException.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.common.file -import com.cognifide.gradle.aem.common.AemException +import com.cognifide.gradle.aem.AemException class FileException : AemException { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/file/FileOperations.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/file/FileOperations.kt index 722ed32db..cbad980f2 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/file/FileOperations.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/file/FileOperations.kt @@ -1,8 +1,8 @@ package com.cognifide.gradle.aem.common.file -import com.cognifide.gradle.aem.common.AemPlugin -import com.cognifide.gradle.aem.common.Formats -import com.cognifide.gradle.aem.common.Patterns +import com.cognifide.gradle.aem.AemPlugin +import com.cognifide.gradle.aem.common.utils.Formats +import com.cognifide.gradle.aem.common.utils.Patterns import java.io.File import java.io.FileOutputStream import java.io.InputStream diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/file/FileWatcher.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/file/FileWatcher.kt index 401bf1e8f..164179b4c 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/file/FileWatcher.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/file/FileWatcher.kt @@ -1,8 +1,8 @@ package com.cognifide.gradle.aem.common.file -import com.cognifide.gradle.aem.common.AemException -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.Patterns +import com.cognifide.gradle.aem.AemException +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.utils.Patterns import java.io.File import org.apache.commons.io.monitor.FileAlterationListener import org.apache.commons.io.monitor.FileAlterationMonitor diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/file/downloader/HttpFileDownloader.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/file/downloader/HttpFileDownloader.kt index 866b89bd1..e463b2cf0 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/file/downloader/HttpFileDownloader.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/file/downloader/HttpFileDownloader.kt @@ -1,7 +1,7 @@ package com.cognifide.gradle.aem.common.file.downloader -import com.cognifide.gradle.aem.common.AemException -import com.cognifide.gradle.aem.common.AemExtension +import com.cognifide.gradle.aem.AemException +import com.cognifide.gradle.aem.AemExtension import com.cognifide.gradle.aem.common.file.FileException import com.cognifide.gradle.aem.common.http.HttpClient import java.io.File diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/file/downloader/ProgressFileDownloader.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/file/downloader/ProgressFileDownloader.kt index c53329fd6..29f385541 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/file/downloader/ProgressFileDownloader.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/file/downloader/ProgressFileDownloader.kt @@ -1,7 +1,7 @@ package com.cognifide.gradle.aem.common.file.downloader -import com.cognifide.gradle.aem.common.Formats -import com.cognifide.gradle.aem.common.ProgressLogger +import com.cognifide.gradle.aem.common.build.ProgressLogger +import com.cognifide.gradle.aem.common.utils.Formats import java.io.File import java.io.FileOutputStream import java.io.InputStream diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/file/downloader/UrlFileDownloader.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/file/downloader/UrlFileDownloader.kt index 0812dfb10..8e1e7f2ff 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/file/downloader/UrlFileDownloader.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/file/downloader/UrlFileDownloader.kt @@ -1,7 +1,7 @@ package com.cognifide.gradle.aem.common.file.downloader -import com.cognifide.gradle.aem.common.Patterns import com.cognifide.gradle.aem.common.file.FileException +import com.cognifide.gradle.aem.common.utils.Patterns import java.io.File import java.io.IOException import java.net.URL diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/file/resolver/FileResolver.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/file/resolver/FileResolver.kt index 031b1f80b..30620e349 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/file/resolver/FileResolver.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/file/resolver/FileResolver.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.common.file.resolver -import com.cognifide.gradle.aem.common.AemExtension +import com.cognifide.gradle.aem.AemExtension import java.io.File class FileResolver(aem: AemExtension, downloadDir: File) : Resolver(aem, downloadDir) { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/file/resolver/Resolver.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/file/resolver/Resolver.kt index e2bb5b912..14d0dfe18 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/file/resolver/Resolver.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/file/resolver/Resolver.kt @@ -1,14 +1,14 @@ package com.cognifide.gradle.aem.common.file.resolver -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.DependencyOptions -import com.cognifide.gradle.aem.common.Formats +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.build.DependencyOptions import com.cognifide.gradle.aem.common.file.FileException import com.cognifide.gradle.aem.common.file.downloader.HttpFileDownloader import com.cognifide.gradle.aem.common.file.downloader.SftpFileDownloader import com.cognifide.gradle.aem.common.file.downloader.SmbFileDownloader import com.cognifide.gradle.aem.common.file.downloader.UrlFileDownloader import com.cognifide.gradle.aem.common.http.HttpClient +import com.cognifide.gradle.aem.common.utils.Formats import com.google.common.hash.HashCode import java.io.File import java.util.* @@ -23,10 +23,10 @@ import org.gradle.util.GFileUtils */ abstract class Resolver( @get:Internal - val aem: AemExtension, +val aem: AemExtension, @get:Internal - val downloadDir: File +val downloadDir: File ) { private val project = aem.project diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/file/resolver/ResolverOptions.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/file/resolver/ResolverOptions.kt index 768212355..d9f2fb65e 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/file/resolver/ResolverOptions.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/file/resolver/ResolverOptions.kt @@ -1,7 +1,7 @@ package com.cognifide.gradle.aem.common.file.resolver -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.formats.JsonPassword +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.utils.formats.JsonPassword import com.fasterxml.jackson.databind.annotation.JsonSerialize import java.io.Serializable diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/http/HttpClient.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/http/HttpClient.kt index 1d40a4584..76d774089 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/http/HttpClient.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/http/HttpClient.kt @@ -1,9 +1,8 @@ package com.cognifide.gradle.aem.common.http -import com.cognifide.gradle.aem.common.AemException -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.Formats +import com.cognifide.gradle.aem.AemExtension import com.cognifide.gradle.aem.common.file.downloader.HttpFileDownloader +import com.cognifide.gradle.aem.common.utils.Formats import com.fasterxml.jackson.databind.ObjectMapper import com.jayway.jsonpath.DocumentContext import java.io.File @@ -98,7 +97,7 @@ open class HttpClient(val aem: AemExtension) { "patch" -> patch(uri, handler) "head" -> head(uri, handler) "delete" -> delete(uri, handler) - else -> throw AemException("Invalid HTTP client method: '$method'") + else -> throw RequestException("Invalid HTTP client method: '$method'") } fun get(uri: String) = get(uri) { checkStatus(it) } diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/http/RequestException.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/http/RequestException.kt index c33834178..27f423b24 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/http/RequestException.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/http/RequestException.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.common.http -import com.cognifide.gradle.aem.common.AemException +import com.cognifide.gradle.aem.AemException class RequestException : AemException { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/http/ResponseException.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/http/ResponseException.kt index ef8ddc0ff..2f1adfb4b 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/http/ResponseException.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/http/ResponseException.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.common.http -import com.cognifide.gradle.aem.common.AemException +import com.cognifide.gradle.aem.AemException class ResponseException : AemException { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/AbstractInstance.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/AbstractInstance.kt similarity index 92% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/AbstractInstance.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/AbstractInstance.kt index 167909444..720deaa03 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/AbstractInstance.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/AbstractInstance.kt @@ -1,6 +1,6 @@ -package com.cognifide.gradle.aem.instance +package com.cognifide.gradle.aem.common.instance -import com.cognifide.gradle.aem.common.AemExtension +import com.cognifide.gradle.aem.AemExtension import com.fasterxml.jackson.annotation.JsonIgnore import java.time.ZoneId import org.apache.commons.lang3.builder.EqualsBuilder diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/Instance.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/Instance.kt similarity index 95% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/Instance.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/Instance.kt index 342b37609..75ceb84ac 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/Instance.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/Instance.kt @@ -1,10 +1,10 @@ -package com.cognifide.gradle.aem.instance +package com.cognifide.gradle.aem.common.instance -import com.cognifide.gradle.aem.common.AemException -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.Formats -import com.cognifide.gradle.aem.common.Patterns -import com.cognifide.gradle.aem.common.formats.JsonPassword +import com.cognifide.gradle.aem.AemException +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.utils.Formats +import com.cognifide.gradle.aem.common.utils.Patterns +import com.cognifide.gradle.aem.common.utils.formats.JsonPassword import com.fasterxml.jackson.annotation.JsonIgnore import com.fasterxml.jackson.databind.annotation.JsonSerialize import java.io.Serializable diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceAction.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceAction.kt similarity index 65% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceAction.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceAction.kt index 1881a7e7f..851a18b0c 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceAction.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceAction.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.instance +package com.cognifide.gradle.aem.common.instance import java.io.Serializable diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/ActionPerformer.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceActionPerformer.kt similarity index 57% rename from src/main/kotlin/com/cognifide/gradle/aem/common/ActionPerformer.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceActionPerformer.kt index 571eafb80..515c24205 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/ActionPerformer.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceActionPerformer.kt @@ -1,14 +1,15 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.instance -import com.cognifide.gradle.aem.instance.action.AbstractAction -import com.cognifide.gradle.aem.instance.action.AwaitAction -import com.cognifide.gradle.aem.instance.action.ReloadAction -import com.cognifide.gradle.aem.instance.action.ShutdownAction +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.instance.action.AbstractAction +import com.cognifide.gradle.aem.common.instance.action.AwaitAction +import com.cognifide.gradle.aem.common.instance.action.ReloadAction +import com.cognifide.gradle.aem.common.instance.action.ShutdownAction /** * Executor for actions affecting multiple remote instances at once. */ -class ActionPerformer(private val aem: AemExtension) { +class InstanceActionPerformer(private val aem: AemExtension) { fun await() = await {} diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceException.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceException.kt similarity index 64% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceException.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceException.kt index 0e3f0a2f2..58e49fe30 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceException.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceException.kt @@ -1,6 +1,6 @@ -package com.cognifide.gradle.aem.instance +package com.cognifide.gradle.aem.common.instance -import com.cognifide.gradle.aem.common.AemException +import com.cognifide.gradle.aem.AemException class InstanceException : AemException { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceHttpClient.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceHttpClient.kt similarity index 88% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceHttpClient.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceHttpClient.kt index a81e77890..b5e85c6e6 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceHttpClient.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceHttpClient.kt @@ -1,6 +1,6 @@ -package com.cognifide.gradle.aem.instance +package com.cognifide.gradle.aem.common.instance -import com.cognifide.gradle.aem.common.AemExtension +import com.cognifide.gradle.aem.AemExtension import com.cognifide.gradle.aem.common.http.HttpClient import com.cognifide.gradle.aem.common.http.ResponseException import org.apache.http.HttpResponse diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/InstanceOptions.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceOptions.kt similarity index 95% rename from src/main/kotlin/com/cognifide/gradle/aem/common/InstanceOptions.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceOptions.kt index c7788aafa..be836c85e 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/InstanceOptions.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceOptions.kt @@ -1,6 +1,7 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.instance -import com.cognifide.gradle.aem.instance.* +import com.cognifide.gradle.aem.AemException +import com.cognifide.gradle.aem.AemExtension import com.fasterxml.jackson.annotation.JsonIgnore import java.io.Serializable import org.gradle.api.tasks.Internal diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceProgress.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceProgress.kt similarity index 91% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceProgress.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceProgress.kt index ddce1608a..9385c1791 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceProgress.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceProgress.kt @@ -1,7 +1,7 @@ -package com.cognifide.gradle.aem.instance +package com.cognifide.gradle.aem.common.instance -import com.cognifide.gradle.aem.common.Behaviors -import com.cognifide.gradle.aem.instance.service.StateChecker +import com.cognifide.gradle.aem.common.build.Behaviors +import com.cognifide.gradle.aem.common.instance.service.StateChecker object InstanceProgress { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceService.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceService.kt similarity index 74% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceService.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceService.kt index 15ac2f89d..870e97190 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceService.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceService.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.instance +package com.cognifide.gradle.aem.common.instance open class InstanceService(val sync: InstanceSync) { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceSync.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceSync.kt similarity index 60% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceSync.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceSync.kt index 30d7b9529..81a237898 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceSync.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceSync.kt @@ -1,10 +1,10 @@ -package com.cognifide.gradle.aem.instance +package com.cognifide.gradle.aem.common.instance -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.instance.service.StateChecker -import com.cognifide.gradle.aem.instance.service.groovy.GroovyConsole -import com.cognifide.gradle.aem.instance.service.osgi.OsgiFramework -import com.cognifide.gradle.aem.instance.service.pkg.PackageManager +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.instance.service.StateChecker +import com.cognifide.gradle.aem.common.instance.service.groovy.GroovyConsole +import com.cognifide.gradle.aem.common.instance.service.osgi.OsgiFramework +import com.cognifide.gradle.aem.common.instance.service.pkg.PackageManager class InstanceSync(aem: AemExtension, instance: Instance) : InstanceHttpClient(aem, instance) { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceType.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceType.kt similarity index 87% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceType.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceType.kt index fa95d44db..f7236b4a5 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceType.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceType.kt @@ -1,7 +1,7 @@ -package com.cognifide.gradle.aem.instance +package com.cognifide.gradle.aem.common.instance -import com.cognifide.gradle.aem.common.AemException -import com.cognifide.gradle.aem.common.Patterns +import com.cognifide.gradle.aem.AemException +import com.cognifide.gradle.aem.common.utils.Patterns enum class InstanceType { AUTHOR, diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceUrl.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceUrl.kt similarity index 96% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceUrl.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceUrl.kt index 709f6fb2f..ed8c73193 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstanceUrl.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/InstanceUrl.kt @@ -1,6 +1,6 @@ -package com.cognifide.gradle.aem.instance +package com.cognifide.gradle.aem.common.instance -import com.cognifide.gradle.aem.common.AemException +import com.cognifide.gradle.aem.AemException import java.net.MalformedURLException import java.net.URL import java.net.URLEncoder diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/LocalInstance.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/LocalInstance.kt similarity index 97% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/LocalInstance.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/LocalInstance.kt index 2806df55f..54a21f22a 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/LocalInstance.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/LocalInstance.kt @@ -1,9 +1,10 @@ -package com.cognifide.gradle.aem.instance +package com.cognifide.gradle.aem.common.instance -import com.cognifide.gradle.aem.common.AemException -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.Formats +import com.cognifide.gradle.aem.AemException +import com.cognifide.gradle.aem.AemExtension import com.cognifide.gradle.aem.common.file.FileOperations +import com.cognifide.gradle.aem.common.utils.Formats +import com.cognifide.gradle.aem.instance.InstancePlugin import com.fasterxml.jackson.annotation.JsonIgnore import com.fasterxml.jackson.annotation.JsonProperty import java.io.File diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/LocalInstanceOptions.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/LocalInstanceOptions.kt similarity index 94% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/LocalInstanceOptions.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/LocalInstanceOptions.kt index bc584a8a3..a67efe370 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/LocalInstanceOptions.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/LocalInstanceOptions.kt @@ -1,12 +1,13 @@ -package com.cognifide.gradle.aem.instance +package com.cognifide.gradle.aem.common.instance -import com.cognifide.gradle.aem.common.AemException -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.AemTask +import com.cognifide.gradle.aem.AemException +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.AemTask import com.cognifide.gradle.aem.common.file.resolver.FileGroup import com.cognifide.gradle.aem.common.file.resolver.FileResolution import com.cognifide.gradle.aem.common.file.resolver.FileResolver import com.cognifide.gradle.aem.common.file.resolver.Resolver +import com.cognifide.gradle.aem.instance.InstancePlugin import com.fasterxml.jackson.annotation.JsonIgnore import java.io.File import java.io.Serializable @@ -26,7 +27,8 @@ class LocalInstanceOptions(aem: AemExtension) : Serializable { /** * Determines how instances will be created (from backup or from the scratch). */ - var source = Source.of(aem.props.string("localInstance.source") ?: Source.AUTO.name) + var source = Source.of(aem.props.string("localInstance.source") + ?: Source.AUTO.name) /** * Defines backup selection rule. diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/RemoteInstance.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/RemoteInstance.kt similarity index 89% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/RemoteInstance.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/RemoteInstance.kt index 83854d7f4..f4de1e2ca 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/RemoteInstance.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/RemoteInstance.kt @@ -1,7 +1,7 @@ -package com.cognifide.gradle.aem.instance +package com.cognifide.gradle.aem.common.instance -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.Formats +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.utils.Formats import java.io.Serializable class RemoteInstance private constructor(aem: AemExtension) : AbstractInstance(aem), Serializable { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/action/AbstractAction.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/action/AbstractAction.kt similarity index 67% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/action/AbstractAction.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/action/AbstractAction.kt index 148e7ffa1..0aaa966c1 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/action/AbstractAction.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/action/AbstractAction.kt @@ -1,9 +1,9 @@ -package com.cognifide.gradle.aem.instance.action +package com.cognifide.gradle.aem.common.instance.action -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.instance.Instance -import com.cognifide.gradle.aem.instance.InstanceAction -import com.cognifide.gradle.aem.instance.LocalInstance +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.instance.Instance +import com.cognifide.gradle.aem.common.instance.InstanceAction +import com.cognifide.gradle.aem.common.instance.LocalInstance import org.gradle.api.tasks.Internal abstract class AbstractAction( diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/action/AwaitAction.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/action/AwaitAction.kt similarity index 95% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/action/AwaitAction.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/action/AwaitAction.kt index c1f5b5d66..78e1b7e90 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/action/AwaitAction.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/action/AwaitAction.kt @@ -1,8 +1,12 @@ -package com.cognifide.gradle.aem.instance.action - -import com.cognifide.gradle.aem.common.* -import com.cognifide.gradle.aem.instance.* -import com.cognifide.gradle.aem.instance.service.StateChecker +package com.cognifide.gradle.aem.common.instance.action + +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.build.Behaviors +import com.cognifide.gradle.aem.common.build.ProgressCountdown +import com.cognifide.gradle.aem.common.build.ProgressLogger +import com.cognifide.gradle.aem.common.instance.* +import com.cognifide.gradle.aem.common.instance.service.StateChecker +import com.cognifide.gradle.aem.common.utils.Formats import java.util.concurrent.TimeUnit import org.apache.http.HttpStatus diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/action/ReloadAction.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/action/ReloadAction.kt similarity index 83% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/action/ReloadAction.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/action/ReloadAction.kt index 24f5550c5..8a3c494c3 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/action/ReloadAction.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/action/ReloadAction.kt @@ -1,9 +1,9 @@ -package com.cognifide.gradle.aem.instance.action +package com.cognifide.gradle.aem.common.instance.action -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.ProgressCountdown -import com.cognifide.gradle.aem.instance.Instance -import com.cognifide.gradle.aem.instance.InstanceException +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.build.ProgressCountdown +import com.cognifide.gradle.aem.common.instance.Instance +import com.cognifide.gradle.aem.common.instance.InstanceException import java.util.concurrent.TimeUnit /** diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/action/ShutdownAction.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/action/ShutdownAction.kt similarity index 86% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/action/ShutdownAction.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/action/ShutdownAction.kt index 4ea67f4d3..cf44d2775 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/action/ShutdownAction.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/action/ShutdownAction.kt @@ -1,12 +1,12 @@ -package com.cognifide.gradle.aem.instance.action - -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.Behaviors -import com.cognifide.gradle.aem.common.ProgressLogger -import com.cognifide.gradle.aem.instance.InstanceException -import com.cognifide.gradle.aem.instance.InstanceProgress -import com.cognifide.gradle.aem.instance.names -import com.cognifide.gradle.aem.instance.service.StateChecker +package com.cognifide.gradle.aem.common.instance.action + +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.build.Behaviors +import com.cognifide.gradle.aem.common.build.ProgressLogger +import com.cognifide.gradle.aem.common.instance.InstanceException +import com.cognifide.gradle.aem.common.instance.InstanceProgress +import com.cognifide.gradle.aem.common.instance.names +import com.cognifide.gradle.aem.common.instance.service.StateChecker class ShutdownAction(aem: AemExtension) : AbstractAction(aem) { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/StateChecker.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/StateChecker.kt similarity index 97% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/service/StateChecker.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/StateChecker.kt index 229414ee8..1fea48a12 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/StateChecker.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/StateChecker.kt @@ -1,7 +1,7 @@ -package com.cognifide.gradle.aem.instance.service +package com.cognifide.gradle.aem.common.instance.service -import com.cognifide.gradle.aem.common.CollectingLogger -import com.cognifide.gradle.aem.instance.InstanceSync +import com.cognifide.gradle.aem.common.build.CollectingLogger +import com.cognifide.gradle.aem.common.instance.InstanceSync import org.apache.commons.lang3.builder.EqualsBuilder import org.apache.commons.lang3.builder.HashCodeBuilder diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/groovy/GroovyConsole.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/groovy/GroovyConsole.kt similarity index 88% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/service/groovy/GroovyConsole.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/groovy/GroovyConsole.kt index 31657f3b9..12b9a6aca 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/groovy/GroovyConsole.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/groovy/GroovyConsole.kt @@ -1,11 +1,11 @@ -package com.cognifide.gradle.aem.instance.service.groovy +package com.cognifide.gradle.aem.common.instance.service.groovy -import com.cognifide.gradle.aem.common.AemException -import com.cognifide.gradle.aem.common.Formats -import com.cognifide.gradle.aem.common.Patterns -import com.cognifide.gradle.aem.instance.InstanceException -import com.cognifide.gradle.aem.instance.InstanceService -import com.cognifide.gradle.aem.instance.InstanceSync +import com.cognifide.gradle.aem.AemException +import com.cognifide.gradle.aem.common.instance.InstanceException +import com.cognifide.gradle.aem.common.instance.InstanceService +import com.cognifide.gradle.aem.common.instance.InstanceSync +import com.cognifide.gradle.aem.common.utils.Formats +import com.cognifide.gradle.aem.common.utils.Patterns import java.io.File /** diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/groovy/GroovyConsoleResult.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/groovy/GroovyConsoleResult.kt similarity index 93% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/service/groovy/GroovyConsoleResult.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/groovy/GroovyConsoleResult.kt index 3e5bd22f6..ca3d292e8 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/groovy/GroovyConsoleResult.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/groovy/GroovyConsoleResult.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.instance.service.groovy +package com.cognifide.gradle.aem.common.instance.service.groovy import com.fasterxml.jackson.annotation.JsonIgnoreProperties import org.apache.commons.lang3.StringUtils diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/Bundle.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/Bundle.kt similarity index 97% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/Bundle.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/Bundle.kt index 87dcff08b..904268ecf 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/Bundle.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/Bundle.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.instance.service.osgi +package com.cognifide.gradle.aem.common.instance.service.osgi import com.fasterxml.jackson.annotation.JsonIgnoreProperties import org.apache.commons.lang3.builder.EqualsBuilder diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/BundleState.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/BundleState.kt similarity index 94% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/BundleState.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/BundleState.kt index a1088dfbd..6766f9020 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/BundleState.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/BundleState.kt @@ -1,7 +1,7 @@ -package com.cognifide.gradle.aem.instance.service.osgi +package com.cognifide.gradle.aem.common.instance.service.osgi -import com.cognifide.gradle.aem.common.Formats -import com.cognifide.gradle.aem.common.Patterns +import com.cognifide.gradle.aem.common.utils.Formats +import com.cognifide.gradle.aem.common.utils.Patterns import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonProperty import org.apache.commons.lang3.builder.EqualsBuilder diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/Component.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/Component.kt similarity index 97% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/Component.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/Component.kt index 62a81e86d..5744d4f8e 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/Component.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/Component.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.instance.service.osgi +package com.cognifide.gradle.aem.common.instance.service.osgi import com.fasterxml.jackson.annotation.JsonIgnoreProperties import org.apache.commons.lang3.builder.EqualsBuilder diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/ComponentState.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/ComponentState.kt similarity index 94% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/ComponentState.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/ComponentState.kt index f35996f8e..b3391a94f 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/ComponentState.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/ComponentState.kt @@ -1,6 +1,6 @@ -package com.cognifide.gradle.aem.instance.service.osgi +package com.cognifide.gradle.aem.common.instance.service.osgi -import com.cognifide.gradle.aem.common.Patterns +import com.cognifide.gradle.aem.common.utils.Patterns import com.fasterxml.jackson.annotation.JsonIgnore import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonProperty diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/Event.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/Event.kt similarity index 94% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/Event.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/Event.kt index 19efc9fb6..3ed03a9c7 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/Event.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/Event.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.instance.service.osgi +package com.cognifide.gradle.aem.common.instance.service.osgi import com.fasterxml.jackson.annotation.JsonIgnoreProperties import org.apache.commons.lang3.builder.EqualsBuilder diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/EventState.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/EventState.kt similarity index 91% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/EventState.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/EventState.kt index baf317775..52dc172b3 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/EventState.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/EventState.kt @@ -1,7 +1,7 @@ -package com.cognifide.gradle.aem.instance.service.osgi +package com.cognifide.gradle.aem.common.instance.service.osgi -import com.cognifide.gradle.aem.common.Formats -import com.cognifide.gradle.aem.common.Patterns +import com.cognifide.gradle.aem.common.utils.Formats +import com.cognifide.gradle.aem.common.utils.Patterns import com.fasterxml.jackson.annotation.JsonIgnore import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonProperty diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/OsgiFramework.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/OsgiFramework.kt similarity index 94% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/OsgiFramework.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/OsgiFramework.kt index e8a8a6953..a9c6185cd 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/osgi/OsgiFramework.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/osgi/OsgiFramework.kt @@ -1,7 +1,9 @@ -package com.cognifide.gradle.aem.instance.service.osgi +package com.cognifide.gradle.aem.common.instance.service.osgi -import com.cognifide.gradle.aem.common.AemException -import com.cognifide.gradle.aem.instance.* +import com.cognifide.gradle.aem.AemException +import com.cognifide.gradle.aem.common.instance.InstanceException +import com.cognifide.gradle.aem.common.instance.InstanceService +import com.cognifide.gradle.aem.common.instance.InstanceSync /** * Controls OSGi framework using Apache Felix Web Console endpoints. diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/PackageBuildResponse.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/BuildResponse.kt similarity index 66% rename from src/main/kotlin/com/cognifide/gradle/aem/pkg/PackageBuildResponse.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/BuildResponse.kt index d4c851de2..d00c90ad4 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/PackageBuildResponse.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/BuildResponse.kt @@ -1,9 +1,9 @@ -package com.cognifide.gradle.aem.pkg +package com.cognifide.gradle.aem.common.instance.service.pkg import com.fasterxml.jackson.annotation.JsonIgnoreProperties @JsonIgnoreProperties(ignoreUnknown = true) -class PackageBuildResponse private constructor() { +class BuildResponse private constructor() { var isSuccess: Boolean = false diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/DeleteResponse.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/DeleteResponse.kt similarity index 93% rename from src/main/kotlin/com/cognifide/gradle/aem/pkg/DeleteResponse.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/DeleteResponse.kt index 6b63c9232..154edaccb 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/DeleteResponse.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/DeleteResponse.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.pkg +package com.cognifide.gradle.aem.common.instance.service.pkg import java.io.InputStream diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/ErrorPattern.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/ErrorPattern.kt similarity index 68% rename from src/main/kotlin/com/cognifide/gradle/aem/pkg/ErrorPattern.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/ErrorPattern.kt index cccfddda4..ea66a0375 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/ErrorPattern.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/ErrorPattern.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.pkg +package com.cognifide.gradle.aem.common.instance.service.pkg import java.util.regex.Pattern diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/HtmlResponse.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/HtmlResponse.kt similarity index 98% rename from src/main/kotlin/com/cognifide/gradle/aem/pkg/HtmlResponse.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/HtmlResponse.kt index 02cb6a1c4..fcd74d635 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/HtmlResponse.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/HtmlResponse.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.pkg +package com.cognifide.gradle.aem.common.instance.service.pkg import com.cognifide.gradle.aem.common.http.ResponseException import java.io.InputStream diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/InstallResponse.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/InstallResponse.kt similarity index 94% rename from src/main/kotlin/com/cognifide/gradle/aem/pkg/InstallResponse.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/InstallResponse.kt index e0e0d289f..79b689926 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/InstallResponse.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/InstallResponse.kt @@ -1,6 +1,6 @@ -package com.cognifide.gradle.aem.pkg +package com.cognifide.gradle.aem.common.instance.service.pkg -import com.cognifide.gradle.aem.common.Patterns +import com.cognifide.gradle.aem.common.utils.Patterns import java.io.InputStream import java.util.regex.Pattern diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/ListResponse.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/ListResponse.kt similarity index 82% rename from src/main/kotlin/com/cognifide/gradle/aem/pkg/ListResponse.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/ListResponse.kt index 4dbee6c71..799051595 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/ListResponse.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/ListResponse.kt @@ -1,6 +1,5 @@ -package com.cognifide.gradle.aem.pkg +package com.cognifide.gradle.aem.common.instance.service.pkg -import com.cognifide.gradle.aem.instance.service.pkg.Package import com.fasterxml.jackson.annotation.JsonIgnoreProperties import org.gradle.api.Project diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/pkg/Package.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/Package.kt similarity index 97% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/service/pkg/Package.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/Package.kt index 5cb380c3b..f146e1495 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/pkg/Package.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/Package.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.instance.service.pkg +package com.cognifide.gradle.aem.common.instance.service.pkg import com.cognifide.gradle.aem.pkg.tasks.PackageCompose import com.fasterxml.jackson.annotation.JsonIgnore diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/pkg/PackageManager.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/PackageManager.kt similarity index 94% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/service/pkg/PackageManager.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/PackageManager.kt index 28518093c..3f55ef213 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/pkg/PackageManager.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/PackageManager.kt @@ -1,14 +1,15 @@ -package com.cognifide.gradle.aem.instance.service.pkg +package com.cognifide.gradle.aem.common.instance.service.pkg -import com.cognifide.gradle.aem.common.BuildScope -import com.cognifide.gradle.aem.common.Patterns -import com.cognifide.gradle.aem.common.Retry +import com.cognifide.gradle.aem.common.build.BuildScope +import com.cognifide.gradle.aem.common.build.Retry import com.cognifide.gradle.aem.common.http.RequestException import com.cognifide.gradle.aem.common.http.ResponseException -import com.cognifide.gradle.aem.instance.InstanceException -import com.cognifide.gradle.aem.instance.InstanceService -import com.cognifide.gradle.aem.instance.InstanceSync -import com.cognifide.gradle.aem.pkg.* +import com.cognifide.gradle.aem.common.instance.InstanceException +import com.cognifide.gradle.aem.common.instance.InstanceService +import com.cognifide.gradle.aem.common.instance.InstanceSync +import com.cognifide.gradle.aem.common.pkg.PackageDefinition +import com.cognifide.gradle.aem.common.pkg.PackageException +import com.cognifide.gradle.aem.common.utils.Patterns import com.cognifide.gradle.aem.pkg.tasks.PackageCompose import java.io.File import java.io.FileNotFoundException @@ -154,13 +155,13 @@ class PackageManager(sync: InstanceSync) : InstanceService(sync) { } } - fun buildPackage(remotePath: String): PackageBuildResponse { + fun buildPackage(remotePath: String): BuildResponse { val url = "$JSON_PATH$remotePath/?cmd=build" aem.logger.info("Building package $remotePath on $instance") val response = try { - sync.postMultipart(url) { asObjectFromJson(it, PackageBuildResponse::class.java) } + sync.postMultipart(url) { asObjectFromJson(it, BuildResponse::class.java) } } catch (e: RequestException) { throw InstanceException("Cannot build package $remotePath on $instance. Reason: request failed.", e) } catch (e: ResponseException) { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/PackageResolver.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/PackageResolver.kt similarity index 94% rename from src/main/kotlin/com/cognifide/gradle/aem/pkg/PackageResolver.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/PackageResolver.kt index f86172767..0a6ee4951 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/PackageResolver.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/PackageResolver.kt @@ -1,6 +1,5 @@ -package com.cognifide.gradle.aem.pkg +package com.cognifide.gradle.aem.common.instance.service.pkg -import com.cognifide.gradle.aem.instance.service.pkg.Package import org.gradle.api.Project enum class PackageResolver { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/pkg/PackageState.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/PackageState.kt similarity index 81% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/service/pkg/PackageState.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/PackageState.kt index e51fe16fe..d13b7652c 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/service/pkg/PackageState.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/PackageState.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.instance.service.pkg +package com.cognifide.gradle.aem.common.instance.service.pkg import java.io.File diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/UninstallResponse.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/UninstallResponse.kt similarity index 94% rename from src/main/kotlin/com/cognifide/gradle/aem/pkg/UninstallResponse.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/UninstallResponse.kt index e21181a0b..16dd279ad 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/UninstallResponse.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/UninstallResponse.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.pkg +package com.cognifide.gradle.aem.common.instance.service.pkg import java.io.InputStream import java.util.regex.Pattern diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/UploadResponse.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/UploadResponse.kt similarity index 89% rename from src/main/kotlin/com/cognifide/gradle/aem/pkg/UploadResponse.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/UploadResponse.kt index e288fee15..151b3aa53 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/UploadResponse.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/UploadResponse.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.pkg +package com.cognifide.gradle.aem.common.instance.service.pkg import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.databind.ObjectMapper diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/notifier/DorkboxNotifier.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/notifier/DorkboxNotifier.kt index becae721b..9e826c72f 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/notifier/DorkboxNotifier.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/notifier/DorkboxNotifier.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.common.notifier -import com.cognifide.gradle.aem.common.AemExtension +import com.cognifide.gradle.aem.AemExtension import com.cognifide.gradle.aem.common.notifier.Notifier as BaseNotifier import dorkbox.notify.Notify import org.apache.commons.lang3.StringUtils diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/NotifierFacade.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/notifier/NotifierFacade.kt similarity index 96% rename from src/main/kotlin/com/cognifide/gradle/aem/common/NotifierFacade.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/notifier/NotifierFacade.kt index 7172aca90..983f6762d 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/NotifierFacade.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/notifier/NotifierFacade.kt @@ -1,7 +1,7 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.notifier -import com.cognifide.gradle.aem.common.notifier.DorkboxNotifier -import com.cognifide.gradle.aem.common.notifier.Notifier +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.build.BuildScope import com.fasterxml.jackson.annotation.JsonIgnore import dorkbox.notify.Notify import dorkbox.notify.Theme diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/PackageDefinition.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/pkg/PackageDefinition.kt similarity index 94% rename from src/main/kotlin/com/cognifide/gradle/aem/pkg/PackageDefinition.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/pkg/PackageDefinition.kt index 395289460..b9f396d8e 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/PackageDefinition.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/pkg/PackageDefinition.kt @@ -1,9 +1,9 @@ -package com.cognifide.gradle.aem.pkg +package com.cognifide.gradle.aem.common.pkg -import com.cognifide.gradle.aem.common.AemExtension +import com.cognifide.gradle.aem.AemExtension import com.cognifide.gradle.aem.common.file.FileOperations -import com.cognifide.gradle.aem.instance.service.pkg.Package -import com.cognifide.gradle.aem.pkg.vlt.VltDefinition +import com.cognifide.gradle.aem.common.instance.service.pkg.Package +import com.cognifide.gradle.aem.common.pkg.vlt.VltDefinition import java.io.File import org.apache.commons.io.FileUtils import org.gradle.util.GFileUtils diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/PackageException.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/pkg/PackageException.kt similarity index 65% rename from src/main/kotlin/com/cognifide/gradle/aem/pkg/PackageException.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/pkg/PackageException.kt index bc29007ed..bca999977 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/PackageException.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/pkg/PackageException.kt @@ -1,6 +1,6 @@ -package com.cognifide.gradle.aem.pkg +package com.cognifide.gradle.aem.common.pkg -import com.cognifide.gradle.aem.common.AemException +import com.cognifide.gradle.aem.AemException class PackageException : AemException { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/PackageFileFilter.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/pkg/PackageFileFilter.kt similarity index 89% rename from src/main/kotlin/com/cognifide/gradle/aem/pkg/PackageFileFilter.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/pkg/PackageFileFilter.kt index aafb5a668..d949d06de 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/PackageFileFilter.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/pkg/PackageFileFilter.kt @@ -1,20 +1,17 @@ -package com.cognifide.gradle.aem.pkg +package com.cognifide.gradle.aem.common.pkg import aQute.bnd.osgi.Jar -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.Patterns +import com.cognifide.gradle.aem.AemExtension import com.cognifide.gradle.aem.common.file.FileContentReader -import com.cognifide.gradle.aem.instance.service.osgi.Bundle -import com.cognifide.gradle.aem.instance.service.pkg.Package +import com.cognifide.gradle.aem.common.instance.service.osgi.Bundle +import com.cognifide.gradle.aem.common.instance.service.pkg.Package +import com.cognifide.gradle.aem.common.utils.Patterns import java.io.File import java.io.Serializable -import org.gradle.api.Project import org.gradle.api.file.CopySpec import org.gradle.api.tasks.Input -class PackageFileFilter(project: Project) : Serializable { - - private val aem = AemExtension.of(project) +class PackageFileFilter(private val aem: AemExtension) : Serializable { @Input var excluding: Boolean = true diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/PackageOptions.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/pkg/PackageOptions.kt similarity index 94% rename from src/main/kotlin/com/cognifide/gradle/aem/common/PackageOptions.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/pkg/PackageOptions.kt index 10212a64f..51499c1ce 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/PackageOptions.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/pkg/PackageOptions.kt @@ -1,6 +1,7 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.pkg -import com.cognifide.gradle.aem.instance.service.pkg.Package +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.instance.service.pkg.Package import com.fasterxml.jackson.annotation.JsonIgnore import java.io.File import java.io.Serializable diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/vlt/VltDefinition.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/pkg/vlt/VltDefinition.kt similarity index 96% rename from src/main/kotlin/com/cognifide/gradle/aem/pkg/vlt/VltDefinition.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/pkg/vlt/VltDefinition.kt index a60f0d6ac..58c757d99 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/vlt/VltDefinition.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/pkg/vlt/VltDefinition.kt @@ -1,6 +1,6 @@ -package com.cognifide.gradle.aem.pkg.vlt +package com.cognifide.gradle.aem.common.pkg.vlt -import com.cognifide.gradle.aem.common.AemExtension +import com.cognifide.gradle.aem.AemExtension import org.apache.commons.lang3.StringUtils import org.gradle.api.tasks.Input import org.gradle.api.tasks.Internal diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/vlt/VltFilter.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/pkg/vlt/VltFilter.kt similarity index 91% rename from src/main/kotlin/com/cognifide/gradle/aem/pkg/vlt/VltFilter.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/pkg/vlt/VltFilter.kt index ceb61adeb..b830efbf1 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/vlt/VltFilter.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/pkg/vlt/VltFilter.kt @@ -1,10 +1,10 @@ -package com.cognifide.gradle.aem.pkg.vlt +package com.cognifide.gradle.aem.common.pkg.vlt -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.AemTask +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.AemTask import com.cognifide.gradle.aem.common.file.FileOperations -import com.cognifide.gradle.aem.instance.service.pkg.Package -import com.cognifide.gradle.aem.tooling.vlt.tasks.Vlt +import com.cognifide.gradle.aem.common.instance.service.pkg.Package +import com.cognifide.gradle.aem.tooling.vlt.Vlt import java.io.Closeable import java.io.File import org.apache.commons.io.FileUtils diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/Debug.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/Debug.kt index a131f6f80..a15ab9ad9 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/Debug.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/Debug.kt @@ -1,12 +1,12 @@ package com.cognifide.gradle.aem.common.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask -import com.cognifide.gradle.aem.common.AemException -import com.cognifide.gradle.aem.common.AemPlugin -import com.cognifide.gradle.aem.common.AemTask -import com.cognifide.gradle.aem.common.Formats -import com.cognifide.gradle.aem.instance.names -import com.cognifide.gradle.aem.instance.service.pkg.Package +import com.cognifide.gradle.aem.AemDefaultTask +import com.cognifide.gradle.aem.AemException +import com.cognifide.gradle.aem.AemPlugin +import com.cognifide.gradle.aem.AemTask +import com.cognifide.gradle.aem.common.instance.names +import com.cognifide.gradle.aem.common.instance.service.pkg.Package +import com.cognifide.gradle.aem.common.utils.Formats import com.cognifide.gradle.aem.pkg.PackagePlugin import org.gradle.api.tasks.Internal import org.gradle.api.tasks.TaskAction diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/InstanceTask.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/InstanceTask.kt index 1b375771d..580bbe8b5 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/InstanceTask.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/InstanceTask.kt @@ -1,7 +1,7 @@ package com.cognifide.gradle.aem.common.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask -import com.cognifide.gradle.aem.instance.Instance +import com.cognifide.gradle.aem.AemDefaultTask +import com.cognifide.gradle.aem.common.instance.Instance import org.gradle.api.tasks.Input open class InstanceTask : AemDefaultTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/LocalInstanceTask.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/LocalInstanceTask.kt index 971afad07..816c5a594 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/LocalInstanceTask.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/LocalInstanceTask.kt @@ -1,8 +1,8 @@ package com.cognifide.gradle.aem.common.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask -import com.cognifide.gradle.aem.instance.LocalInstance -import com.cognifide.gradle.aem.instance.LocalInstanceOptions +import com.cognifide.gradle.aem.AemDefaultTask +import com.cognifide.gradle.aem.common.instance.LocalInstance +import com.cognifide.gradle.aem.common.instance.LocalInstanceOptions import org.gradle.api.tasks.Input import org.gradle.api.tasks.Internal diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/PackageTask.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/PackageTask.kt index 9be004b3d..75f4235cc 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/PackageTask.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/PackageTask.kt @@ -1,7 +1,7 @@ package com.cognifide.gradle.aem.common.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask -import com.cognifide.gradle.aem.instance.Instance +import com.cognifide.gradle.aem.AemDefaultTask +import com.cognifide.gradle.aem.common.instance.Instance import java.io.File import org.gradle.api.tasks.Input import org.gradle.api.tasks.InputFiles diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/Resolve.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/Resolve.kt index 94ae6e8d0..e9cc5d3e2 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/Resolve.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/Resolve.kt @@ -1,8 +1,8 @@ package com.cognifide.gradle.aem.common.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask +import com.cognifide.gradle.aem.instance.satisfy.InstanceSatisfy import com.cognifide.gradle.aem.instance.tasks.InstanceCreate -import com.cognifide.gradle.aem.instance.tasks.InstanceSatisfy import org.gradle.api.tasks.TaskAction open class Resolve : AemDefaultTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/TaskSequence.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/TaskSequence.kt similarity index 90% rename from src/main/kotlin/com/cognifide/gradle/aem/common/TaskSequence.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/tasks/TaskSequence.kt index 162da3ed0..edda2b800 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/TaskSequence.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/TaskSequence.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.tasks class TaskSequence { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/ZipTask.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/ZipTask.kt index b87dba8a2..3a4413d70 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/ZipTask.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/ZipTask.kt @@ -1,9 +1,9 @@ package com.cognifide.gradle.aem.common.tasks -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.AemTask -import com.cognifide.gradle.aem.common.Formats -import com.cognifide.gradle.aem.common.ProgressIndicator +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.AemTask +import com.cognifide.gradle.aem.common.build.ProgressIndicator +import com.cognifide.gradle.aem.common.utils.Formats import org.gradle.api.tasks.Internal import org.gradle.api.tasks.TaskAction import org.gradle.api.tasks.bundling.Zip as Base diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Destroy.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Destroy.kt index 61fb0403c..fe8e064bc 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Destroy.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Destroy.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.common.tasks.lifecycle -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask open class Destroy : AemDefaultTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Down.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Down.kt index f7bfa89ef..b1c8feda2 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Down.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Down.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.common.tasks.lifecycle -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask open class Down : AemDefaultTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Resetup.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Resetup.kt index 80e7e1af8..55fbd7d01 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Resetup.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Resetup.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.common.tasks.lifecycle -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask open class Resetup : AemDefaultTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Restart.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Restart.kt index cfee3bfa3..2a14c66f0 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Restart.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Restart.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.common.tasks.lifecycle -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask open class Restart : AemDefaultTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Setup.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Setup.kt index 856046315..c1939b0bc 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Setup.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Setup.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.common.tasks.lifecycle -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask open class Setup : AemDefaultTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Up.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Up.kt index 3dc87c7d4..6008e3fee 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Up.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/tasks/lifecycle/Up.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.common.tasks.lifecycle -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask open class Up : AemDefaultTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/Collections.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/utils/Collections.kt similarity index 96% rename from src/main/kotlin/com/cognifide/gradle/aem/common/Collections.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/utils/Collections.kt index e89a752ae..6475faabf 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/Collections.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/utils/Collections.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.utils import com.google.common.collect.Maps diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/Formats.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/utils/Formats.kt similarity index 99% rename from src/main/kotlin/com/cognifide/gradle/aem/common/Formats.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/utils/Formats.kt index 6a19672ce..2fda86f0a 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/Formats.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/utils/Formats.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.utils import com.fasterxml.jackson.core.util.DefaultIndenter import com.fasterxml.jackson.core.util.DefaultPrettyPrinter diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/LineSeparator.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/utils/LineSeparator.kt similarity index 92% rename from src/main/kotlin/com/cognifide/gradle/aem/common/LineSeparator.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/utils/LineSeparator.kt index adfe9fc56..c59f34e99 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/LineSeparator.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/utils/LineSeparator.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.utils /** * @see diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/Patterns.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/utils/Patterns.kt similarity index 97% rename from src/main/kotlin/com/cognifide/gradle/aem/common/Patterns.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/utils/Patterns.kt index 3fea5fe8d..ec60a5573 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/Patterns.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/utils/Patterns.kt @@ -1,4 +1,4 @@ -package com.cognifide.gradle.aem.common +package com.cognifide.gradle.aem.common.utils import java.io.File import org.apache.commons.io.FilenameUtils diff --git a/src/main/kotlin/com/cognifide/gradle/aem/common/formats/JsonPassword.kt b/src/main/kotlin/com/cognifide/gradle/aem/common/utils/formats/JsonPassword.kt similarity index 78% rename from src/main/kotlin/com/cognifide/gradle/aem/common/formats/JsonPassword.kt rename to src/main/kotlin/com/cognifide/gradle/aem/common/utils/formats/JsonPassword.kt index b06af4093..a964ac1be 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/common/formats/JsonPassword.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/common/utils/formats/JsonPassword.kt @@ -1,6 +1,6 @@ -package com.cognifide.gradle.aem.common.formats +package com.cognifide.gradle.aem.common.utils.formats -import com.cognifide.gradle.aem.common.Formats +import com.cognifide.gradle.aem.common.utils.Formats import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.databind.JsonSerializer import com.fasterxml.jackson.databind.SerializerProvider diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/Environment.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/Environment.kt index 0a1946b85..029756429 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/Environment.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/Environment.kt @@ -1,10 +1,10 @@ package com.cognifide.gradle.aem.environment -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.AemTask -import com.cognifide.gradle.aem.common.Patterns +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.AemTask import com.cognifide.gradle.aem.common.file.FileOperations import com.cognifide.gradle.aem.common.file.resolver.FileResolver +import com.cognifide.gradle.aem.common.utils.Patterns import com.cognifide.gradle.aem.environment.docker.base.CygPath import com.cognifide.gradle.aem.environment.docker.base.DockerType import com.cognifide.gradle.aem.environment.docker.domain.HttpdContainer diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/EnvironmentException.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/EnvironmentException.kt index db445df65..f666b5cf6 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/EnvironmentException.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/EnvironmentException.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment -import com.cognifide.gradle.aem.common.AemException +import com.cognifide.gradle.aem.AemException class EnvironmentException : AemException { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/EnvironmentPlugin.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/EnvironmentPlugin.kt index 8b9cd6646..0a300884a 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/EnvironmentPlugin.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/EnvironmentPlugin.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment -import com.cognifide.gradle.aem.common.AemPlugin +import com.cognifide.gradle.aem.AemPlugin import com.cognifide.gradle.aem.common.CommonPlugin import com.cognifide.gradle.aem.common.tasks.lifecycle.* import com.cognifide.gradle.aem.environment.tasks.* diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/base/DockerContainer.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/base/DockerContainer.kt index 49230116b..4f58aa680 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/base/DockerContainer.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/base/DockerContainer.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment.docker.base -import com.cognifide.gradle.aem.common.AemExtension +import com.cognifide.gradle.aem.AemExtension open class DockerContainer(aem: AemExtension, val name: String) { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/base/DockerException.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/base/DockerException.kt index 66ca62635..c277ae3e1 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/base/DockerException.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/base/DockerException.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment.docker.base -import com.cognifide.gradle.aem.common.AemException +import com.cognifide.gradle.aem.AemException import org.buildobjects.process.ExternalProcessFailureException open class DockerException : AemException { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/base/DockerStack.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/base/DockerStack.kt index 477b17400..f5bc2beb3 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/base/DockerStack.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/base/DockerStack.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment.docker.base -import com.cognifide.gradle.aem.common.AemExtension +import com.cognifide.gradle.aem.AemExtension open class DockerStack(private val aem: AemExtension, val name: String) { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/base/DockerType.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/base/DockerType.kt index 2a9ed976b..b668e84b5 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/base/DockerType.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/base/DockerType.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment.docker.base -import com.cognifide.gradle.aem.common.AemExtension +import com.cognifide.gradle.aem.AemExtension enum class DockerType(val hostIp: String) { DESKTOP("127.0.0.1"), diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/domain/HttpdContainer.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/domain/HttpdContainer.kt index 405f0f322..332535e45 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/domain/HttpdContainer.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/domain/HttpdContainer.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment.docker.domain -import com.cognifide.gradle.aem.common.Behaviors +import com.cognifide.gradle.aem.common.build.Behaviors import com.cognifide.gradle.aem.environment.Environment import com.cognifide.gradle.aem.environment.EnvironmentException import com.cognifide.gradle.aem.environment.docker.base.DockerContainer diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/domain/HttpdReloader.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/domain/HttpdReloader.kt index 95e58ed82..24df36274 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/domain/HttpdReloader.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/domain/HttpdReloader.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment.docker.domain -import com.cognifide.gradle.aem.common.AemExtension +import com.cognifide.gradle.aem.AemExtension import com.cognifide.gradle.aem.common.file.FileWatcher import java.util.* import kotlinx.coroutines.* diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/domain/Stack.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/domain/Stack.kt index a87bd82bf..276d8cd83 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/domain/Stack.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/docker/domain/Stack.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment.docker.domain -import com.cognifide.gradle.aem.common.Behaviors +import com.cognifide.gradle.aem.common.build.Behaviors import com.cognifide.gradle.aem.environment.Environment import com.cognifide.gradle.aem.environment.EnvironmentException import com.cognifide.gradle.aem.environment.docker.base.DockerException diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/health/HealthChecker.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/health/HealthChecker.kt index 2a719be8e..e673c12fa 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/health/HealthChecker.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/health/HealthChecker.kt @@ -1,7 +1,7 @@ package com.cognifide.gradle.aem.environment.health -import com.cognifide.gradle.aem.common.Formats import com.cognifide.gradle.aem.common.http.HttpClient +import com.cognifide.gradle.aem.common.utils.Formats import com.cognifide.gradle.aem.environment.Environment import com.cognifide.gradle.aem.environment.EnvironmentException diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentCheck.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentCheck.kt index a6c0e46a5..2fd37f505 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentCheck.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentCheck.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask import org.gradle.api.tasks.TaskAction open class EnvironmentCheck : AemDefaultTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentClean.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentClean.kt index 913ac3f1a..47046a551 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentClean.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentClean.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask import org.gradle.api.tasks.TaskAction open class EnvironmentClean : AemDefaultTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentDestroy.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentDestroy.kt index 55388aabc..74ec47c05 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentDestroy.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentDestroy.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask import org.gradle.api.execution.TaskExecutionGraph import org.gradle.api.tasks.TaskAction diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentDev.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentDev.kt index d47592f2a..94a58f868 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentDev.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentDev.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask import com.cognifide.gradle.aem.environment.docker.domain.HttpdReloader import org.gradle.api.tasks.Internal import org.gradle.api.tasks.TaskAction diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentDown.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentDown.kt index 636c8493e..ffd6092bb 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentDown.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentDown.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask import org.gradle.api.tasks.TaskAction open class EnvironmentDown : AemDefaultTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentHosts.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentHosts.kt index da409c974..f71382017 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentHosts.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentHosts.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask import com.cognifide.gradle.aem.environment.hosts.Hosts import org.gradle.api.tasks.TaskAction diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentResetup.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentResetup.kt index 90f40a895..613449c71 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentResetup.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentResetup.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask open class EnvironmentResetup : AemDefaultTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentRestart.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentRestart.kt index 9e87a82b0..73e480216 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentRestart.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentRestart.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask open class EnvironmentRestart : AemDefaultTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentUp.kt b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentUp.kt index bcd1ec2d6..c6c544f15 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentUp.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/environment/tasks/EnvironmentUp.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.environment.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask import org.gradle.api.tasks.TaskAction open class EnvironmentUp : AemDefaultTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstancePlugin.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/InstancePlugin.kt index 15db11f7b..d84627972 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/InstancePlugin.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/InstancePlugin.kt @@ -1,9 +1,11 @@ package com.cognifide.gradle.aem.instance -import com.cognifide.gradle.aem.common.AemPlugin +import com.cognifide.gradle.aem.AemPlugin import com.cognifide.gradle.aem.common.CommonPlugin import com.cognifide.gradle.aem.common.tasks.Resolve import com.cognifide.gradle.aem.common.tasks.lifecycle.* +import com.cognifide.gradle.aem.instance.satisfy.InstanceSatisfy +import com.cognifide.gradle.aem.instance.tail.InstanceTail import com.cognifide.gradle.aem.instance.tasks.* import com.cognifide.gradle.aem.pkg.PackagePlugin import com.cognifide.gradle.aem.pkg.tasks.PackageDeploy diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceSatisfy.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/satisfy/InstanceSatisfy.kt similarity index 94% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceSatisfy.kt rename to src/main/kotlin/com/cognifide/gradle/aem/instance/satisfy/InstanceSatisfy.kt index f83f3489c..b4574feba 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceSatisfy.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/satisfy/InstanceSatisfy.kt @@ -1,14 +1,12 @@ -package com.cognifide.gradle.aem.instance.tasks +package com.cognifide.gradle.aem.instance.satisfy -import com.cognifide.gradle.aem.common.AemTask -import com.cognifide.gradle.aem.common.Patterns -import com.cognifide.gradle.aem.common.ProgressIndicator +import com.cognifide.gradle.aem.AemTask +import com.cognifide.gradle.aem.common.build.ProgressIndicator import com.cognifide.gradle.aem.common.file.resolver.FileGroup -import com.cognifide.gradle.aem.instance.Instance -import com.cognifide.gradle.aem.instance.names -import com.cognifide.gradle.aem.instance.service.pkg.PackageState -import com.cognifide.gradle.aem.pkg.resolver.PackageGroup -import com.cognifide.gradle.aem.pkg.resolver.PackageResolver +import com.cognifide.gradle.aem.common.instance.Instance +import com.cognifide.gradle.aem.common.instance.names +import com.cognifide.gradle.aem.common.instance.service.pkg.PackageState +import com.cognifide.gradle.aem.common.utils.Patterns import com.cognifide.gradle.aem.pkg.tasks.PackageDeploy import com.fasterxml.jackson.annotation.JsonIgnore import java.io.File diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/resolver/PackageGroup.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/satisfy/PackageGroup.kt similarity index 86% rename from src/main/kotlin/com/cognifide/gradle/aem/pkg/resolver/PackageGroup.kt rename to src/main/kotlin/com/cognifide/gradle/aem/instance/satisfy/PackageGroup.kt index 75a167ae2..f6d69c6b6 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/resolver/PackageGroup.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/satisfy/PackageGroup.kt @@ -1,8 +1,8 @@ -package com.cognifide.gradle.aem.pkg.resolver +package com.cognifide.gradle.aem.instance.satisfy import com.cognifide.gradle.aem.common.file.resolver.FileGroup import com.cognifide.gradle.aem.common.file.resolver.FileResolution -import com.cognifide.gradle.aem.instance.InstanceSync +import com.cognifide.gradle.aem.common.instance.InstanceSync import java.io.File import org.gradle.api.tasks.Input @@ -35,7 +35,7 @@ class PackageGroup(val resolver: PackageResolver, name: String) : FileGroup(reso * Hook after deploying all packages to all instances called only when * at least one package was deployed on any instance. */ - var completer: () -> Unit = { aem.actions.await() } + var completer: () -> Unit = { aem.instanceActions.await() } override fun createResolution(id: String, resolver: (FileResolution) -> File): FileResolution { return PackageResolution(this, id, resolver) diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/resolver/PackageResolution.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/satisfy/PackageResolution.kt similarity index 91% rename from src/main/kotlin/com/cognifide/gradle/aem/pkg/resolver/PackageResolution.kt rename to src/main/kotlin/com/cognifide/gradle/aem/instance/satisfy/PackageResolution.kt index 3800a94bc..38027e8c9 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/resolver/PackageResolution.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/satisfy/PackageResolution.kt @@ -1,9 +1,9 @@ -package com.cognifide.gradle.aem.pkg.resolver +package com.cognifide.gradle.aem.instance.satisfy import aQute.bnd.osgi.Jar import com.cognifide.gradle.aem.common.file.resolver.FileResolution -import com.cognifide.gradle.aem.instance.service.osgi.Bundle -import com.cognifide.gradle.aem.pkg.PackageException +import com.cognifide.gradle.aem.common.instance.service.osgi.Bundle +import com.cognifide.gradle.aem.common.pkg.PackageException import java.io.File import org.apache.commons.io.FilenameUtils diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/resolver/PackageResolver.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/satisfy/PackageResolver.kt similarity index 83% rename from src/main/kotlin/com/cognifide/gradle/aem/pkg/resolver/PackageResolver.kt rename to src/main/kotlin/com/cognifide/gradle/aem/instance/satisfy/PackageResolver.kt index 3f7a02267..fafc61501 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/resolver/PackageResolver.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/satisfy/PackageResolver.kt @@ -1,9 +1,9 @@ -package com.cognifide.gradle.aem.pkg.resolver +package com.cognifide.gradle.aem.instance.satisfy import aQute.bnd.osgi.Jar -import com.cognifide.gradle.aem.common.AemExtension +import com.cognifide.gradle.aem.AemExtension import com.cognifide.gradle.aem.common.file.resolver.Resolver -import com.cognifide.gradle.aem.pkg.PackageDefinition +import com.cognifide.gradle.aem.common.pkg.PackageDefinition import java.io.File import org.gradle.api.tasks.Input import org.gradle.api.tasks.Internal diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/InstanceAnalyzer.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/InstanceAnalyzer.kt index d4f118866..b6ecf54b3 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/InstanceAnalyzer.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/InstanceAnalyzer.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.instance.tail -import com.cognifide.gradle.aem.instance.Instance +import com.cognifide.gradle.aem.common.instance.Instance import kotlinx.coroutines.* import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.channels.ReceiveChannel diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceTail.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/InstanceTail.kt similarity index 89% rename from src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceTail.kt rename to src/main/kotlin/com/cognifide/gradle/aem/instance/tail/InstanceTail.kt index 284b4a053..55656ce55 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceTail.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/InstanceTail.kt @@ -1,7 +1,6 @@ -package com.cognifide.gradle.aem.instance.tasks +package com.cognifide.gradle.aem.instance.tail import com.cognifide.gradle.aem.common.tasks.InstanceTask -import com.cognifide.gradle.aem.instance.tail.InstanceTailer import kotlinx.coroutines.ObsoleteCoroutinesApi import org.gradle.api.tasks.Internal import org.gradle.api.tasks.TaskAction diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/InstanceTailer.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/InstanceTailer.kt index 9a601d51f..03ab18ab9 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/InstanceTailer.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/InstanceTailer.kt @@ -1,9 +1,9 @@ package com.cognifide.gradle.aem.instance.tail -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.AemTask -import com.cognifide.gradle.aem.common.Formats -import com.cognifide.gradle.aem.instance.Instance +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.AemTask +import com.cognifide.gradle.aem.common.instance.Instance +import com.cognifide.gradle.aem.common.utils.Formats import com.cognifide.gradle.aem.instance.tail.io.FileDestination import com.cognifide.gradle.aem.instance.tail.io.LogFiles import com.cognifide.gradle.aem.instance.tail.io.UrlSource @@ -113,7 +113,7 @@ class InstanceTailer(val aem: AemExtension) { private fun checkStartLock() { if (logFiles.isLocked()) { - throw TailException("Another instance of log tailer is running for this project.") + throw InstanceTailerException("Another instance of log tailer is running for this project.") } logFiles.lock() } diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/InstanceTailerException.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/InstanceTailerException.kt new file mode 100644 index 000000000..3a57b25cd --- /dev/null +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/InstanceTailerException.kt @@ -0,0 +1,5 @@ +package com.cognifide.gradle.aem.instance.tail + +import com.cognifide.gradle.aem.AemException + +class InstanceTailerException(message: String) : AemException(message) \ No newline at end of file diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/Log.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/Log.kt index e901cfc38..67cfd8b1f 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/Log.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/Log.kt @@ -1,7 +1,7 @@ package com.cognifide.gradle.aem.instance.tail -import com.cognifide.gradle.aem.common.Formats -import com.cognifide.gradle.aem.instance.Instance +import com.cognifide.gradle.aem.common.instance.Instance +import com.cognifide.gradle.aem.common.utils.Formats import java.time.LocalDateTime import java.time.ZoneId import java.time.format.DateTimeFormatter @@ -53,14 +53,14 @@ class Log( fun create(logLines: List): Log { if (logLines.isEmpty() || logLines.first().isBlank()) { - throw TailException("Passed log entry is empty!") + throw InstanceTailerException("Passed log entry is empty!") } val fullLog = logLines.joinToString("\n") val result = matchLogLine(logLines.first()) when (result) { - null -> throw TailException("Passed text is not a log entry\nPattern:\n$LOG_PATTERN\nText:\n${logLines.first()}") + null -> throw InstanceTailerException("Passed text is not a log entry\nPattern:\n$LOG_PATTERN\nText:\n${logLines.first()}") else -> { val (timestamp, level, source, message) = result.destructured val followingMessageLines = logLines.slice(1 until logLines.size) @@ -73,7 +73,7 @@ class Log( fun parseTimestamp(timestamp: String): LocalDateTime { return LocalDateTime.parse(timestamp, DATE_TIME_FORMATTER) - ?: throw TailException("Invalid timestamp in log:\n$timestamp\n required format: $DATE_TIME_FORMAT") + ?: throw InstanceTailerException("Invalid timestamp in log:\n$timestamp\n required format: $DATE_TIME_FORMAT") } private fun matchLogLine(text: String) = LOG_PATTERN.toRegex().matchEntire(text) diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/LogChunk.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/LogChunk.kt index a57706f93..d4f6194cc 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/LogChunk.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/LogChunk.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.instance.tail -import com.cognifide.gradle.aem.instance.Instance +import com.cognifide.gradle.aem.common.instance.Instance class LogChunk(val instance: Instance, val logs: List) { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/LogFilter.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/LogFilter.kt index 48c247d20..d5264bb3f 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/LogFilter.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/LogFilter.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.instance.tail -import com.cognifide.gradle.aem.common.Patterns +import com.cognifide.gradle.aem.common.utils.Patterns import java.io.File /** diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/LogNotifier.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/LogNotifier.kt index c1b0cd60e..cd1d4032e 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/LogNotifier.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/LogNotifier.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.instance.tail -import com.cognifide.gradle.aem.common.NotifierFacade +import com.cognifide.gradle.aem.common.notifier.NotifierFacade import com.cognifide.gradle.aem.instance.tail.io.LogFiles import java.net.URI import kotlinx.coroutines.GlobalScope diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/TailException.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/TailException.kt deleted file mode 100644 index c3b2ce1ec..000000000 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/TailException.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.cognifide.gradle.aem.instance.tail - -import com.cognifide.gradle.aem.common.AemException - -class TailException(message: String) : AemException(message) \ No newline at end of file diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/io/LogFiles.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/io/LogFiles.kt index 12f3f6bdb..13088447a 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/io/LogFiles.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/io/LogFiles.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.instance.tail.io -import com.cognifide.gradle.aem.common.Formats +import com.cognifide.gradle.aem.common.utils.Formats import com.cognifide.gradle.aem.instance.tail.InstanceTailer import java.io.BufferedWriter import java.io.File diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/io/UrlSource.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/io/UrlSource.kt index facad8642..723bcd06f 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/io/UrlSource.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tail/io/UrlSource.kt @@ -1,7 +1,7 @@ package com.cognifide.gradle.aem.instance.tail.io import com.cognifide.gradle.aem.common.http.RequestException -import com.cognifide.gradle.aem.instance.Instance +import com.cognifide.gradle.aem.common.instance.Instance import com.cognifide.gradle.aem.instance.tail.InstanceTailer import com.cognifide.gradle.aem.instance.tail.LogSource import java.io.BufferedReader diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceAwait.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceAwait.kt index 999bc56c4..205f4f146 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceAwait.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceAwait.kt @@ -1,7 +1,7 @@ package com.cognifide.gradle.aem.instance.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask -import com.cognifide.gradle.aem.instance.action.AwaitAction +import com.cognifide.gradle.aem.AemDefaultTask +import com.cognifide.gradle.aem.common.instance.action.AwaitAction import org.gradle.api.tasks.TaskAction open class InstanceAwait : AemDefaultTask() { @@ -18,7 +18,7 @@ open class InstanceAwait : AemDefaultTask() { @TaskAction fun await() { - aem.actions.await(options) + aem.instanceActions.await(options) } companion object { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceBackup.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceBackup.kt index e30832896..fec7e2b4e 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceBackup.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceBackup.kt @@ -1,9 +1,9 @@ package com.cognifide.gradle.aem.instance.tasks -import com.cognifide.gradle.aem.common.Formats +import com.cognifide.gradle.aem.common.instance.InstanceException +import com.cognifide.gradle.aem.common.instance.names import com.cognifide.gradle.aem.common.tasks.ZipTask -import com.cognifide.gradle.aem.instance.InstanceException -import com.cognifide.gradle.aem.instance.names +import com.cognifide.gradle.aem.common.utils.Formats import java.io.File import org.gradle.api.execution.TaskExecutionGraph import org.gradle.api.file.DuplicatesStrategy diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceCollect.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceCollect.kt index 5a61d97b9..4c9029d8b 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceCollect.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceCollect.kt @@ -1,6 +1,7 @@ package com.cognifide.gradle.aem.instance.tasks import com.cognifide.gradle.aem.common.tasks.ZipTask +import com.cognifide.gradle.aem.instance.satisfy.InstanceSatisfy import com.cognifide.gradle.aem.pkg.PackagePlugin import com.cognifide.gradle.aem.pkg.tasks.PackageCompose import java.io.File diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceCreate.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceCreate.kt index a0c426e9a..e36c53758 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceCreate.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceCreate.kt @@ -1,13 +1,13 @@ package com.cognifide.gradle.aem.instance.tasks -import com.cognifide.gradle.aem.common.Formats import com.cognifide.gradle.aem.common.file.FileOperations -import com.cognifide.gradle.aem.common.onEachApply +import com.cognifide.gradle.aem.common.instance.InstanceException +import com.cognifide.gradle.aem.common.instance.LocalInstance +import com.cognifide.gradle.aem.common.instance.LocalInstanceOptions +import com.cognifide.gradle.aem.common.instance.names import com.cognifide.gradle.aem.common.tasks.LocalInstanceTask -import com.cognifide.gradle.aem.instance.InstanceException -import com.cognifide.gradle.aem.instance.LocalInstance -import com.cognifide.gradle.aem.instance.LocalInstanceOptions -import com.cognifide.gradle.aem.instance.names +import com.cognifide.gradle.aem.common.utils.Formats +import com.cognifide.gradle.aem.common.utils.onEachApply import java.io.File import org.gradle.api.tasks.TaskAction diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceDestroy.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceDestroy.kt index 01cc17a48..3d8250d42 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceDestroy.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceDestroy.kt @@ -1,8 +1,8 @@ package com.cognifide.gradle.aem.instance.tasks -import com.cognifide.gradle.aem.common.onEachApply +import com.cognifide.gradle.aem.common.instance.names import com.cognifide.gradle.aem.common.tasks.LocalInstanceTask -import com.cognifide.gradle.aem.instance.names +import com.cognifide.gradle.aem.common.utils.onEachApply import org.gradle.api.execution.TaskExecutionGraph import org.gradle.api.tasks.TaskAction diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceDown.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceDown.kt index d895b812e..4437b865e 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceDown.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceDown.kt @@ -1,8 +1,8 @@ package com.cognifide.gradle.aem.instance.tasks +import com.cognifide.gradle.aem.common.instance.action.ShutdownAction +import com.cognifide.gradle.aem.common.instance.names import com.cognifide.gradle.aem.common.tasks.LocalInstanceTask -import com.cognifide.gradle.aem.instance.action.ShutdownAction -import com.cognifide.gradle.aem.instance.names import org.gradle.api.tasks.TaskAction open class InstanceDown : LocalInstanceTask() { @@ -22,7 +22,7 @@ open class InstanceDown : LocalInstanceTask() { @TaskAction fun down() { - aem.actions.shutdown { + aem.instanceActions.shutdown { instances = this@InstanceDown.instances shutdownOptions() } diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceReload.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceReload.kt index ce748e43f..0d044c634 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceReload.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceReload.kt @@ -1,8 +1,8 @@ package com.cognifide.gradle.aem.instance.tasks +import com.cognifide.gradle.aem.common.instance.action.ReloadAction +import com.cognifide.gradle.aem.common.instance.names import com.cognifide.gradle.aem.common.tasks.InstanceTask -import com.cognifide.gradle.aem.instance.action.ReloadAction -import com.cognifide.gradle.aem.instance.names import org.gradle.api.tasks.TaskAction open class InstanceReload : InstanceTask() { @@ -19,7 +19,7 @@ open class InstanceReload : InstanceTask() { @TaskAction fun reload() { - aem.actions.reload { + aem.instanceActions.reload { instances = this@InstanceReload.instances options() } diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceResetup.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceResetup.kt index ba8feac83..6590bcfa8 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceResetup.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceResetup.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.instance.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask open class InstanceResetup : AemDefaultTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceRestart.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceRestart.kt index 77031f840..e17292259 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceRestart.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceRestart.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.instance.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask open class InstanceRestart : AemDefaultTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceSetup.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceSetup.kt index e890ce242..83f665948 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceSetup.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceSetup.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.instance.tasks -import com.cognifide.gradle.aem.common.AemDefaultTask +import com.cognifide.gradle.aem.AemDefaultTask open class InstanceSetup : AemDefaultTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceUp.kt b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceUp.kt index b7629c050..b6f411ca9 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceUp.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/instance/tasks/InstanceUp.kt @@ -1,9 +1,9 @@ package com.cognifide.gradle.aem.instance.tasks +import com.cognifide.gradle.aem.common.instance.LocalInstance +import com.cognifide.gradle.aem.common.instance.action.AwaitAction +import com.cognifide.gradle.aem.common.instance.names import com.cognifide.gradle.aem.common.tasks.LocalInstanceTask -import com.cognifide.gradle.aem.instance.LocalInstance -import com.cognifide.gradle.aem.instance.action.AwaitAction -import com.cognifide.gradle.aem.instance.names import org.gradle.api.tasks.TaskAction open class InstanceUp : LocalInstanceTask() { @@ -34,7 +34,7 @@ open class InstanceUp : LocalInstanceTask() { fun up() { aem.parallel.with(instances) { up() } - aem.actions.await { + aem.instanceActions.await { instances = this@InstanceUp.instances awaitOptions() } diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/PackagePlugin.kt b/src/main/kotlin/com/cognifide/gradle/aem/pkg/PackagePlugin.kt index a790c6bbe..7c9a91ee1 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/PackagePlugin.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/pkg/PackagePlugin.kt @@ -1,11 +1,11 @@ package com.cognifide.gradle.aem.pkg -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.AemPlugin +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.AemPlugin import com.cognifide.gradle.aem.common.CommonPlugin import com.cognifide.gradle.aem.instance.InstancePlugin +import com.cognifide.gradle.aem.instance.satisfy.InstanceSatisfy import com.cognifide.gradle.aem.instance.tasks.InstanceCreate -import com.cognifide.gradle.aem.instance.tasks.InstanceSatisfy import com.cognifide.gradle.aem.instance.tasks.InstanceUp import com.cognifide.gradle.aem.pkg.tasks.* import org.gradle.api.Project diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageActivate.kt b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageActivate.kt index 19cf73b3c..e095d870d 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageActivate.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageActivate.kt @@ -1,8 +1,8 @@ package com.cognifide.gradle.aem.pkg.tasks -import com.cognifide.gradle.aem.common.fileNames +import com.cognifide.gradle.aem.common.instance.names import com.cognifide.gradle.aem.common.tasks.PackageTask -import com.cognifide.gradle.aem.instance.names +import com.cognifide.gradle.aem.common.utils.fileNames import org.gradle.api.tasks.TaskAction open class PackageActivate : PackageTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageCompose.kt b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageCompose.kt index 634afacf1..37d7388ff 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageCompose.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageCompose.kt @@ -1,16 +1,20 @@ package com.cognifide.gradle.aem.pkg.tasks +import com.cognifide.gradle.aem.AemException +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.AemTask import com.cognifide.gradle.aem.bundle.BundleJar import com.cognifide.gradle.aem.bundle.BundlePlugin -import com.cognifide.gradle.aem.common.* +import com.cognifide.gradle.aem.common.build.DependencyOptions import com.cognifide.gradle.aem.common.file.FileOperations +import com.cognifide.gradle.aem.common.instance.service.pkg.Package +import com.cognifide.gradle.aem.common.pkg.PackageFileFilter +import com.cognifide.gradle.aem.common.pkg.vlt.VltDefinition +import com.cognifide.gradle.aem.common.pkg.vlt.VltFilter import com.cognifide.gradle.aem.common.tasks.ZipTask -import com.cognifide.gradle.aem.instance.service.pkg.Package -import com.cognifide.gradle.aem.pkg.PackageFileFilter +import com.cognifide.gradle.aem.common.utils.Patterns import com.cognifide.gradle.aem.pkg.PackagePlugin import com.cognifide.gradle.aem.pkg.tasks.compose.ProjectOptions -import com.cognifide.gradle.aem.pkg.vlt.VltDefinition -import com.cognifide.gradle.aem.pkg.vlt.VltFilter import com.fasterxml.jackson.annotation.JsonIgnore import java.io.File import java.util.regex.Pattern @@ -107,7 +111,7 @@ open class PackageCompose : ZipTask() { get() = File(vaultDir, Package.VLT_NODETYPES_FILE) @Nested - val fileFilter = PackageFileFilter(project) + val fileFilter = PackageFileFilter(aem) fun fileFilter(configurer: PackageFileFilter.() -> Unit) { fileFilter.apply(configurer) diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageDelete.kt b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageDelete.kt index e77cccaa6..213131157 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageDelete.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageDelete.kt @@ -1,8 +1,8 @@ package com.cognifide.gradle.aem.pkg.tasks -import com.cognifide.gradle.aem.common.fileNames +import com.cognifide.gradle.aem.common.instance.names import com.cognifide.gradle.aem.common.tasks.PackageTask -import com.cognifide.gradle.aem.instance.names +import com.cognifide.gradle.aem.common.utils.fileNames import org.gradle.api.execution.TaskExecutionGraph import org.gradle.api.tasks.TaskAction diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageDeploy.kt b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageDeploy.kt index 9f0f11502..530ccb9b2 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageDeploy.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageDeploy.kt @@ -1,10 +1,10 @@ package com.cognifide.gradle.aem.pkg.tasks -import com.cognifide.gradle.aem.common.fileNames +import com.cognifide.gradle.aem.common.instance.InstanceSync +import com.cognifide.gradle.aem.common.instance.action.AwaitAction +import com.cognifide.gradle.aem.common.instance.names import com.cognifide.gradle.aem.common.tasks.PackageTask -import com.cognifide.gradle.aem.instance.InstanceSync -import com.cognifide.gradle.aem.instance.action.AwaitAction -import com.cognifide.gradle.aem.instance.names +import com.cognifide.gradle.aem.common.utils.fileNames import com.fasterxml.jackson.annotation.JsonIgnore import org.gradle.api.tasks.Input import org.gradle.api.tasks.Internal @@ -86,7 +86,7 @@ open class PackageDeploy : PackageTask() { fun await() { if (awaited) { - aem.actions.await { + aem.instanceActions.await { instances = this@PackageDeploy.instances awaitOptions() } diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageInstall.kt b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageInstall.kt index 07c3c2787..c61b4841a 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageInstall.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageInstall.kt @@ -1,8 +1,8 @@ package com.cognifide.gradle.aem.pkg.tasks -import com.cognifide.gradle.aem.common.fileNames +import com.cognifide.gradle.aem.common.instance.names import com.cognifide.gradle.aem.common.tasks.PackageTask -import com.cognifide.gradle.aem.instance.names +import com.cognifide.gradle.aem.common.utils.fileNames import org.gradle.api.tasks.TaskAction open class PackageInstall : PackageTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackagePurge.kt b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackagePurge.kt index 793f6a918..8be759891 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackagePurge.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackagePurge.kt @@ -1,10 +1,10 @@ package com.cognifide.gradle.aem.pkg.tasks -import com.cognifide.gradle.aem.common.fileNames +import com.cognifide.gradle.aem.common.instance.InstanceException +import com.cognifide.gradle.aem.common.instance.InstanceSync +import com.cognifide.gradle.aem.common.instance.names import com.cognifide.gradle.aem.common.tasks.PackageTask -import com.cognifide.gradle.aem.instance.InstanceException -import com.cognifide.gradle.aem.instance.InstanceSync -import com.cognifide.gradle.aem.instance.names +import com.cognifide.gradle.aem.common.utils.fileNames import org.gradle.api.execution.TaskExecutionGraph import org.gradle.api.tasks.TaskAction diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageUninstall.kt b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageUninstall.kt index 930679a04..7eb9093fe 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageUninstall.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageUninstall.kt @@ -1,8 +1,8 @@ package com.cognifide.gradle.aem.pkg.tasks -import com.cognifide.gradle.aem.common.fileNames +import com.cognifide.gradle.aem.common.instance.names import com.cognifide.gradle.aem.common.tasks.PackageTask -import com.cognifide.gradle.aem.instance.names +import com.cognifide.gradle.aem.common.utils.fileNames import org.gradle.api.execution.TaskExecutionGraph import org.gradle.api.tasks.TaskAction diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageUpload.kt b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageUpload.kt index 86a0e53e9..121633b0e 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageUpload.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/PackageUpload.kt @@ -1,8 +1,8 @@ package com.cognifide.gradle.aem.pkg.tasks -import com.cognifide.gradle.aem.common.fileNames +import com.cognifide.gradle.aem.common.instance.names import com.cognifide.gradle.aem.common.tasks.PackageTask -import com.cognifide.gradle.aem.instance.names +import com.cognifide.gradle.aem.common.utils.fileNames import org.gradle.api.tasks.TaskAction open class PackageUpload : PackageTask() { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/compose/ProjectOptions.kt b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/compose/ProjectOptions.kt index b51e03e1d..99718dca6 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/compose/ProjectOptions.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/pkg/tasks/compose/ProjectOptions.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.pkg.tasks.compose -import com.cognifide.gradle.aem.common.AemExtension +import com.cognifide.gradle.aem.AemExtension import com.cognifide.gradle.aem.pkg.tasks.PackageCompose import org.gradle.api.tasks.bundling.Jar diff --git a/src/main/kotlin/com/cognifide/gradle/aem/tooling/ToolingPlugin.kt b/src/main/kotlin/com/cognifide/gradle/aem/tooling/ToolingPlugin.kt index c2287587b..5dda1d5b7 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/tooling/ToolingPlugin.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/tooling/ToolingPlugin.kt @@ -1,11 +1,11 @@ package com.cognifide.gradle.aem.tooling -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.common.AemPlugin +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.AemPlugin import com.cognifide.gradle.aem.common.CommonPlugin -import com.cognifide.gradle.aem.tooling.rcp.tasks.Rcp -import com.cognifide.gradle.aem.tooling.sync.tasks.Sync -import com.cognifide.gradle.aem.tooling.vlt.tasks.Vlt +import com.cognifide.gradle.aem.tooling.rcp.Rcp +import com.cognifide.gradle.aem.tooling.sync.Sync +import com.cognifide.gradle.aem.tooling.vlt.Vlt import org.gradle.api.Project import org.gradle.language.base.plugins.LifecycleBasePlugin diff --git a/src/main/kotlin/com/cognifide/gradle/aem/tooling/rcp/tasks/Rcp.kt b/src/main/kotlin/com/cognifide/gradle/aem/tooling/rcp/Rcp.kt similarity index 93% rename from src/main/kotlin/com/cognifide/gradle/aem/tooling/rcp/tasks/Rcp.kt rename to src/main/kotlin/com/cognifide/gradle/aem/tooling/rcp/Rcp.kt index fad286393..1afab2d8e 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/tooling/rcp/tasks/Rcp.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/tooling/rcp/Rcp.kt @@ -1,9 +1,8 @@ -package com.cognifide.gradle.aem.tooling.rcp.tasks +package com.cognifide.gradle.aem.tooling.rcp -import com.cognifide.gradle.aem.instance.Instance -import com.cognifide.gradle.aem.tooling.rcp.RcpClient +import com.cognifide.gradle.aem.common.instance.Instance +import com.cognifide.gradle.aem.tooling.vlt.Vlt import com.cognifide.gradle.aem.tooling.vlt.VltException -import com.cognifide.gradle.aem.tooling.vlt.tasks.Vlt import java.io.File import org.gradle.api.tasks.Internal import org.gradle.api.tasks.TaskAction diff --git a/src/main/kotlin/com/cognifide/gradle/aem/tooling/rcp/RcpClient.kt b/src/main/kotlin/com/cognifide/gradle/aem/tooling/rcp/RcpClient.kt index 18e898bce..8ff0e80fb 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/tooling/rcp/RcpClient.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/tooling/rcp/RcpClient.kt @@ -1,7 +1,7 @@ package com.cognifide.gradle.aem.tooling.rcp -import com.cognifide.gradle.aem.common.Formats -import com.cognifide.gradle.aem.instance.Instance +import com.cognifide.gradle.aem.common.instance.Instance +import com.cognifide.gradle.aem.common.utils.Formats import com.cognifide.gradle.aem.tooling.vlt.VltRunner import org.apache.commons.lang3.time.StopWatch diff --git a/src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/Cleaner.kt b/src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/Cleaner.kt index 3640566c0..6d3654db5 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/Cleaner.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/Cleaner.kt @@ -1,7 +1,7 @@ package com.cognifide.gradle.aem.tooling.sync -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.instance.service.pkg.Package +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.instance.service.pkg.Package import com.cognifide.gradle.aem.tooling.vlt.VltException import java.io.File import java.io.IOException @@ -10,15 +10,9 @@ import org.apache.commons.io.FileUtils import org.apache.commons.io.filefilter.EmptyFileFilter import org.apache.commons.lang3.CharEncoding import org.apache.commons.lang3.StringUtils -import org.gradle.api.Project -import org.gradle.api.tasks.Input -import org.gradle.api.tasks.Internal import org.gradle.api.tasks.util.PatternFilterable -class Cleaner(project: Project) { - - @Internal - private val aem = AemExtension.of(project) +class Cleaner(private val aem: AemExtension) { /** * Allows to control which files under each root root should be cleaned. @@ -31,7 +25,6 @@ class Cleaner(project: Project) { * Determines which files will be deleted within running cleaning * (e.g after checking out JCR content). */ - @Input var filesDeleted: PatternFilterable.() -> Unit = { include(listOf( "**/.vlt", @@ -44,7 +37,6 @@ class Cleaner(project: Project) { * Determines which files will be flattened * (e.g /_cq_dialog/.content.xml will be replaced by _cq_dialog.xml). */ - @Input var filesFlattened: PatternFilterable.() -> Unit = { include(listOf( "**/_cq_dialog/.content.xml", @@ -58,7 +50,6 @@ class Cleaner(project: Project) { * After special delimiter '!' there could be specified one or many path patterns * (ANT style, delimited with ',') in which property shouldn't be removed. */ - @Input var propertiesSkipped: List = listOf( pathRule("jcr:uuid", listOf("**/home/users/*", "**/home/groups/*")), "jcr:lastModified*", @@ -75,7 +66,6 @@ class Cleaner(project: Project) { /** * Mixin types that will be skipped when pulling JCR content from AEM instance. */ - @Input var mixinTypesSkipped: List = listOf( "cq:ReplicationStatus", "mix:versionable" @@ -84,20 +74,17 @@ class Cleaner(project: Project) { /** * Controls unused namespaces skipping. */ - @Input var namespacesSkipped: Boolean = aem.props.boolean("sync.cleaner.namespacesSkipped") ?: true /** * Controls backups for parent nodes of filter roots for keeping them untouched. */ - @Input var parentsBackupEnabled: Boolean = aem.props.boolean("sync.cleaner.parentsBackup") ?: true /** * File suffix being added to parent node back up files. * Customize it only if really needed to resolve conflict with file being checked out. */ - @Internal var parentsBackupSuffix = ".bak" private val parentsBackupDirIndicator @@ -106,13 +93,11 @@ class Cleaner(project: Project) { /** * Hook for customizing particular line processing for '.content.xml' files. */ - @Internal var lineProcess: (File, String) -> String = { file, line -> normalizeLine(file, line) } /** * Hook for additional all lines processing for '.content.xml' files. */ - @Internal var contentProcess: (File, List) -> List = { file, lines -> normalizeContent(file, lines) } fun prepare(root: File) { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/CleanerRule.kt b/src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/CleanerRule.kt index 4acb3cca4..09fe6840f 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/CleanerRule.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/CleanerRule.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.tooling.sync -import com.cognifide.gradle.aem.common.Patterns +import com.cognifide.gradle.aem.common.utils.Patterns import com.cognifide.gradle.aem.tooling.vlt.VltException import java.io.File diff --git a/src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/Downloader.kt b/src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/Downloader.kt index 411329696..f582c4a25 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/Downloader.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/Downloader.kt @@ -1,10 +1,10 @@ package com.cognifide.gradle.aem.tooling.sync -import com.cognifide.gradle.aem.common.AemExtension +import com.cognifide.gradle.aem.AemExtension import com.cognifide.gradle.aem.common.http.HttpClient -import com.cognifide.gradle.aem.instance.Instance -import com.cognifide.gradle.aem.instance.service.pkg.Package -import com.cognifide.gradle.aem.pkg.vlt.VltFilter +import com.cognifide.gradle.aem.common.instance.Instance +import com.cognifide.gradle.aem.common.instance.service.pkg.Package +import com.cognifide.gradle.aem.common.pkg.vlt.VltFilter import java.io.File import org.gradle.api.tasks.Internal diff --git a/src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/tasks/Sync.kt b/src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/Sync.kt similarity index 90% rename from src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/tasks/Sync.kt rename to src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/Sync.kt index 8c2c5da25..afefa950d 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/tasks/Sync.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/tooling/sync/Sync.kt @@ -1,11 +1,9 @@ -package com.cognifide.gradle.aem.tooling.sync.tasks - -import com.cognifide.gradle.aem.common.AemDefaultTask -import com.cognifide.gradle.aem.common.AemException -import com.cognifide.gradle.aem.common.Formats -import com.cognifide.gradle.aem.common.Patterns -import com.cognifide.gradle.aem.tooling.sync.Cleaner -import com.cognifide.gradle.aem.tooling.sync.Downloader +package com.cognifide.gradle.aem.tooling.sync + +import com.cognifide.gradle.aem.AemDefaultTask +import com.cognifide.gradle.aem.AemException +import com.cognifide.gradle.aem.common.utils.Formats +import com.cognifide.gradle.aem.common.utils.Patterns import com.cognifide.gradle.aem.tooling.vlt.VltRunner import java.io.File import java.util.regex.Pattern @@ -18,13 +16,15 @@ open class Sync : AemDefaultTask() { * Determines what need to be done (content copied and clean or something else). */ @Internal - var mode = Mode.of(aem.props.string("sync.mode") ?: Mode.COPY_AND_CLEAN.name) + var mode = Mode.of(aem.props.string("sync.mode") + ?: Mode.COPY_AND_CLEAN.name) /** * Determines a method of getting JCR content from remote instance. */ @Internal - var transfer = Transfer.of(aem.props.string("sync.transfer") ?: Transfer.PACKAGE_DOWNLOAD.name) + var transfer = Transfer.of(aem.props.string("sync.transfer") + ?: Transfer.PACKAGE_DOWNLOAD.name) /** * Source instance from which JCR content will be copied. @@ -54,18 +54,21 @@ open class Sync : AemDefaultTask() { return filter.rootDirs(contentDir).map { normalizeRoot(it) }.distinct() } + @Internal val vlt = VltRunner(aem) fun vlt(options: VltRunner.() -> Unit) { vlt.apply(options) } - val cleaner = Cleaner(project) + @Internal + val cleaner = Cleaner(aem) fun cleaner(options: Cleaner.() -> Unit) { cleaner.apply(options) } + @Internal val downloader = Downloader(aem) fun downloader(options: Downloader.() -> Unit) { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/tooling/vlt/tasks/Vlt.kt b/src/main/kotlin/com/cognifide/gradle/aem/tooling/vlt/Vlt.kt similarity index 77% rename from src/main/kotlin/com/cognifide/gradle/aem/tooling/vlt/tasks/Vlt.kt rename to src/main/kotlin/com/cognifide/gradle/aem/tooling/vlt/Vlt.kt index 2aaa74f83..028ea9eba 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/tooling/vlt/tasks/Vlt.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/tooling/vlt/Vlt.kt @@ -1,7 +1,6 @@ -package com.cognifide.gradle.aem.tooling.vlt.tasks +package com.cognifide.gradle.aem.tooling.vlt -import com.cognifide.gradle.aem.common.AemDefaultTask -import com.cognifide.gradle.aem.tooling.vlt.VltRunner +import com.cognifide.gradle.aem.AemDefaultTask import org.gradle.api.tasks.Internal import org.gradle.api.tasks.TaskAction diff --git a/src/main/kotlin/com/cognifide/gradle/aem/tooling/vlt/VltException.kt b/src/main/kotlin/com/cognifide/gradle/aem/tooling/vlt/VltException.kt index 102cc71ac..2738577f1 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/tooling/vlt/VltException.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/tooling/vlt/VltException.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.tooling.vlt -import com.cognifide.gradle.aem.common.AemException +import com.cognifide.gradle.aem.AemException class VltException : AemException { diff --git a/src/main/kotlin/com/cognifide/gradle/aem/tooling/vlt/VltRunner.kt b/src/main/kotlin/com/cognifide/gradle/aem/tooling/vlt/VltRunner.kt index ceab4018a..ec092aeff 100644 --- a/src/main/kotlin/com/cognifide/gradle/aem/tooling/vlt/VltRunner.kt +++ b/src/main/kotlin/com/cognifide/gradle/aem/tooling/vlt/VltRunner.kt @@ -1,7 +1,7 @@ package com.cognifide.gradle.aem.tooling.vlt -import com.cognifide.gradle.aem.common.AemExtension -import com.cognifide.gradle.aem.instance.service.pkg.Package +import com.cognifide.gradle.aem.AemExtension +import com.cognifide.gradle.aem.common.instance.service.pkg.Package import java.io.File class VltRunner(val aem: AemExtension) { diff --git a/src/test/kotlin/com/cognifide/gradle/aem/test/HtmlResponseBuilderTest.kt b/src/test/kotlin/com/cognifide/gradle/aem/test/HtmlResponseBuilderTest.kt index da1e09605..97e82042c 100644 --- a/src/test/kotlin/com/cognifide/gradle/aem/test/HtmlResponseBuilderTest.kt +++ b/src/test/kotlin/com/cognifide/gradle/aem/test/HtmlResponseBuilderTest.kt @@ -1,8 +1,8 @@ package com.cognifide.gradle.aem.test -import com.cognifide.gradle.aem.pkg.DeleteResponse -import com.cognifide.gradle.aem.pkg.HtmlResponse -import com.cognifide.gradle.aem.pkg.InstallResponse +import com.cognifide.gradle.aem.common.instance.service.pkg.DeleteResponse +import com.cognifide.gradle.aem.common.instance.service.pkg.HtmlResponse +import com.cognifide.gradle.aem.common.instance.service.pkg.InstallResponse import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/com/cognifide/gradle/aem/test/TailerTest.kt b/src/test/kotlin/com/cognifide/gradle/aem/test/TailerTest.kt index 2868afb8c..743c12f6d 100644 --- a/src/test/kotlin/com/cognifide/gradle/aem/test/TailerTest.kt +++ b/src/test/kotlin/com/cognifide/gradle/aem/test/TailerTest.kt @@ -1,6 +1,6 @@ package com.cognifide.gradle.aem.test -import com.cognifide.gradle.aem.common.Patterns +import com.cognifide.gradle.aem.common.utils.Patterns import com.cognifide.gradle.aem.instance.tail.* import org.apache.commons.io.FileUtils import org.gradle.util.GFileUtils