gwt 프로젝트를 maven으로 변환하는 Im. 우리는 출력 할 디렉토리로 '전쟁'을 사용합니다. 이것은 좋은 생각입니까?GWT 및 maven : 정적 파일이 삭제 중임
이 디렉토리에는 CSS, HTML 및 자바 스크립트 파일도 있습니다.
이제 프로젝트를 실행하면 eclipse에서 html, js 등이 사라집니다. 파일을 다시 저장하면 방금 다시 삭제됩니다. 기본적으로 js, image, css 파일을 리소스가 아닌 정적 파일로 만들 수 있도록 프로젝트를 설정하려면 어떻게해야합니까? 프로젝트를 실행할 때 제거되지 않지만 여전히 우리가 사용할 수 있도록해야합니다. gwt 응용 프로그램, 실행할 때?
여기 내 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>com.magick.app</groupId>
<artifactId>com.magick.app</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>magick.app</name>
<description>Magick.App</description>
<build>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>war\WEB-INF\web.xml</webXml>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<!-- <version>2.5.0</version> 2.1.0-1 -->
<version>${gwt.version}</version>
<configuration>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>generateAsync</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>
gwt-maven-plugin
</artifactId>
<versionRange>
[2.4.0,)
</versionRange>
<goals>
<goal>i18n</goal>
<goal>generateAsync</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.google.gwt.inject</groupId>
<artifactId>gin</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-servlet</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwt.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-gwt-client</artifactId>
<version>1.0.8</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-gwt-server</artifactId>
<version>1.0.8</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>com.github.gwtbootstrap</groupId>
<artifactId>gwt-bootstrap</artifactId>
<version>2.2.1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.danvk</groupId>
<artifactId>dygraphs-gwt</artifactId>
<version>2011.04.18</version>
</dependency>
<!-- <dependency> <groupId>com.gwtplatform</groupId> <artifactId>gwtp-all</artifactId>
<version>0.8-alpha-2</version> </dependency> -->
<!-- MVP component -->
<dependency>
<groupId>com.gwtplatform</groupId>
<artifactId>gwtp-mvp-client</artifactId>
<version>${gwtp.version}</version>
<scope>provided</scope>
</dependency>
<!-- Dispatch component -->
<dependency>
<groupId>com.gwtplatform</groupId>
<artifactId>gwtp-dispatch-client</artifactId>
<version>${gwtp.version}</version>
<scope>provided</scope> <!-- Remove for GWTP 0.5.1 and earlier -->
</dependency>
<dependency>
<groupId>com.gwtplatform</groupId>
<artifactId>gwtp-dispatch-server-guice</artifactId>
<!-- Or, if you use spring: <artifactId>gwtp-dispatch-server-spring</artifactId> -->
<!-- For GWTP 0.5.1 and earlier: <artifactId>gwtp-dispatch-server</artifactId> -->
<version>${gwtp.version}</version>
</dependency>
<!-- Crawler component -->
<!-- <dependency> <groupId>com.gwtplatform</groupId> <artifactId>gwtp-crawler</artifactId>
<version>${gwtp.version}</version> </dependency> -->
<!-- Annotation component -->
<dependency>
<groupId>com.gwtplatform</groupId>
<artifactId>gwtp-processors</artifactId>
<version>${gwtp.version}</version>
<scope>provided</scope>
</dependency>
<!-- Tester component -->
<!-- <dependency> <groupId>com.gwtplatform</groupId> <artifactId>gwtp-tester</artifactId>
<version>${gwtp.version}</version> <scope>test</scope> </dependency> -->
</dependencies>
<properties>
<gwtp.version>0.7</gwtp.version>
<gwt.version>2.4.0</gwt.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>sonatype</id>
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
- 그냥 GWT-받는다는 - 플러그인 최근에 2.5.0을 업데이트합니다. 오히려 이클립스와 관련된 이슈처럼 보인다. https://developers.google.com/eclipse/docs/faq#gwt_with_maven –
문제를 해결할 수 있었는지 여부에 관계없이 업데이트를 게시하십시오. 답변을 선택하거나 자신의 답변을 게시하여 해결되는 경우 질문을 종료하는 것이 좋습니다. – SSR