chess/pom.xml
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Mon, 23 Feb 2015 10:34:39 +0100
branchteavm
changeset 233 908708015f61
parent 105 ea79b73d590a
child 243 64b15a1fb456
permissions -rw-r--r--
Simplifying execution of TeaVM version. Use: mvn -Pteabrwsr clean package bck2brwsr:brwsr
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     3   <modelVersion>4.0.0</modelVersion>
     4     <parent>
     5         <artifactId>demo</artifactId>
     6         <groupId>org.apidesign.html</groupId>
     7         <version>1.0-SNAPSHOT</version>
     8     </parent>
     9 
    10   <groupId>org.apidesign.html.demo</groupId>
    11   <artifactId>chessdemo</artifactId>
    12   <version>1.0-SNAPSHOT</version>
    13   <packaging>jar</packaging>
    14 
    15   <name>Chess_HTML_Java_Client</name>
    16 
    17   <repositories>
    18       <repository>
    19           <id>netbeans</id>
    20           <name>NetBeans</name>
    21           <url>http://bits.netbeans.org/maven2/</url>
    22       </repository>
    23   </repositories>
    24   <pluginRepositories>
    25       <pluginRepository>
    26           <id>ios</id>
    27           <name>NetBeans iOS Maven Plugin</name>
    28           <url>http://beetle.cz.oracle.com/~jtulach/maven/</url>
    29           <snapshots>
    30           </snapshots>
    31       </pluginRepository>
    32   </pluginRepositories>
    33 
    34   <properties>
    35     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    36     <netbeans.compile.on.save>none</netbeans.compile.on.save>
    37     <bck2brwsr.launcher.version>${bck2brwsr.version}</bck2brwsr.launcher.version>
    38     <bck2brwsr.obfuscationlevel>MINIMAL</bck2brwsr.obfuscationlevel>
    39     <brwsr.startpage>pages/index.html</brwsr.startpage>
    40   </properties>
    41   <build>
    42       <plugins>
    43           <plugin>
    44               <groupId>org.apache.maven.plugins</groupId>
    45               <artifactId>maven-compiler-plugin</artifactId>
    46               <version>2.3.2</version>
    47               <configuration>
    48                   <source>1.7</source>
    49                   <target>1.7</target>
    50               </configuration>
    51           </plugin>
    52           <plugin>
    53               <groupId>org.apache.maven.plugins</groupId>
    54               <artifactId>maven-jar-plugin</artifactId>
    55               <version>2.4</version>
    56               <configuration>
    57                   <archive>
    58                       <manifest>
    59                           <mainClass>org.netbeans.html.demo.chess.Main</mainClass>
    60                           <addClasspath>true</addClasspath>
    61                           <classpathPrefix>lib/</classpathPrefix>
    62                       </manifest>
    63                   </archive>
    64               </configuration>
    65           </plugin>
    66           <plugin>
    67               <groupId>org.codehaus.mojo</groupId>
    68               <artifactId>exec-maven-plugin</artifactId>
    69               <version>1.2.1</version>
    70               <configuration>
    71                   <systemProperties>
    72                       <systemProperty>
    73                           <key>browser.rootdir</key>
    74                           <value>${basedir}/src/main/webapp/</value>
    75                       </systemProperty>
    76                   </systemProperties>
    77                   <mainClass>org.netbeans.html.demo.chess.Main</mainClass>
    78               </configuration>
    79           </plugin>      
    80           <plugin>
    81               <artifactId>maven-assembly-plugin</artifactId>
    82               <version>2.4</version>
    83               <executions>
    84                   <execution>
    85                       <id>distro-assembly</id>
    86                       <phase>package</phase>
    87                       <goals>
    88                           <goal>single</goal>
    89                       </goals>
    90                       <configuration>
    91                           <descriptors>
    92                               <descriptor>src/main/assembly/html.java.net.xml</descriptor>
    93                           </descriptors>
    94                       </configuration>
    95                   </execution>
    96               </executions>                
    97           </plugin>
    98          <plugin>
    99             <artifactId>ios-maven-plugin</artifactId>
   100             <groupId>org.netbeans.ios</groupId>
   101             <version>0.4</version>
   102             <configuration>
   103                <targetDevices>1</targetDevices>
   104                <deploymentTarget>6.1</deploymentTarget>
   105                <bundleId>JavaOneChess</bundleId>
   106                <provisioningProfile></provisioningProfile>
   107                <supportedInterfaceOrientations>UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationPortrait,UIInterfaceOrientationLandscapeRight,UIInterfaceOrientationPortraitUpsideDown</supportedInterfaceOrientations>
   108                <prerenderedIcons>false</prerenderedIcons>
   109                <iPadSupportedInterfaceOrientations>UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationPortrait,UIInterfaceOrientationLandscapeRight,UIInterfaceOrientationPortraitUpsideDown</iPadSupportedInterfaceOrientations>
   110             </configuration>
   111          </plugin>
   112       </plugins>
   113   </build>
   114   <dependencies>
   115     <dependency>
   116         <groupId>org.netbeans.html</groupId>
   117         <artifactId>net.java.html.json</artifactId>
   118         <version>${net.java.html.version}</version>
   119     </dependency>
   120     <dependency>
   121         <groupId>org.netbeans.html</groupId>
   122         <artifactId>net.java.html.boot</artifactId>
   123         <version>${net.java.html.version}</version>
   124     </dependency>
   125     <dependency>
   126       <groupId>org.testng</groupId>
   127       <artifactId>testng</artifactId>
   128       <version>6.7</version>
   129       <scope>test</scope>
   130     </dependency>
   131     <dependency>
   132       <groupId>org.netbeans.html</groupId>
   133       <artifactId>net.java.html.sound</artifactId>
   134       <version>${net.java.html.version}</version>
   135       <type>jar</type>
   136     </dependency>
   137     <dependency>
   138       <groupId>org.apidesign.bck2brwsr</groupId>
   139       <artifactId>core</artifactId>
   140       <version>${bck2brwsr.version}</version>
   141       <scope>provided</scope>
   142       <type>jar</type>
   143     </dependency>
   144     <dependency>
   145       <groupId>org.netbeans.html</groupId>
   146       <artifactId>ko4j</artifactId>
   147       <version>${net.java.html.version}</version>
   148     </dependency>
   149   </dependencies>
   150   <profiles>
   151       <profile>
   152           <id>fxbrwsr</id>
   153           <activation>
   154               <activeByDefault>true</activeByDefault>
   155           </activation>
   156           <dependencies>
   157               <dependency>
   158                   <groupId>org.netbeans.html</groupId>
   159                   <artifactId>ko4j</artifactId>
   160                   <version>${net.java.html.version}</version>
   161                   <scope>runtime</scope>
   162               </dependency>
   163               <dependency>
   164                   <groupId>org.netbeans.html</groupId>
   165                   <artifactId>net.java.html.boot.fx</artifactId>
   166                   <version>${net.java.html.version}</version>
   167                   <scope>runtime</scope>
   168               </dependency>
   169               <dependency>
   170                   <groupId>org.netbeans.html</groupId>
   171                   <artifactId>ko-ws-tyrus</artifactId>
   172                   <scope>runtime</scope>
   173                   <version>${net.java.html.version}</version>
   174               </dependency>
   175           </dependencies>
   176       </profile>
   177       <profile>
   178           <id>bck2brwsr</id>
   179           <activation>
   180               <property>
   181                   <name>brwsr</name>
   182                   <value>bck2brwsr</value>
   183               </property>
   184           </activation>
   185           <build>
   186               <plugins>
   187                   <plugin>
   188                       <groupId>org.apidesign.bck2brwsr</groupId>
   189                       <artifactId>bck2brwsr-maven-plugin</artifactId>
   190                       <version>${bck2brwsr.launcher.version}</version>
   191                       <executions>
   192                           <execution>
   193                               <goals>
   194                                   <goal>brwsr</goal>
   195                               </goals>
   196                           </execution>
   197                       </executions>
   198                       <configuration>
   199                           <directory>${basedir}/src/main/webapp/</directory>
   200                           <startpage>${brwsr.startpage}</startpage>
   201                           <launcher>${brwsr}</launcher>
   202                           <javascript>${project.build.directory}/bck2brwsr.js</javascript>
   203                           <obfuscation>${bck2brwsr.obfuscationlevel}</obfuscation>
   204                       </configuration>
   205                   </plugin>
   206                   <plugin>
   207                       <groupId>org.apache.maven.plugins</groupId>
   208                       <artifactId>maven-compiler-plugin</artifactId>
   209                       <configuration>
   210                           <compilerArguments>
   211                               <!--
   212                               <bootclasspath>netbeans.ignore.jdk.bootclasspath</bootclasspath>
   213                               -->
   214                           </compilerArguments>
   215                       </configuration>
   216                   </plugin>
   217                   <plugin>
   218                       <artifactId>maven-assembly-plugin</artifactId>
   219                       <version>2.4</version>
   220                       <executions>
   221                           <execution>
   222                               <id>distro-assembly</id>
   223                               <phase>package</phase>
   224                               <goals>
   225                                   <goal>single</goal>
   226                               </goals>
   227                               <configuration>
   228                                   <descriptors>
   229                                       <descriptor>src/main/assembly/bck2brwsr.xml</descriptor>
   230                                   </descriptors>
   231                               </configuration>
   232                           </execution>
   233                       </executions>                
   234                   </plugin>      
   235               </plugins>
   236           </build>
   237           <dependencies>
   238               <dependency>
   239                   <groupId>org.apidesign.bck2brwsr</groupId>
   240                   <artifactId>emul</artifactId>
   241                   <version>${bck2brwsr.version}</version>
   242                   <classifier>rt</classifier>
   243               </dependency>
   244               <dependency>
   245                   <groupId>org.apidesign.bck2brwsr</groupId>
   246                   <artifactId>ko-bck2brwsr</artifactId>
   247                   <version>${bck2brwsr.version}</version>
   248                   <scope>runtime</scope>
   249               </dependency>
   250               <dependency>
   251                   <groupId>org.apidesign.bck2brwsr</groupId>
   252                   <artifactId>vm4brwsr</artifactId>
   253                   <classifier>js</classifier>
   254                   <type>zip</type>
   255                   <version>${bck2brwsr.version}</version>
   256                   <scope>provided</scope>
   257               </dependency>
   258           </dependencies>
   259       </profile>
   260       <profile>
   261           <id>teabrwsr</id>
   262           <build>
   263               <plugins>
   264                   <plugin>
   265                       <groupId>org.teavm</groupId>
   266                       <artifactId>teavm-maven-plugin</artifactId>
   267                       <version>${teavm.version}</version>
   268                       <dependencies>
   269                           <dependency>
   270                               <groupId>org.teavm</groupId>
   271                               <artifactId>teavm-classlib</artifactId>
   272                               <version>${teavm.version}</version>
   273                           </dependency>
   274                           <!-- This module adds html4j support. It mainly includes JavaScriptBuilder support.
   275                           Also there are some little patches to JCL emulation, that are required to pass TCK -->
   276                           <dependency>
   277                               <groupId>org.teavm</groupId>
   278                               <artifactId>teavm-html4j</artifactId>
   279                               <version>${teavm.version}</version>
   280                           </dependency>
   281                       </dependencies>
   282                       <executions>
   283                           <execution>
   284                               <id>generate-minesweeper</id>
   285                               <goals>
   286                                   <goal>build-javascript</goal>
   287                               </goals>
   288                               <phase>process-classes</phase>
   289                               <configuration>
   290                                   <!-- Whether we want TeaVM to minify (obfuscate) the generated JavaScript -->
   291                                   <minifying>false</minifying>
   292                                   <properties>
   293                                       <!-- This classes (separated with , ; space) will be available through vm.loadClass() -->
   294                                       <html4j.entryPoints>org.apidesign.html.demo.chess.LoadMain</html4j.entryPoints>
   295                                   </properties>
   296                                   <!-- Don't include main page - we created it by ourselves -->
   297                                   <mainPageIncluded>false</mainPageIncluded>
   298                                   <!-- Merge runtime.js instead of putting as a separate file -->
   299                                   <runtime>MERGED</runtime>
   300                                   <!-- Name of the generated file -->
   301                                   <targetFileName>bck2brwsr.js</targetFileName>
   302                                   <targetDirectory>${project.build.directory}/teavm</targetDirectory>
   303                                   <!-- This transformer adds null checks before virtual calls. It is not included
   304                                   by default as we don't always need these null checks -->
   305                                   <transformers>
   306                                       <param>org.teavm.javascript.NullPointerExceptionTransformer</param>
   307                                   </transformers>
   308                               </configuration>
   309                           </execution>
   310                       </executions>
   311                   </plugin>
   312                   <plugin>
   313                       <artifactId>maven-assembly-plugin</artifactId>
   314                       <version>2.4</version>
   315                       <executions>
   316                           <execution>
   317                               <id>distro-assembly</id>
   318                               <phase>package</phase>
   319                               <goals>
   320                                   <goal>single</goal>
   321                               </goals>
   322                               <configuration>
   323                                   <descriptors>
   324                                       <descriptor>src/main/assembly/teabrwsr.xml</descriptor>
   325                                   </descriptors>
   326                               </configuration>
   327                           </execution>
   328                       </executions>                
   329                   </plugin>      
   330               </plugins>
   331           </build>
   332       </profile>
   333   </profiles>
   334 </project>