The current version of the content package mane plugin there is not support for an installation of a package into Sling / Composum.
We at headwire.com forked the project and started to work on a basic version were we can just install a package (bundleStatusURL=-).
The plugin fails in the PackageInstaller.installFile() where the URL is appended with a CRX specific string "/.json?cmd=upload ". In addition the response is required to be JSon in a particular format.
Some minor changes to PageInstall, PackageManagerHelper and a new PackageManagerHtmlCall class does make the plain installation work.
I suggest to create a Factory that can provide an Package Client class based on the package url and that Package Client is then able to handle Composum, CRX or whatever comes down the road.
thanks, i've importet your branch into this branch and did some cosmetic changes to to to comply with our code style rules:
open points from my side:
there are two TODO tags - can you eliminate them?
there are some missing javadocs (see checkstyle warnings). additionally please replace the auto-generated javadocs "Created by schaefa on" on the new classes with some meaningful javadoc.
there is some code commented out left in the classes (PackageManagerHtmlCall, CrxPackageInstaller, PackageManagerHelper) - please remove it
some questsion on ComposumPackageInstaller
it seems packages are always uploaded and installed. in the maven plugin this is configured by the user if a install happens after upload or not. is this possible with the composum upload as well? when not a warning should be logged in case package install is disabled by configuration but is happening because composum cannot do it otherwise.
you should also respect the getDelayAfterInstallSec option for each package file as it is done in CrxPackageInstaller
does the constant CRX_PACKAGE_EXISTS_ERROR_MESSAGE_PREFIX is also corect for composum? in this case we should rename it to eliminate "CRX" from the package name.
It is important to set the “bundleStatusURL” to “-“ to avoid the bundle status tests as they will fail before the deployment.
why this? this should also work with sling launchpad/composum, web console is available there as well. perhaps you have just to adjust the url building handling. it is an important feature if you install a bunch of complex packages which contain bundles resulting in massive restarts of other bundles.
Thanks for the feedback.
1. I will go ahead and provide the requested asap.
2. I created a ticket with Composum to return feedback in JSon instead of HTML to make it easier to handle the response (https://github.com/ist-dresden/composum/issues/70)
3. Composum has more features under the hood that what I used so far but my understanding is quite limited for now. I'll have a look what Composum provides and how to use it.
4. Not sure why the bundleStatusURL does not work but the out-of-the-box configuration failed. Will check it out.
I committed the changes with the following changes:
1. Todo's eliminated
2. JavaDoc added
3. Removed commented out code except when their is a question or other ticket pending
4. Using Composum's Upload / Install service api which returns JSon and works closer to what is done in CRX
5. For now Composum is not handling 'force' correctly. I created a ticket and wait for their response.
6. Bundle Status (if bundle status URL) did not work as if was looking for the CRX Package Manager path. I included the handling of Composum paths. I have a question there I missed somthing there.
thanks, i did some code cleanup and merged it with develop.
please cross-check that still all works as expected.