Best way to implement a change to common extension code?
Hello all, I have already successfully implemented some advisors and participants; common, shared methods and constants are in their own com.aaa.extensions.common plugin project. I am now testing a new advisor, and have needed to add new constants and methods to the common code. All this works just fine when I test from a JETTY-launched v407 server.
I have upversioned the common project 1.0.1, made that version a dependency of the new advisor's project, specified version 1.0.1 of the common plugin in the new advisor's feature, and built the update site. I can see com.aaa.extensions.common_1.0.1.jar in the plugins folder (v502).
Having added the provision site and update site and restarted CCM in the normal manner, the Provision Status tells me that the new version of the common bundle won't load because the old version is already installed.
Is there a way to force loading of a specific version of a jar or am I obliged to rebuild, redeploy and retest all the update sites that use the common code? That would seem to discourage using common code in favour of deployment simplicity. Have I missed a trick somewhere along the line?
I'm bracing myself for disappointment :(
2 answers
Have you requested a server re-provisioning/server reset? See https://rsjazz.wordpress.com/2014/06/12/is-the-extension-deployed-how-can-i-redeploy/
Comments
I found what seems to be the right approach. I had used the extension workshop approach Ralph mentioned with features combining server and common components, and that was the problem.
I built a 6.0.6 development environment and reworked my code there; I created a provision profile and update site for the common code, and for all the other plugin projects I added the common plugin as a dependency as before but did not add the common plugin to their feature projects. I did not make the extensions' features require the common feature.
Request server reset, restart the server and the Provision Status shows all the bundles starting cleanly. All extensions tested successfully.
The final test, which I haven't had time for yet but am confident will work, is to amend and redeploy the common code and test the extensions again. Because the extensions' features don't specify the common plugin's version, I reckon this will work just fine.