chess/pom.xml
branchteavm
changeset 105 ea79b73d590a
parent 60 f0ab62f65322
child 115 c9ea9ae71c2c
     1.1 --- a/chess/pom.xml	Mon Jan 13 10:28:37 2014 +0100
     1.2 +++ b/chess/pom.xml	Tue Mar 11 20:50:57 2014 +0100
     1.3 @@ -141,6 +141,11 @@
     1.4        <scope>provided</scope>
     1.5        <type>jar</type>
     1.6      </dependency>
     1.7 +    <dependency>
     1.8 +      <groupId>org.netbeans.html</groupId>
     1.9 +      <artifactId>ko4j</artifactId>
    1.10 +      <version>${net.java.html.version}</version>
    1.11 +    </dependency>
    1.12    </dependencies>
    1.13    <profiles>
    1.14        <profile>
    1.15 @@ -252,5 +257,78 @@
    1.16                </dependency>
    1.17            </dependencies>
    1.18        </profile>
    1.19 +      <profile>
    1.20 +          <id>teabrwsr</id>
    1.21 +          <build>
    1.22 +              <plugins>
    1.23 +                  <plugin>
    1.24 +                      <groupId>org.teavm</groupId>
    1.25 +                      <artifactId>teavm-maven-plugin</artifactId>
    1.26 +                      <version>0.0.1-SNAPSHOT</version>
    1.27 +                      <dependencies>
    1.28 +                          <dependency>
    1.29 +                              <groupId>org.teavm</groupId>
    1.30 +                              <artifactId>teavm-classlib</artifactId>
    1.31 +                              <version>0.0.1-SNAPSHOT</version>
    1.32 +                          </dependency>
    1.33 +                          <!-- This module adds html4j support. It mainly includes JavaScriptBuilder support.
    1.34 +                          Also there are some little patches to JCL emulation, that are required to pass TCK -->
    1.35 +                          <dependency>
    1.36 +                              <groupId>org.teavm</groupId>
    1.37 +                              <artifactId>teavm-html4j</artifactId>
    1.38 +                              <version>0.0.1-SNAPSHOT</version>
    1.39 +                          </dependency>
    1.40 +                      </dependencies>
    1.41 +                      <executions>
    1.42 +                          <execution>
    1.43 +                              <id>generate-minesweeper</id>
    1.44 +                              <goals>
    1.45 +                                  <goal>build-javascript</goal>
    1.46 +                              </goals>
    1.47 +                              <phase>process-classes</phase>
    1.48 +                              <configuration>
    1.49 +                                  <!-- Whether we want TeaVM to minify (obfuscate) the generated JavaScript -->
    1.50 +                                  <minifying>false</minifying>
    1.51 +                                  <properties>
    1.52 +                                      <!-- This classes (separated with , ; space) will be available through vm.loadClass() -->
    1.53 +                                      <html4j.entryPoints>org.apidesign.html.demo.chess.LoadMain</html4j.entryPoints>
    1.54 +                                  </properties>
    1.55 +                                  <!-- Don't include main page - we created it by ourselves -->
    1.56 +                                  <mainPageIncluded>false</mainPageIncluded>
    1.57 +                                  <!-- Merge runtime.js instead of putting as a separate file -->
    1.58 +                                  <runtime>MERGED</runtime>
    1.59 +                                  <!-- Name of the generated file -->
    1.60 +                                  <targetFileName>bck2brwsr.js</targetFileName>
    1.61 +                                  <targetDirectory>${project.build.directory}/teavm</targetDirectory>
    1.62 +                                  <!-- This transformer adds null checks before virtual calls. It is not included
    1.63 +                                  by default as we don't always need these null checks -->
    1.64 +                                  <transformers>
    1.65 +                                      <param>org.teavm.javascript.NullPointerExceptionTransformer</param>
    1.66 +                                  </transformers>
    1.67 +                              </configuration>
    1.68 +                          </execution>
    1.69 +                      </executions>
    1.70 +                  </plugin>
    1.71 +                  <plugin>
    1.72 +                      <artifactId>maven-assembly-plugin</artifactId>
    1.73 +                      <version>2.4</version>
    1.74 +                      <executions>
    1.75 +                          <execution>
    1.76 +                              <id>distro-assembly</id>
    1.77 +                              <phase>package</phase>
    1.78 +                              <goals>
    1.79 +                                  <goal>single</goal>
    1.80 +                              </goals>
    1.81 +                              <configuration>
    1.82 +                                  <descriptors>
    1.83 +                                      <descriptor>src/main/assembly/teabrwsr.xml</descriptor>
    1.84 +                                  </descriptors>
    1.85 +                              </configuration>
    1.86 +                          </execution>
    1.87 +                      </executions>                
    1.88 +                  </plugin>      
    1.89 +              </plugins>
    1.90 +          </build>
    1.91 +      </profile>
    1.92    </profiles>
    1.93  </project>