Edit the pom.xml
file for this project. We will ensure that the dependencies are defined.
This web application depends on the OSGi core and compendium bundles:
<dependencies> <dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi.core</artifactId> <version>4.2.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi.compendium</artifactId> <version>4.2.0</version> </dependency>
Also, the JSP code will need the classes from the Servlet API, as well as those from the bookshelf-service
(for operation requests) and from the bookshelf-inventory-api
(for the Book
bean interface):
<dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> </dependency> <dependency> <groupId>com.packtpub.felix</groupId> <artifactId>com.packtpub.felix.bookshelf-service</artifactId> <version>1.10.0</version> </dependency> <dependency> <groupId>com.packtpub.felix</groupId> <artifactId> com.packtpub.felix.bookshelf-inventory-api</artifactId> <version>1.5.0</version> <optional>false</optional> </dependency>
There will be one more change to this file before it is ready; we'll come back to it. Let's move onto how the JSP integrates with the OSGi framework.