minesweeper/pom.xml
branchteavm
changeset 91 c20135305ad2
parent 81 0d274f085dac
child 92 8697860c6af0
     1.1 --- a/minesweeper/pom.xml	Tue Feb 11 16:53:26 2014 +0100
     1.2 +++ b/minesweeper/pom.xml	Tue Mar 04 09:28:20 2014 +0100
     1.3 @@ -297,7 +297,72 @@
     1.4                    </plugin>
     1.5                </plugins>
     1.6            </build>
     1.7 -          
     1.8 +      </profile>
     1.9 +      <profile>
    1.10 +          <id>teabrwsr</id>
    1.11 +          <build>
    1.12 +              <plugins>
    1.13 +                  <plugin>
    1.14 +                      <groupId>org.teavm</groupId>
    1.15 +                      <artifactId>teavm-maven-plugin</artifactId>
    1.16 +                      <version>0.0.1-SNAPSHOT</version>
    1.17 +                      <dependencies>
    1.18 +                          <dependency>
    1.19 +                              <groupId>org.teavm</groupId>
    1.20 +                              <artifactId>teavm-classlib</artifactId>
    1.21 +                              <version>0.0.1-SNAPSHOT</version>
    1.22 +                          </dependency>
    1.23 +                          <!-- This module adds html4j support. It mainly includes JavaScriptBuilder support.
    1.24 +                          Also there are some little patches to JCL emulation, that are required to pass TCK -->
    1.25 +                          <dependency>
    1.26 +                              <groupId>org.teavm</groupId>
    1.27 +                              <artifactId>teavm-html4j</artifactId>
    1.28 +                              <version>0.0.1-SNAPSHOT</version>
    1.29 +                          </dependency>
    1.30 +                      </dependencies>
    1.31 +                      <executions>
    1.32 +                          <execution>
    1.33 +                              <id>generate-minesweeper</id>
    1.34 +                              <goals>
    1.35 +                                  <goal>build-javascript</goal>
    1.36 +                              </goals>
    1.37 +                              <phase>process-classes</phase>
    1.38 +                              <configuration>
    1.39 +                                  <!-- Whether we want TeaVM to minify (obfuscate) the generated JavaScript -->
    1.40 +                                  <minifying>false</minifying>
    1.41 +                                  <mainClass>org.apidesign.demo.minesweeper.MinesModel</mainClass>
    1.42 +                                  <!-- Don't include main page - we created it by ourselves -->
    1.43 +                                  <mainPageIncluded>false</mainPageIncluded>
    1.44 +                                  <targetDirectory>${project.build.directory}/teavm</targetDirectory>
    1.45 +                                  <!-- This transformer adds null checks before virtual calls. It is not included
    1.46 +                                  by default as we don't always need these null checks -->
    1.47 +                                  <transformers>
    1.48 +                                      <param>org.teavm.javascript.NullPointerExceptionTransformer</param>
    1.49 +                                  </transformers>
    1.50 +                              </configuration>
    1.51 +                          </execution>
    1.52 +                      </executions>
    1.53 +                  </plugin>
    1.54 +                  <plugin>
    1.55 +                      <artifactId>maven-assembly-plugin</artifactId>
    1.56 +                      <version>2.4</version>
    1.57 +                      <executions>
    1.58 +                          <execution>
    1.59 +                              <id>distro-assembly</id>
    1.60 +                              <phase>package</phase>
    1.61 +                              <goals>
    1.62 +                                  <goal>single</goal>
    1.63 +                              </goals>
    1.64 +                              <configuration>
    1.65 +                                  <descriptors>
    1.66 +                                      <descriptor>src/main/assembly/teabrwsr.xml</descriptor>
    1.67 +                                  </descriptors>
    1.68 +                              </configuration>
    1.69 +                          </execution>
    1.70 +                      </executions>                
    1.71 +                  </plugin>      
    1.72 +              </plugins>
    1.73 +          </build>
    1.74        </profile>
    1.75    </profiles>  
    1.76  </project>