Jars
A Jar file is Java Library. You can modularize your QWT application by splitting it into jars. This is useful to cope with complexity and to reuse common code for multiple applications.
Suppose you have an application with Java code under src/main/java. This Java code includes a package util which you want to move to a separate util.jar for reuse in other applications.
- Create a new directory
utilwhich is not under yourmyappdirectory. - Create a file util/pom.xml.
- Create a directory
src/main/javaand copy theutilpackage into it. - Run
mvn clean install.
Now change to your application directory and:
- remove the
utilpackage - add a dependency to
util.jarto the dependencies in your application pom file:<dependency> <groupId>mygroup</groupId> <artifactId>util</artifactId> <version>1.0.0</version> </dependency>
- run
mvn clean compileto build your application
Note that qooxdoo is just a jar for QWT, it's defined by this pom file, and applications refer to it with
<dependency>
<groupId>org.qooxdoo.toolkit</groupId>
<artifactId>qooxdoo</artifactId>
<version>${toolkit.version}</version>
</dependency>