Search code examples
netbeansantnetbeans-platform

Creating two netbeans applications with some shared modules


So this is the situation. We're developing two applications based on the netbeans platform, let's call them X and Y.

Historically X was developed first, and then later Y. Y is based on X, and many of the modules are shared. We used to do this by basing X on the netbeans platform, and then install X as a platform itself and then base Y on X. So;

Netbeans platform -> X -> Y.

The X application will use a subset of the modules in the netbeans platform. And add many of it's own modules. The Y application will use most of the modules in X, but not all. And add some new modules.

So the Y application consists of most of the code in X and Y. And often we need to do changes in both. The problem is that time needed differs a lot, if we change code in Y we can just recompile. And that's often possible during debug even. If we change code in X, which is more common even, then we need to build X, zip it, and install as a platform, and rebuild Y. It probably takes 10x more time.

So the question is, can we have a flat hierarchy of a lot of modules, and then base the two applications X and Y on different subsets of the modules?

We're using netbeans 8.0.2, and the applications is ant-based.


Solution

  • I did it by making a suite of all modules that they have in common, and then add this suite to both applications with 'add project'.