Short introduction:
My task is to create a multi-module project (for which I chosen Maven) with modules for JavaME and Android. More specifically: I'm creating application for phones and my boss obliged me to make a project with shared common code (BTW: I think he puts too much pressure on sharing code between JavaME and Android - these two being based on Java language doesn't mean that sharing code between them is easy).
Problem:
I have three modules:
- common - this is written against JavaSE 1.1 so it doesn't need emulator to test it and also JavaME would be able to use that module,
- jme - this is written against JavaME 2,
- android - this is (yet to be) written against Android,
I want to have three different loggers, one for each module, which share common interface and maybe the logger for common module could be a base (class) for the two other loggers. The common classes should use the same logger that the module that incorporates them or a third version of logger for purposes of compiling and testing that common module separately.
Question:
How to configure Maven so that it would include different versions of logger class when compiling & testing different modules? Or maybe you have different proposals?
Update:
Right now I have my own logger for JavaME which uses RecordStore to store logs and has easy way to retrieve a specified continuous range of logs, convert them to JSON, HTML and text and then send them in batch by email. Additionally it periodically removes old records from RecordStore. I would want to keep such functionality, ie. easy way to retrieve and transform log records.