对于使用OSGI和GWT作为UI的Web应用程序,哪个是一个很好的架构?
目的是使用捆绑包来制作捆绑的Web界面部分.如果我添加新的捆绑包,它将在用户界面上添加新功能(例如菜单),这些功能与现有的功能相配合.
我正在尝试使用HttpService创建一个包,使用maven-bundle-plugin注册Servlet.
该项目的pom.xml是:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>felix-tutorial</groupId>
<artifactId>example-1</artifactId>
<version>1.0</version>
<packaging>bundle</packaging>
<name>Apache Felix Tutorial Example 1</name>
<description>Apache Felix Tutorial Example 1</description>
<!-- Build Configuration -->
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${pom.groupId}.${pom.artifactId}</Bundle-SymbolicName>
<Bundle-Name>Service listener example</Bundle-Name>
<Bundle-Description>A bundle that displays messages at startup and when service events occur</Bundle-Description>
<Bundle-Vendor>Apache Felix</Bundle-Vendor>
<Bundle-Version>1.0.0</Bundle-Version>
<Bundle-Activator>tutorial.example1.Activator</Bundle-Activator>
<Import-Package>org.osgi.framework;version="1.0.0", javax.servlet, javax.servlet.http</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
<!-- Dependecies Management -->
<dependencies>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.framework</artifactId>
<version>2.0.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId> …Run Code Online (Sandbox Code Playgroud)