1.1 --- a/minesweeper/pom.xml Sun Mar 16 09:26:09 2014 +0100
1.2 +++ b/minesweeper/pom.xml Thu Mar 20 11:25:28 2014 +0100
1.3 @@ -293,7 +293,79 @@
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>${teavm.version}</version>
1.17 + <dependencies>
1.18 + <dependency>
1.19 + <groupId>org.teavm</groupId>
1.20 + <artifactId>teavm-classlib</artifactId>
1.21 + <version>${teavm.version}</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>${teavm.version}</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 + <properties>
1.42 + <!-- This classes (separated with , ; space) will be available through vm.loadClass() -->
1.43 + <html4j.entryPoints>org.apidesign.demo.minesweeper.MainBrwsr</html4j.entryPoints>
1.44 + </properties>
1.45 + <!-- Don't include main page - we created it by ourselves -->
1.46 + <mainPageIncluded>false</mainPageIncluded>
1.47 + <!-- Merge runtime.js instead of putting as a separate file -->
1.48 + <runtime>MERGED</runtime>
1.49 + <!-- Name of the generated file -->
1.50 + <targetFileName>bck2brwsr.js</targetFileName>
1.51 + <targetDirectory>${project.build.directory}/teavm</targetDirectory>
1.52 + <!-- This transformer adds null checks before virtual calls. It is not included
1.53 + by default as we don't always need these null checks -->
1.54 + <transformers>
1.55 + <param>org.teavm.javascript.NullPointerExceptionTransformer</param>
1.56 + </transformers>
1.57 + </configuration>
1.58 + </execution>
1.59 + </executions>
1.60 + </plugin>
1.61 + <plugin>
1.62 + <artifactId>maven-assembly-plugin</artifactId>
1.63 + <version>2.4</version>
1.64 + <executions>
1.65 + <execution>
1.66 + <id>distro-assembly</id>
1.67 + <phase>package</phase>
1.68 + <goals>
1.69 + <goal>single</goal>
1.70 + </goals>
1.71 + <configuration>
1.72 + <descriptors>
1.73 + <descriptor>src/main/assembly/teabrwsr.xml</descriptor>
1.74 + </descriptors>
1.75 + </configuration>
1.76 + </execution>
1.77 + </executions>
1.78 + </plugin>
1.79 + </plugins>
1.80 + </build>
1.81 </profile>
1.82 </profiles>
1.83 </project>