Hi,
we plan to use the Development Module of the Repository Data to bootstrap test content both locally and on our test servers. We want to do this for consistent testing without having to resort to separate folders or other hacks.
We would build the project with dev data, send it to the test server, run automated and/or manual tests on it. Then we would like to deploy exactly the same build artefact to live. This is to ensure the build going live is exactly the build tested. Also, building things twice takes a lot longer.
From what i’ve read though, the idea would be to build the same thing again, but without development data. Is there a way to disable bootstrapping the development module without having to rebuild?
Thanks for your time and help.
There’s currently no option to blacklist specific modules from bootstrapping, no.
The bootstrapping mechanism relies on a scan of the classpath to find configuration to bootstrap, so in theory you could test with a war that doesn’t contain the development module. Your production system would get only this war. Then you deploy the development module separately to your test systems, either in an unpacked war WEB-INF/lib dir or the Tomcat shared classpath dir.
This concept of testing “the same thing that you deploy to production” is a bit slippery in this case, since you actually want a different bootstrap behavior on test vs production.
Of course, you still have to be careful not to do something naughty, like putting java classes in your development module, or moving critical configuration there. It’s a good idea to run some tests in a staging environment built using a backup of the production database. For some teams, it makes sense to run most of their automated integration tests in an environment like this, rather than testing against the data from the development module.
Your development data is contained in a jar file in the shared/lib directory of your distribution. You can remove this from your distribution.