Java source modules

A Java source module contains java sources, as well as the corresponding unit tests and resources.

This type of module is typically build, tested and packaged into a .jar file.

Layout

SourceBuildPackageDescription
src/javabuild/ Contains the Java sources of the module. These sources are built to the build directory of a module's Karma build directory. The compiled .class files are packaged into the root of the .jar file prepended with their package.
src/resources-/ Contains resources to be used by the Java code in this module. The contents of this directory are copied 1-to-1 to the root of the .jar file, so that they end up in the classpath.

The resources are put on the classpath during the test step.
src/META-INF-/META-INF Files to be stored in the META-INF directory of the .jar file. These files are not used during the build or test step.
test/javatest- Contains the unit tests for the Java sources in this module. There is no limitation on the class name of the unit tests. All classes in this directory are supposed to be unit tests.

During the test step the compiled tests end up in the test directory of the module's Karma build directory.

The unit test classes are not packaged into the .jar file.
test/resources-- Contains resources used by the unit tests. The files in this directory are placed on the classpath when running the unit tests.
<module dependencies>-- Dependencies on source modules are used during building and testing. These dependencies are not packaged into the .jar file.
<jar dependencies>-- Dependencies on .jar files, either via a Maven-like dependency or via a library module dependency, are used when building and testing. They are not packaged into the module's .jar file.