【问题标题】:gwt with maven and bootstrap eclipse starter projectgwt 与 maven 和 bootstrap eclipse 启动项目
【发布时间】:2015-06-26 22:17:19
【问题描述】:

我在 Eclipse 中集成 maven 和 gwt 已经挣扎了几天。我正在网上搜索一些准备好导入的项目,但不幸的是一切都崩溃了这么久。

我是 gwt 的新手。我想学它。之前我在 sbt 中使用 maven、spring 和 playframework。

我没有使用过类似 ant 的构建工具。但我喜欢 gwt 和 eclipe 之间的集成(我可以在超级开发模式下单击运行)。

一个想法是我不喜欢在ant中,我必须手动下载jar并将它放在classpath中。如果maven能帮我做的话,我觉得没必要。

我也想使用这个库:gwtbootstrap3 我一个人无法处理。

你们中的某个人可以为我准备那个我可以导入的 eclipse 项目吗?

这是我最新的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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>pl.korbeldaniel.btsp</groupId>
<artifactId>btsp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>btsp</name>

<properties>
    <gwt.version>2.7.0</gwt.version>
    <gwtBootstrap3.version>0.9.1-SNAPSHOT</gwtBootstrap3.version>
    <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
    <dependency>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <version>${gwt.version}</version>
    </dependency>
</dependencies>

<build>
    <finalName>btsp</finalName>
    <plugins>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
            </configuration>
        </plugin>
    </plugins>
</build>

但我不能像原生 gwt 项目一样运行。

【问题讨论】:

    标签: eclipse maven gwt gwtbootstrap3


    【解决方案1】:

    是的,这绝对是可能的。您只需筛选大量文档即可弄清楚。

    1. 您需要 Google Plugin for eclipsem2e(Maven Integration for Eclipse)插件

    2. 完成后,右键单击 GWT 项目-> 配置 -> 转换为 Maven 项目。

    3. 现在,要使用 GwtBootstrap3,您只需在 pom.xml 中添加 GWT 和 gwtBootstrap3 作为依赖项即可。 (详情here)。

    如果您需要任何准备好导入 maven 项目,您可以从 github 克隆 GwtBootstrap3-demo 项目并将其作为 Web 应用程序运行。至于学习 GWT,tutorials 是你最好的选择(密切关注 UiBinder for GwtBootstrap3)。

    点击hereherehere了解有关设置的详细信息。

    【讨论】:

      猜你喜欢
      • 2012-06-03
      • 1970-01-01
      • 2012-10-15
      • 1970-01-01
      • 2011-01-20
      • 2011-11-16
      • 2011-05-09
      • 2016-02-16
      • 1970-01-01
      相关资源
      最近更新 更多