Downloading a source distribution
The codebase is no longer maintained. Please contact Henrik Bærbak if you are interested in source code.
Building the source distribution
The Net4care framework is based upon Java and (Apache Felix) OSGi. To build, you need to have Apache Maven installed to build Net4Care.
Be sure that your Maven version is 3.x or later (We have experienced that some Linuxes by default install Maven 2.x that fail to compile the code.)
Unzip the distribution in some suitable directory, change working directory to the root directory, and, using Maven, execute the following in a shell:
mvn install
This will build, run tests, and install (in the local Maven repository), the Net4Care bundles and support for creating new projects.
The distribution has been tested on Windows 7, Ubuntu 12 LTS (desktop and server edition), and Mac OS X.
Using Eclipse
If you want to experiment and develop using Eclipse, you can create Eclipse project files for the project using
mvn eclipse:eclipse
This has been tested on Eclipse Indigo, Juno, and Kepler. As each bundle is a separate Eclipse project, we recommend using the "Working set" feature to group these projects.
If things gets messed up, you can try removing the project files with 'mvn eclipse:clean' and then generate them again.
The actual importing into Eclipse that we have successfully applied is like this:
- Generate the Eclipse project and classpath files using 'mvn eclipse:eclipse'.
- Make a Eclipse working set, for instance named Net4Care
- Right-click it and select Import; in the menu, select General and subitem 'Existing Projects into Workspace'. Hit 'Next'.
- In the dialog, select your Net4Care core directory, which is named 'n4c_osgi'. Click 'Browse' and select all the projects that appear in the menu. Click 'Finish'.
- Add the classpath variable 'M2_REPO'. Under Eclipse general preferences, browse through 'Java', 'Build Path', and 'Classpath Variables'. Next, click on 'New' and type 'M2_REPO' in the field 'Name', and write the path to your local Maven repository (e.g. ~/.m2/repository or %USERPROFILE%\.m2\repository) in the field 'Path'. Finish with 'OK'.
Now you have all the core development code with the right build paths and dependencies.
For the examples, we recommend repeating this procedure for every example (HelloWorld, Spirometry, etc.) and import them into their own, separate, working sets.
If your eclipse gets confused and you run into (typically: build path) problems but the command line 'mvn clean install' works out OK, then try
mvn eclipse:clean eclipse:eclipse
and then 'refresh' your working set from within eclipse. This should reestablish all build paths properly.
Moving on
First, read the Hello, World! tutorial to view and execute a simple example of using the Net4Care framework for uploading and querying simple tele observations.
Next, move on with the Learning Net4Care tutorial and associated tutorials under the "Application Development" menu.
Finally, the "Framework Development" and "Documentation" menu have links to more detailed information.