gwt with maven and bootstrap eclipse starter project

302 views Asked by At

I struggle for a few days now with integrating maven and gwt in eclipse. I was searching web for some ready to import project, but unfortunatelly everything crashed so long.

I am new to gwt. I would like learn it. Earlier I was using maven, spring and playframework with sbt.

I haven't use ant like build tool. But I like it integration between gwt and eclipe (I can click run in super dev mode).

One think is that I do not like in ant, I have to manually download jar and put it in classpath. I think it is unnecessary if maven can do it for me.

I would like also to use this library: gwtbootstrap3 I can't handle this on my own.

Can someone of You prepare for me that eclipse project, that I could just import.

Here is my newest 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>

But I cant run in like native gwt project.

1

There are 1 answers

0
Rohit On BEST ANSWER

Yes, it's a definitely possible. You just have to sift through a ton of documentation to figure it out.

  1. You'll need Google Plugin for eclipse and the m2e (Maven Integration for Eclipse) plugin

  2. After you have those, right click on a GWT project-> configure -> convert to Maven Project.

  3. Now, to use GwtBootstrap3, all you need to do is add GWT and gwtBootstrap3 as dependencies in your pom. (Details here).

If you need any ready to import maven projects, you can clone GwtBootstrap3-demo project from github and run that as a web application. As for learning GWT, tutorials are your best option (Pay close attention to UiBinder for GwtBootstrap3).

click here, here and here for details about setting everything up.