用GWT编译插件替换Maven站点插件

用GWT编译插件替换Maven站点插件,gwt,maven-2,maven,maven-plugin,maven-site-plugin,Gwt,Maven 2,Maven,Maven Plugin,Maven Site Plugin,我已经成功地建立了一些项目,这些项目使用Maven自动将Maven生成的站点部署到git存储库的gh页面分支。GitHub然后在个人子域的公共URL上提供这些文件。我希望利用这个功能来服务于一个只支持富客户端的GWT应用程序 我已经修改了我的pom.xml,将GWT应用程序编译到target/site/目录。我仍在努力实现的两个主要目标是: 如何防止标准Maven站点插件在站点阶段运行 在site阶段执行gwt:compile需要什么 通过为插件指定新的执行,可以将目标绑定到某个阶段。我假设你

我已经成功地建立了一些项目,这些项目使用Maven自动将Maven生成的站点部署到git存储库的
gh页面
分支。GitHub然后在个人子域的公共URL上提供这些文件。我希望利用这个功能来服务于一个只支持富客户端的GWT应用程序

我已经修改了我的
pom.xml
,将GWT应用程序编译到
target/site/
目录。我仍在努力实现的两个主要目标是:

  • 如何防止标准Maven站点插件在
    站点
    阶段运行
  • site
    阶段执行
    gwt:compile
    需要什么

通过为插件指定新的执行,可以将目标绑定到某个阶段。我假设你有一些定制的东西,你需要使大部分的工作正确,所以我只想把重点放在什么应该工作,以绑定一个插件目标到一个特定的阶段

<plugin>
  <artifactId>gwt-maven-plugin</artifactId>
  ...
  <executions>
    <execution>
      <id>gwt-site</id>
      <phase>site</phase><!-- phase to bind to -->
      <goals>
        <goal>compile</goal><!-- goal to run in that phase -->
      </goals>
      <configuration>
        <!-- Your magic configuration stuff goes here -->
      </configuration>
    </execution>
    <!-- Possible other executions might be defined here -->
  </executions>
</plugin>

GWTMaven插件
...
gwt站点
网站
编译
阻止默认maven站点运行更有趣,因为这是一个阶段,有各种各样的目标。通过显式指定无目标的执行,可以防止标准站点:站点目标在站点阶段运行。从maven 2到maven 3,这可能会略有不同,所以我在这里会有点一般性。查看您的构建日志,查看当前在执行id、组/工件id方面指定了哪些内容,以纠正我的示例中可能出现的疏忽:

<plugin>
  <artifactId>maven-site-plugin</artifactId>
  ...
  <executions>
    <execution>
      <phase>site</phase>
      <goals></goals><!-- This is empty to indicate that no goals should be run in this phase -->
    </execution>
  </executions>
</plugin>

maven站点插件
...
网站

通过为插件指定新的执行,可以将目标绑定到某个阶段。我假设你有一些定制的东西,你需要使大部分的工作正确,所以我只想把重点放在什么应该工作,以绑定一个插件目标到一个特定的阶段

<plugin>
  <artifactId>gwt-maven-plugin</artifactId>
  ...
  <executions>
    <execution>
      <id>gwt-site</id>
      <phase>site</phase><!-- phase to bind to -->
      <goals>
        <goal>compile</goal><!-- goal to run in that phase -->
      </goals>
      <configuration>
        <!-- Your magic configuration stuff goes here -->
      </configuration>
    </execution>
    <!-- Possible other executions might be defined here -->
  </executions>
</plugin>

GWTMaven插件
...
gwt站点
网站
编译
阻止默认maven站点运行更有趣,因为这是一个阶段,有各种各样的目标。通过显式指定无目标的执行,可以防止标准站点:站点目标在站点阶段运行。从maven 2到maven 3,这可能会略有不同,所以我在这里会有点一般性。查看您的构建日志,查看当前在执行id、组/工件id方面指定了哪些内容,以纠正我的示例中可能出现的疏忽:

<plugin>
  <artifactId>maven-site-plugin</artifactId>
  ...
  <executions>
    <execution>
      <phase>site</phase>
      <goals></goals><!-- This is empty to indicate that no goals should be run in this phase -->
    </execution>
  </executions>
</plugin>

maven站点插件
...
网站

您成功地使其工作了吗?您成功地使其工作了吗?