gwt-maven-plugin - исключение LifecycleExecutionException - PullRequest
1 голос
/ 07 марта 2012

Я создал проект GWT Maven.

Когда я пытаюсь запустить проект на hudson, я получаю ошибку :

[INFO] o.h.m.e.h.MavenExecutionResultHandler - [1] org.apache.maven.lifecycle.LifecycleExecutionException: не удалось выполнить цель org.codehaus.mojo: gwt-maven-plugin: 2.2.0: ресурсы (по умолчанию) в проекте spg2010-core: выполнение по умолчанию цели org.codehaus.mojo: gwt-maven-plugin: 2.2.0: сбой ресурсов: строка Индекс вне диапазона: -1 [DEBUG] Закрытие соединения с удаленным [ERROR] Не удалось выполнить цель org.codehaus.mojo: gwt-maven-plugin: 2.2.0: ресурсы (по умолчанию) включены Проект spg2010-core: выполнение по умолчанию цели org.codehaus.mojo: gwt-maven-plugin: 2.2.0: сбой ресурсов: строка индекс вне диапазона: -1 -> [Помощь 1]

Проект работает нормально при выполнении на localhost.

Мое ПОМ:

<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>spg2010</artifactId>
    <groupId>pl.lexisnexis</groupId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <artifactId>spg2010-core</artifactId>
  <packaging>war</packaging>
  <name>spg2010-core</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <vaadin.version>6.7.3</vaadin.version>
    <gwt.version>2.3.0</gwt.version>
    <gwt.plugin.version>2.2.0</gwt.plugin.version>
    <widget.dest.path>${project.build.directory}/${project.build.finalName}/VAADIN/widgetsets</widget.dest.path>
  </properties>

  <build>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <version>${gwt.plugin.version}</version>
        <configuration>
          <webappDirectory>${widget.dest.path}</webappDirectory>
          <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
          <runTarget>clean</runTarget>
          <hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
          <noServer>true</noServer>
          <port>8080</port>
          <soyc>false</soyc>
          <compileReport>false</compileReport>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>resources</goal>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-dev</artifactId>
            <version>${gwt.version}</version>
          </dependency>
          <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
            <version>${gwt.version}</version>
          </dependency>
        </dependencies>
      </plugin>

      <plugin>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-maven-plugin</artifactId>
        <version>1.0.2</version>
        <executions>
          <execution>
            <configuration>
            </configuration>
            <goals>
              <goal>update-widgetset</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>${widget.dest.path}</directory>
            </fileset>
          </filesets>
        </configuration>
      </plugin>

    </plugins>

    <pluginManagement>
        <plugins>
            <!--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>com.vaadin</groupId>
                                    <artifactId>
                                        vaadin-maven-plugin
                                    </artifactId>
                                    <versionRange>
                                        [1.0.2,)
                                    </versionRange>
                                    <goals>
                                        <goal>update-widgetset</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.codehaus.mojo</groupId>
                                    <artifactId>
                                        gwt-maven-plugin
                                    </artifactId>
                                    <versionRange>
                                        [2.2.0,)
                                    </versionRange>
                                    <goals>
                                        <goal>resources</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.codehaus.mojo</groupId>
                                    <artifactId>
                                        properties-maven-plugin
                                    </artifactId>
                                    <versionRange>
                                        [1.0-alpha-2,)
                                    </versionRange>
                                    <goals>
                                        <goal>
                                            read-project-properties
                                        </goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
  </build>

  <repositories>
    <repository>
      <id>vaadin-snapshots</id>
      <url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>vaadin-addons</id>
      <url>http://maven.vaadin.com/vaadin-addons</url>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>codehaus-snapshots</id>
      <url>http://nexus.codehaus.org/snapshots</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases>
    </pluginRepository>
    <pluginRepository>
      <id>vaadin-snapshots</id>
      <url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases>
    </pluginRepository>
  </pluginRepositories>

  <dependencies>

  <!-- ALL REQUUIRED DEPS -->

    <dependency>
      <groupId>postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <version>9.1-901.jdbc4</version>
    </dependency>

    <dependency>
      <groupId>wi</groupId>
      <artifactId>wi</artifactId>
      <version>wi</version>
    </dependency>

    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>vaadin</artifactId>
      <version>${vaadin.version}</version>
    </dependency>

    <dependency>
      <groupId>org.vaadin.addons</groupId>
      <artifactId>contextmenu</artifactId>
      <version>3.1.0</version>
    </dependency>

    <dependency>
      <groupId>org.vaadin.addons</groupId>
      <artifactId>widget-rpc</artifactId>
      <version>1.1.5</version>
    </dependency>

    <dependency>
      <groupId>org.vaadin.addons</groupId>
      <artifactId>flexibleoptiongroup</artifactId>
      <version>1.0.0</version>
    </dependency>

    <dependency>
      <groupId>org.vaadin.addons</groupId>
      <artifactId>dashlayout</artifactId>
      <version>0.1.6</version>
    </dependency>

    <dependency>
      <groupId>org.vaadin.addons</groupId>
      <artifactId>lazyloadwrapper</artifactId>
      <version>1.0.2</version>
    </dependency>

    <dependency>
      <groupId>org.vaadin.addons</groupId>
      <artifactId>popupbutton</artifactId>
      <version>1.2.1</version>
    </dependency>

    <dependency>
      <groupId>org.vaadin.addons</groupId>
      <artifactId>refresher</artifactId>
      <version>1.1.1</version>
    </dependency>

    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-servlet</artifactId>
      <version>2.2.0</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-dev</artifactId>
      <version>${gwt.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
      <version>${gwt.version}</version>
    </dependency>
    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>validation-api</artifactId>
      <version>1.0.0.GA</version>
    </dependency>
    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>validation-api</artifactId>
      <version>1.0.0.GA</version>
      <classifier>sources</classifier>
    </dependency>


  </dependencies>

  <profiles>

    <profile>
      <id>widgetset-eclipse</id>
      <properties>
        <widget.dest.path>src/main/webapp/VAADIN/widgetsets</widget.dest.path>
      </properties>
    </profile>

    <profile>
      <id>widgetset-external</id>
      <properties>
        <widget.dest.path>${project.build.directory}/${project.build.finalName}/VAADIN/widgetsets</widget.dest.path>
      </properties>
    </profile>

    <profile>
      <id>local-windows</id>

      <build>
        <plugins>

          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <phase>process-resources</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <delete file="${project.build.outputDirectory}/application.properties"/>
                    <copy file="conf/application-local-windows.properties"
                          tofile="${project.build.outputDirectory}/application.properties"/>

                    <delete file="${project.build.outputDirectory}/log4j.properties"/>
                    <copy file="conf/log4j-local.properties"
                          tofile="${project.build.outputDirectory}/log4j.properties"/>
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.3</version>
            <configuration>
              <descriptorRefs>
                <descriptorRef>jar-with-dependencies</descriptorRef>
              </descriptorRefs>
            </configuration>
          </plugin>

        </plugins>
      </build>

    </profile>

    <profile>
      <id>local-linux</id>

      <build>
        <plugins>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <phase>process-resources</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <delete file="${project.build.outputDirectory}/application.properties"/>
                    <copy file="conf/application-local-linux.properties"
                          tofile="${project.build.outputDirectory}/application.properties"/>

                    <delete file="${project.build.outputDirectory}/log4j.properties"/>
                    <copy file="conf/log4j-local.properties"
                          tofile="${project.build.outputDirectory}/log4j.properties"/>
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>

    </profile>

    <profile>
      <id>devel</id>

      <build>
        <plugins>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <phase>process-resources</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <delete file="${project.build.outputDirectory}/application.properties"/>
                    <copy file="conf/application-devel.properties"
                          tofile="${project.build.outputDirectory}/application.properties"/>

                    <delete file="${project.build.outputDirectory}/log4j.properties"/>
                    <copy file="conf/log4j-devel.properties"
                          tofile="${project.build.outputDirectory}/log4j.properties"/>
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>

    </profile>

    <profile>
      <id>production</id>

      <build>
        <plugins>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <phase>process-resources</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <delete file="${project.build.outputDirectory}/application.properties"/>
                    <copy file="conf/application-production.properties"
                          tofile="${project.build.outputDirectory}/application.properties"/>

                    <delete file="${project.build.outputDirectory}/log4j.properties"/>
                    <copy file="conf/log4j-production.properties"
                          tofile="${project.build.outputDirectory}/log4j.properties"/>
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>

    </profile>

  </profiles>

</project>

Любая помощь очень ценится.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...