TWCable / cq-gradle-plugin

DEPRECATED: A number of plugins for making it easier to work with Gradle and Adobe CQ/AEM
Apache License 2.0
19 stars 6 forks source link

Uninstall configuration setting #33

Closed kdesineedi closed 8 years ago

kdesineedi commented 9 years ago

Hi Jim,

I am facing an issue using the plugin.For the first time installation,the content pages get loaded correctly but on subsequent builds,we are getting "class cannot be correctly instantiated" errors. We had to delete/uninstall all application-specific bundles and then run the build to make our pages load correctly.We believe this is because for every build the uninstall task is removing the previously installed bundles and causing issues due to the behavior described by the enhancement.(https://github.com/TWCable/cq-gradle-plugin/issues/3)

We are using 3.0.2 version of your plugin and also set unistallBundlesPredicate to true/false but there is no difference in terms of uninstall task.

Please provide inputs or pointers to avoid uninstalling the bundles for every build.

jdigger commented 9 years ago

FWIW, you misspelled "unistallBundlesPredicate" in your description, so if you copy & pasted it, that might be part of the problem. Also you mentioned setting it to "true/false", though it's a Closure that gets evaluated with the symbolic name of the bundle to determine if it should try to uninstall it. (See SlingOsgiBundle.uninstallAllBundles)

Have you tried simply disabling the task from running? (e.g., ./gradlew uninstall -x uninstallBundles)

kdesineedi commented 8 years ago

Hi Jim,

Sorry for putting it incorrectly here but below is the exact copy of the config am using:

slingServers.with { uninstallBundlesPredicate ={false} author.with { protocol = 'http' port = 4502 machineName = 'localhost' username = 'XXXX' password = 'XXXX' active = true } We are using a command like gradle clean install at the parent module so that we are trying to figure out how we can exclude uninstall for all the zip file(s).The above setting does not work to exclude the uninstall task.

jdigger commented 8 years ago

Have you tried simply disabling the task from running? (e.g., "./gradlew clean install -x uninstall" or "./gradlew uninstall -x uninstallBundles")

kdesineedi commented 8 years ago

Thanks Jim.It works now.I was trying :

gradle clean install -x uninstallBundles

against

gradle clean install -x uninstall

jdigger commented 8 years ago

FWIW, you can turn it off from your build.gradle file by setting the enabled property of the task to be false. e.g., uninstallBundles.enabled = false