如何在 Karaf 中运行 Vaadin 7 应用程序? [英] How to run Vaadin 7 applications in Karaf?

查看:26
本文介绍了如何在 Karaf 中运行 Vaadin 7 应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找这个问题的答案,并进行了大量实验.我需要做什么才能在 Karaf 中使用 Vaadin Web 框架的第 7 版运行应用程序?

I have been looking for days now, with lots of experiments, for an answer to this question. What do I need to do to be able to run applications, using version 7 of Vaadin Web framework, inside Karaf?

有一些关于它的信息,但我读过的解决方案都没有奏效.我在 SO 上发现的唯一相关问题(如何将 Vaadin 7 与 OSGi 集成?) 没有真正有效的答案,至少对于我的问题.每次我遵循通过谷歌搜索找到的解决方案时,我总是会丢失很多依赖项,并且我发现自己无限期地搜索和安装包以满足所有导入.

There are some information about it but none of the solutions I read worked. The only related question I found on SO (How to integrate Vaadin 7 with OSGi?) does not really have an valid answer, at least for my question. Every time I follow a solution found by googling I always get lots of missing dependencies and I found myself indefinitely searching and installing bundles in order to satisfy all the imports.

这不可能那么难实现.有没有人可以给我一些指导或指出一个很好的来源来回答我的问题?

This cannot be so hard to achieve. Is there anyone that can give me some guidelines or indicate a good source with the answer to my question?

推荐答案

此方法会将 Vaadin 7.6.8 安装到您的 Karaf 2.4.3.

This method will install Vaadin 7.6.8 to your Karaf 2.4.3.

  1. 将以下文件保存在某处
  2. 打开 Karaf 外壳
  3. features:addurl file:///path/to/your/features.xml
  4. 功能:安装vaadin

这会将 Vaadin 作为一项功能安装到您的 Karaf 安装中.

This will install Vaadin as a feature to your Karaf installation.

features.xml

<?xml version="1.0" encoding="UTF-8"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.0.0 http://karaf.apache.org/xmlns/features/v1.0.0"
    name="vaadin">

    <feature install="true" name="vaadin" version="7.6.8">
        <feature>vaadin-common</feature>
        <bundle>mvn:com.vaadin/vaadin-themes/7.6.8</bundle>
        <bundle>mvn:com.vaadin/vaadin-server/7.6.8</bundle>
        <bundle>mvn:com.vaadin/vaadin-sass-compiler/0.9.13</bundle>
        <bundle>mvn:com.vaadin/vaadin-shared/7.6.8</bundle>
        <bundle>mvn:com.vaadin/vaadin-push/7.6.8</bundle>
        <bundle>mvn:com.vaadin/vaadin-client/7.6.8</bundle>
        <bundle>mvn:com.vaadin/vaadin-client-compiled/7.6.8</bundle>
    </feature>

    <feature name="vaadin-common" version="7.6.8">
        <bundle>mvn:com.vaadin.external.flute/flute/1.3.0.gg2</bundle>
        <bundle>mvn:com.vaadin.external.streamhtmlparser/streamhtmlparser-jsilver/0.0.10.vaadin1</bundle>
        <bundle>mvn:com.vaadin.external.google/guava/16.0.1.vaadin1</bundle>
        <bundle>mvn:com.vaadin.external.atmosphere/atmosphere-runtime/2.2.7.vaadin1</bundle>
        <bundle>mvn:com.vaadin.external.flute/flute/1.3.0.gg2</bundle>

        <bundle>mvn:org.jsoup/jsoup/1.8.3</bundle>
        <bundle>mvn:javax.portlet/portlet-api/2.0</bundle>
        <bundle>mvn:com.vaadin.external.slf4j/vaadin-slf4j-jdk14/1.6.1</bundle>
        <bundle>wrap:mvn:javax.validation/validation-api/1.0.0.GA$BundleSymbolicName=javax-validation-api&amp;Bundle-Version=1.0.0.GA</bundle>
        <bundle>wrap:mvn:com.google.appengine/appengine-api-1.0-sdk/1.7.7$BundleSymbolicName=com-google-appengine-api-1.0-sdk&amp;Bundle-Version=1.7.7</bundle>
        <bundle>wrap:mvn:com.liferay.portal/portal-service/6.0.2$Bundle-SymbolicName=com-liferay-portal-service&amp;Bundle-Version=6.0.2</bundle>
        <bundle>wrap:mvn:org.w3c.css/sac/1.3$Bundle-SymbolicName=org-w3c-css-sac&amp;Bundle-Version=1.3</bundle>
        <bundle>wrap:mvn:com.yahoo.platform.yui/yuicompressor/2.4.8$Bundle-SymbolicName=com-yahoo-platform-yui-compressor&amp;Bundle-Version=2.4.8</bundle>
    </feature>

</features>

这篇关于如何在 Karaf 中运行 Vaadin 7 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆