We have recently published source code of midPoint book on GitHub:
Please note that, unlike midPoint, the book is not open source.
The finished book is published under the terms of Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License (CC BY-NC-ND). However, this license does not apply to book’s source code. No explicit license is granted for the book source code. The source code has been published mostly for reference. Public source code also makes it easier to submit contributions that do not interfere with the copyright, such as spelling corrections, minor wording improvements and formatting fixes. Such contributions are welcome, assuming the author is not claiming the copyright on any part of the book. Other (more substantial) contributions that interfere with the copyright might be acceptable. However, in such case, please contact Evolveum to settle the legal issue before making a contribution.
MidPoint is an open source software. The processes and implications of open source source software development are quite clear and well established. However, the methods of creating and maintaining products associated with open source software are not that clear. Literature describing open source products is often sold commercially, and provides a source of profit for authors. We are not looking for a commercial profit from the midPoint book. However, we are not yet sure how to handle all the legal details and implications. Once we make the book completely open, there is no way back. That is why we have decided to tread carefully and proceed in small steps.
In case you would like to translate the book to a different language, please contact us. We approve and allow translations of the book. However, we would like to make sure that the translated text is available to midPoint users under the same terms as the original book, therefore there is some paperwork to be done in such case.
If you have other idea what you would like to do with the book sources, something that the copyright does not allow, please contact us. We can surely agree on reasonable terms.