There's a top default GWT-project. How can Maven make a WAR nick of it?



  • Good afternoon. There's an empty Maven-project with added support for GWT. If you start the app as an annex GWT, all right. So, a default page and a button is formed. But it makes me add pom.xml line:

    <packaging>war</packaging>
    

    - Nothing works. A blank html page with a mistake:

    Problem accessing /gwt2war.html. Reason: Not Found

    Mine. pom.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <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>ru.javastudy</groupId>
    <artifactId>gwt2war</artifactId>
    <packaging>war</packaging>
    <version>1.0-SNAPSHOT</version>

    <properties>
    <gwt.version>2.6.0</gwt.version>
    </properties>

    <dependencies>
    </dependencies>

    <build>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.6</version>
    </plugin>
    <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>gwt-maven-plugin</artifactId>
    <version>2.6.0</version>
    </plugin>
    </plugins>
    </build>

    Project structure:

    введите сюда описание изображения



  • Relocate all contents from the catalogue. /war Total /src/main/webapp You don't have it. Plus, you don't have dependence. gwt Section dependencies♪ She needs to be added.

    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
      <version>2.6.0</version>
    </dependency>
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2