minesweeper/pom.xml
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Sun, 08 Jun 2014 09:22:48 +0200
changeset 159 1b667288ba9c
parent 158 115273e5bb77
child 160 be13d9823456
permissions -rw-r--r--
Generating Android launcher icons
     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 
     5   <groupId>org.apidesign.demo</groupId>
     6   <artifactId>minesweeper</artifactId>
     7   <version>2.0-SNAPSHOT</version>
     8   <packaging>jar</packaging>
     9   <parent>
    10       <artifactId>demo</artifactId>
    11       <groupId>org.apidesign.html</groupId>
    12       <version>1.0-SNAPSHOT</version>
    13   </parent>
    14 
    15   <name>Mine Sweeper</name>
    16   <description>
    17       Demonstration of DukeScript rendering technology.
    18       Plus old, good, simple and entertaining game.
    19       Improve your coding skills by playing a game and 
    20       meanwhile learn what a rendering technology of the
    21       future is going to look like. Learn to use DukeScript:
    22       Write once, display (and deploy) anywhere!
    23   </description>
    24   <url>http://html.java.net/</url>
    25   <properties>
    26     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    27     <brwsr.startpage>pages/index.html</brwsr.startpage>
    28     <project.mainclass>org.apidesign.demo.minesweeper.Main</project.mainclass>
    29     <netbeans.compile.on.save>none</netbeans.compile.on.save>
    30   </properties>
    31   <build>
    32       <plugins>
    33           <plugin>
    34               <groupId>org.apache.maven.plugins</groupId>
    35               <artifactId>maven-compiler-plugin</artifactId>
    36               <version>2.3.2</version>
    37               <configuration>
    38                   <source>1.6</source>
    39                   <target>1.6</target>
    40               </configuration>
    41           </plugin>
    42           <plugin>
    43               <groupId>org.apache.maven.plugins</groupId>
    44               <artifactId>maven-jar-plugin</artifactId>
    45               <version>2.4</version>
    46               <configuration>
    47                   <archive>
    48                       <manifest>
    49                           <mainClass>${project.mainclass}</mainClass>
    50                           <addClasspath>true</addClasspath>
    51                           <classpathPrefix>lib/</classpathPrefix>
    52                       </manifest>
    53                   </archive>
    54               </configuration>
    55           </plugin>
    56           <plugin>
    57               <groupId>org.codehaus.mojo</groupId>
    58               <artifactId>exec-maven-plugin</artifactId>
    59               <version>1.2.1</version>
    60               <configuration>
    61                   <systemProperties>
    62                       <systemProperty>
    63                           <key>browser.rootdir</key>
    64                           <value>${basedir}/src/main/webapp/</value>
    65                       </systemProperty>
    66                   </systemProperties>
    67                   <mainClass>${project.mainclass}</mainClass>
    68               </configuration>
    69           </plugin>      
    70       </plugins>
    71   </build>
    72   <dependencies>
    73     <dependency>
    74         <groupId>org.netbeans.html</groupId>
    75         <artifactId>net.java.html.json</artifactId>
    76         <version>${net.java.html.version}</version>
    77     </dependency>
    78     <dependency>
    79         <groupId>org.netbeans.html</groupId>
    80         <artifactId>net.java.html.boot</artifactId>
    81         <version>${net.java.html.version}</version>
    82     </dependency>
    83     <dependency>
    84         <groupId>org.netbeans.html</groupId>
    85         <artifactId>net.java.html</artifactId>
    86         <version>${net.java.html.version}</version>
    87     </dependency>
    88     <dependency>
    89         <groupId>org.netbeans.html</groupId>
    90         <artifactId>net.java.html.sound</artifactId>
    91         <version>${net.java.html.version}</version>
    92     </dependency>
    93     <dependency>
    94         <groupId>org.netbeans.html</groupId>
    95         <artifactId>ko4j</artifactId>
    96         <version>${net.java.html.version}</version>
    97     </dependency>
    98     <dependency>
    99       <groupId>org.netbeans.html</groupId>
   100       <artifactId>nbrwsr</artifactId>
   101       <version>${nb.html.version}</version>
   102       <scope>provided</scope>
   103     </dependency>
   104     <dependency>
   105       <groupId>org.testng</groupId>
   106       <artifactId>testng</artifactId>
   107       <version>6.7</version>
   108       <scope>test</scope>
   109     </dependency>
   110   </dependencies>
   111   <profiles>
   112       <profile>
   113           <id>fxbrwsr</id>
   114           <activation>
   115               <activeByDefault>true</activeByDefault>
   116           </activation>
   117           <build>
   118             <plugins>
   119                 <plugin>
   120                     <groupId>org.apache.maven.plugins</groupId>
   121                     <artifactId>maven-jar-plugin</artifactId>
   122                     <version>2.4</version>
   123                     <configuration>
   124                         <archive>
   125                             <manifest>
   126                                 <mainClass>${project.mainclass}</mainClass>
   127                                 <addClasspath>true</addClasspath>
   128                                 <classpathPrefix>lib/</classpathPrefix>
   129                             </manifest>
   130                         </archive>
   131                     </configuration>
   132                 </plugin>
   133                 <plugin>
   134                     <artifactId>maven-assembly-plugin</artifactId>
   135                     <version>2.4</version>
   136                     <executions>
   137                         <execution>
   138                             <id>distro-assembly</id>
   139                             <phase>package</phase>
   140                             <goals>
   141                                 <goal>single</goal>
   142                             </goals>
   143                             <configuration>
   144                                 <descriptors>
   145                                     <descriptor>src/main/assembly/html.java.net.xml</descriptor>
   146                                 </descriptors>
   147                             </configuration>
   148                         </execution>
   149                     </executions>                
   150                 </plugin>      
   151             </plugins>
   152           </build>
   153           <dependencies>
   154             <dependency>
   155                 <groupId>org.netbeans.html</groupId>
   156                 <artifactId>net.java.html.boot.fx</artifactId>
   157                 <version>${net.java.html.version}</version>
   158                 <scope>runtime</scope>
   159             </dependency>
   160           </dependencies>
   161       </profile>
   162       <profile>
   163           <id>bck2brwsr</id>
   164           <activation>
   165               <property>
   166                   <name>brwsr</name>
   167                   <value>bck2brwsr</value>
   168               </property>
   169           </activation>
   170           <build>
   171               <plugins>
   172                   <plugin>
   173                       <groupId>org.apache.maven.plugins</groupId>
   174                       <artifactId>maven-jar-plugin</artifactId>
   175                       <version>2.4</version>
   176                       <configuration>
   177                           <archive>
   178                               <manifest>
   179                                   <mainClass>${project.mainclass}</mainClass>
   180                                   <addClasspath>true</addClasspath>
   181                                   <classpathPrefix>lib/</classpathPrefix>
   182                               </manifest>
   183                           </archive>
   184                       </configuration>
   185                   </plugin>
   186                   <plugin>
   187                       <groupId>org.apidesign.bck2brwsr</groupId>
   188                       <artifactId>bck2brwsr-maven-plugin</artifactId>
   189                       <version>${bck2brwsr.version}</version>
   190                       <executions>
   191                           <execution>
   192                               <goals>
   193                                   <goal>brwsr</goal>
   194                               </goals>
   195                           </execution>
   196                       </executions>
   197                       <configuration>
   198                           <directory>${basedir}/src/main/webapp/</directory>
   199                           <startpage>${brwsr.startpage}</startpage>
   200                       </configuration>
   201                   </plugin>
   202                   <plugin>
   203                       <groupId>org.apache.maven.plugins</groupId>
   204                       <artifactId>maven-compiler-plugin</artifactId>
   205                       <configuration>
   206                           <compilerArguments>
   207                               <bootclasspath>netbeans.ignore.jdk.bootclasspath</bootclasspath>
   208                           </compilerArguments>
   209                       </configuration>
   210                   </plugin>
   211                   <plugin>
   212                       <artifactId>maven-assembly-plugin</artifactId>
   213                       <version>2.4</version>
   214                       <executions>
   215                           <execution>
   216                               <id>distro-assembly</id>
   217                               <phase>package</phase>
   218                               <goals>
   219                                   <goal>single</goal>
   220                               </goals>
   221                               <configuration>
   222                                   <descriptors>
   223                                       <descriptor>src/main/assembly/bck2brwsr.xml</descriptor>
   224                                   </descriptors>
   225                               </configuration>
   226                           </execution>
   227                       </executions>                
   228                   </plugin>      
   229               </plugins>
   230           </build>
   231           <dependencies>
   232               <dependency>
   233                   <groupId>org.apidesign.bck2brwsr</groupId>
   234                   <artifactId>emul</artifactId>
   235                   <version>${bck2brwsr.version}</version>
   236                   <classifier>rt</classifier>
   237               </dependency>
   238               <dependency>
   239                   <groupId>org.apidesign.bck2brwsr</groupId>
   240                   <artifactId>ko-bck2brwsr</artifactId>
   241                   <version>${bck2brwsr.version}</version>
   242                   <scope>runtime</scope>
   243               </dependency>
   244               <dependency>
   245                   <groupId>org.apidesign.bck2brwsr</groupId>
   246                   <artifactId>vm4brwsr</artifactId>
   247                   <classifier>js</classifier>
   248                   <type>zip</type>
   249                   <version>${bck2brwsr.version}</version>
   250                   <scope>provided</scope>
   251               </dependency>
   252           </dependencies>
   253       </profile>
   254       <profile>
   255           <id>dlvkbrwsr</id>
   256           <properties>
   257               <platform.version>4.1.1.4</platform.version>
   258               <android.plugin.version>3.7.0</android.plugin.version>
   259               <debug>false</debug>
   260           </properties>
   261           <dependencies>
   262               <dependency>
   263                   <groupId>com.google.android</groupId>
   264                   <artifactId>android</artifactId>
   265                   <version>${platform.version}</version>
   266                   <scope>provided</scope>
   267               </dependency>
   268               <dependency>
   269                   <groupId>org.apidesign.brwsr</groupId>
   270                   <artifactId>dlvkbrwsr</artifactId>
   271                   <version>0.6</version>
   272                   <type>jar</type>
   273               </dependency>
   274               <dependency>
   275                   <groupId>org.netbeans.html</groupId>
   276                   <artifactId>ko-ws-tyrus</artifactId>
   277                   <version>${net.java.html.version}</version>
   278                   <exclusions>
   279                       <exclusion>
   280                           <artifactId>org.json-osgi</artifactId>
   281                           <groupId>de.twentyeleven.skysail</groupId>
   282                       </exclusion>
   283                   </exclusions>
   284               </dependency>
   285           </dependencies>
   286           <build>
   287               <plugins>
   288                   <plugin>
   289                       <groupId>com.filmon.maven</groupId>
   290                       <artifactId>image-maven-plugin</artifactId>
   291                       <version>1.1</version>
   292                       <executions>
   293                           <execution>
   294                               <goals>
   295                                   <goal>scale</goal>
   296                               </goals>
   297                               <configuration>
   298                                   <outputDirectory>target/res</outputDirectory>
   299                                   <images>
   300                                       <image>
   301                                           <source>src/main/icons/DukeSweeper.png</source>
   302                                           <destination>drawable-hdpi/ic_launcher.png</destination>
   303                                           <width>72</width>
   304                                       </image>
   305                                       <image>
   306                                           <source>src/main/icons/DukeSweeper.png</source>
   307                                           <destination>drawable-mdpi/ic_launcher.png</destination>
   308                                           <width>48</width>
   309                                       </image>
   310                                       <image>
   311                                           <source>src/main/icons/DukeSweeper.png</source>
   312                                           <destination>drawable-xhdpi/ic_launcher.png</destination>
   313                                           <width>96</width>
   314                                       </image>
   315                                       <image>
   316                                           <source>src/main/icons/DukeSweeper.png</source>
   317                                           <destination>drawable-xxhdpi/ic_launcher.png</destination>
   318                                           <width>144</width>
   319                                       </image>
   320                                   </images>
   321                               </configuration>
   322                           </execution>
   323                       </executions>
   324                   </plugin>
   325                   <plugin>
   326                       <groupId>com.jayway.maven.plugins.android.generation2</groupId>
   327                       <artifactId>android-maven-plugin</artifactId>
   328                       <version>${android.plugin.version}</version>
   329                       <extensions>true</extensions>
   330                       <configuration>
   331                           <resourceDirectory>target/res</resourceDirectory>
   332                           <classifier>apk</classifier>
   333                           <attachJar>false</attachJar>
   334                           <apkDebug>debug</apkDebug>
   335                           <assetsDirectory>src/main/webapp</assetsDirectory>
   336                           <sdk>
   337                               <platform>19</platform>
   338                           </sdk>
   339                           <apk>
   340                               <metaIncludes>
   341                                   <metaInclude>services/org.apidesign.**</metaInclude>
   342                               </metaIncludes>
   343                           </apk>
   344                           <extractDuplicates>true</extractDuplicates>
   345                           <file>${project.build.directory}/${project.build.finalName}.apk</file>
   346                       </configuration>
   347                       <executions>
   348                           <execution>
   349                               <id>apk</id>
   350                               <goals>
   351                                   <goal>apk</goal>
   352                                   <goal>dex</goal>
   353                               </goals>
   354                           </execution>
   355                       </executions>
   356                   </plugin>
   357                   <plugin>
   358                       <groupId>org.apache.maven.plugins</groupId>
   359                       <artifactId>maven-install-plugin</artifactId>
   360                       <version>2.5.1</version>
   361                       <configuration>
   362                           <groupId>${project.groupId}</groupId>
   363                           <artifactId>${project.artifactId}</artifactId>
   364                           <version>${project.version}</version>
   365                           <file>${project.build.directory}/${project.build.finalName}.apk</file>
   366                           <packaging>apk</packaging>
   367                           <skip>true</skip>
   368                       </configuration>
   369                       <executions>
   370                           <execution>
   371                               <id>install-apk</id>
   372                               <phase>install</phase>
   373                               <goals>
   374                                   <goal>install-file</goal>
   375                               </goals>
   376                           </execution>
   377                       </executions>
   378                   </plugin>
   379               </plugins>
   380           </build>
   381       </profile>
   382       <profile>
   383           <id>teabrwsr</id>
   384           <build>
   385               <plugins>
   386                   <plugin>
   387                       <groupId>org.teavm</groupId>
   388                       <artifactId>teavm-maven-plugin</artifactId>
   389                       <version>${teavm.version}</version>
   390                       <dependencies>
   391                           <dependency>
   392                               <groupId>org.teavm</groupId>
   393                               <artifactId>teavm-classlib</artifactId>
   394                               <version>${teavm.version}</version>
   395                           </dependency>
   396                           <!-- This module adds html4j support. It mainly includes JavaScriptBuilder support.
   397                           Also there are some little patches to JCL emulation, that are required to pass TCK -->
   398                           <dependency>
   399                               <groupId>org.teavm</groupId>
   400                               <artifactId>teavm-html4j</artifactId>
   401                               <version>${teavm.version}</version>
   402                           </dependency>
   403                       </dependencies>
   404                       <executions>
   405                           <execution>
   406                               <id>generate-minesweeper</id>
   407                               <goals>
   408                                   <goal>build-javascript</goal>
   409                               </goals>
   410                               <phase>process-classes</phase>
   411                               <configuration>
   412                                   <!-- Whether we want TeaVM to minify (obfuscate) the generated JavaScript -->
   413                                   <minifying>false</minifying>
   414                                   <properties>
   415                                       <!-- This classes (separated with , ; space) will be available through vm.loadClass() -->
   416                                       <html4j.entryPoints>org.apidesign.demo.minesweeper.MainBrwsr</html4j.entryPoints>
   417                                   </properties>
   418                                   <!-- Don't include main page - we created it by ourselves -->
   419                                   <mainPageIncluded>false</mainPageIncluded>
   420                                   <!-- Merge runtime.js instead of putting as a separate file -->
   421                                   <runtime>MERGED</runtime>
   422                                   <!-- Name of the generated file -->
   423                                   <targetFileName>bck2brwsr.js</targetFileName>
   424                                   <targetDirectory>${project.build.directory}/teavm</targetDirectory>
   425                                   <!-- This transformer adds null checks before virtual calls. It is not included
   426                                   by default as we don't always need these null checks -->
   427                                   <transformers>
   428                                       <param>org.teavm.javascript.NullPointerExceptionTransformer</param>
   429                                   </transformers>
   430                               </configuration>
   431                           </execution>
   432                       </executions>
   433                   </plugin>
   434                   <plugin>
   435                       <artifactId>maven-assembly-plugin</artifactId>
   436                       <version>2.4</version>
   437                       <executions>
   438                           <execution>
   439                               <id>distro-assembly</id>
   440                               <phase>package</phase>
   441                               <goals>
   442                                   <goal>single</goal>
   443                               </goals>
   444                               <configuration>
   445                                   <descriptors>
   446                                       <descriptor>src/main/assembly/teabrwsr.xml</descriptor>
   447                                   </descriptors>
   448                               </configuration>
   449                           </execution>
   450                       </executions>                
   451                   </plugin>      
   452               </plugins>
   453           </build>
   454       </profile>
   455       <profile>
   456           <id>ibrwsr</id>
   457           <dependencies>
   458               <dependency>
   459                   <groupId>org.apidesign.brwsr</groupId>
   460                   <artifactId>ibrwsr</artifactId>
   461                   <version>0.6</version>
   462                   <scope>runtime</scope>
   463               </dependency>
   464           </dependencies>
   465           <build>
   466               <plugins>
   467                   <plugin>
   468                       <groupId>com.filmon.maven</groupId>
   469                       <artifactId>image-maven-plugin</artifactId>
   470                       <version>1.1</version>
   471                       <executions>
   472                           <execution>
   473                               <goals>
   474                                   <goal>scale</goal>
   475                               </goals>
   476                               <configuration>
   477                                   <outputDirectory>target/images</outputDirectory>
   478                                   <images>
   479                                       <image>
   480                                           <source>src/main/icons/DukeSweeper.png</source>
   481                                           <destination>Icon.png</destination>
   482                                           <width>57</width>
   483                                       </image>
   484                                       <image>
   485                                           <source>src/main/icons/DukeSweeper.png</source>
   486                                           <destination>Icon@2.png</destination>
   487                                           <width>114</width>
   488                                       </image>
   489                                       <image>
   490                                           <source>src/main/icons/DukeSweeper.png</source>
   491                                           <destination>Icon-60.png</destination>
   492                                           <width>60</width>
   493                                       </image>
   494                                       <image>
   495                                           <source>src/main/icons/DukeSweeper.png</source>
   496                                           <destination>Icon-60@2.png</destination>
   497                                           <width>120</width>
   498                                       </image>
   499                                       <image>
   500                                           <source>src/main/icons/DukeSweeper.png</source>
   501                                           <destination>Icon-72.png</destination>
   502                                           <width>72</width>
   503                                       </image>
   504                                       <image>
   505                                           <source>src/main/icons/DukeSweeper.png</source>
   506                                           <destination>Icon-76.png</destination>
   507                                           <width>76</width>
   508                                       </image>
   509                                   </images>
   510                               </configuration>
   511                           </execution>
   512                       </executions>
   513                   </plugin>
   514                   <plugin>
   515                       <groupId>org.robovm</groupId>
   516                       <artifactId>robovm-maven-plugin</artifactId>
   517                       <version>0.0.11.1</version>
   518                       <configuration>
   519                           <config>
   520                               <mainClass>org.apidesign.demo.minesweeper.Main</mainClass>
   521                               <forceLinkClasses>
   522                                   <pattern>java.util.logging.ConsoleHandler</pattern>
   523                                   <pattern>java.util.logging.SimpleFormatter</pattern>
   524                                   <pattern>org.netbeans.html.ko4j.KO4J</pattern>
   525                                   <pattern>org.netbeans.html.sound.impl.BrowserAudioEnv</pattern>
   526                                   <pattern>org.apidesign.brwsr.IBrwsrPrsntr</pattern>
   527                               </forceLinkClasses>
   528                               <executableName>MineSweeper</executableName>
   529                               <resources>
   530                                   <resource>src/main/webapp/pages</resource>
   531                                   <resource>
   532                                       <targetPath>/</targetPath>
   533                                       <directory>src/main/icons/</directory>
   534                                       <includes>
   535                                           <include>Default*.png</include>
   536                                       </includes>
   537                                   </resource>
   538                                   <resource>
   539                                       <targetPath>/</targetPath>
   540                                       <directory>target/images/</directory>
   541                                       <includes>
   542                                           <include>*.png</include>
   543                                       </includes>
   544                                   </resource>
   545                               </resources>
   546                           </config>
   547                           <includeJFX>false</includeJFX>
   548                       </configuration>
   549                   </plugin>
   550               </plugins>
   551           </build>
   552       </profile>      
   553       <profile>
   554           <id>nbrwsr</id>
   555           <dependencies>
   556               <dependency>
   557                   <groupId>org.netbeans.html</groupId>
   558                   <artifactId>nbrwsr</artifactId>
   559                   <version>${nb.html.version}</version>
   560                   <scope>compile</scope>
   561               </dependency>
   562           </dependencies>
   563           <build>
   564               <plugins>
   565                   <plugin>
   566                       <groupId>org.apache.maven.plugins</groupId>
   567                       <artifactId>maven-resources-plugin</artifactId>
   568                       <version>2.6</version>
   569                       <executions>
   570                           <execution>
   571                               <id>include-webpages</id>
   572                               <goals>
   573                                   <goal>copy-resources</goal>
   574                               </goals>
   575                               <phase>process-resources</phase>
   576                               <configuration>
   577                                   <outputDirectory>${basedir}/target/classes/org/apidesign/demo/minesweeper</outputDirectory>
   578                                   <overwrite>true</overwrite>
   579                                   <resources>          
   580                                       <resource>
   581                                           <directory>src/main/webapp/pages</directory>
   582                                       </resource>
   583                                   </resources>              
   584                               </configuration>   
   585                           </execution>
   586                       </executions>
   587                   </plugin>
   588                   <plugin>
   589                       <groupId>org.codehaus.mojo</groupId>
   590                       <artifactId>nbm-maven-plugin</artifactId>
   591                       <version>3.13</version>
   592                       <extensions>true</extensions>
   593                       <executions>
   594                           <execution>
   595                               <id>default-manifest</id>
   596                               <phase>process-classes</phase>
   597                               <goals>
   598                                   <goal>manifest</goal>
   599                               </goals>
   600                               <configuration>
   601                                   <useOSGiDependencies>true</useOSGiDependencies>
   602                                   <brandingToken>html4j4nb</brandingToken>
   603                                   <cluster>extra</cluster>
   604                                   <verifyIntegrity>false</verifyIntegrity>
   605                               </configuration>
   606                           </execution>                       
   607                           <execution>
   608                               <id>default-nbm</id>
   609                               <phase>package</phase>
   610                               <goals>
   611                                   <goal>nbm</goal>
   612                               </goals>
   613                               <configuration>
   614                                   <useOSGiDependencies>true</useOSGiDependencies>
   615                                   <cluster>extra</cluster>
   616                                   <verifyIntegrity>false</verifyIntegrity>
   617                               </configuration>
   618                           </execution>
   619                       </executions>
   620                       <configuration>
   621                           <useOSGiDependencies>true</useOSGiDependencies>
   622                           <brandingToken>html4j4nb</brandingToken>
   623                           <cluster>html4j4nb</cluster>
   624                           <verifyIntegrity>false</verifyIntegrity>
   625                       </configuration>
   626                   </plugin>                      
   627 
   628                   <plugin>
   629                       <groupId>org.apache.maven.plugins</groupId>
   630                       <artifactId>maven-jar-plugin</artifactId>
   631                       <configuration>
   632                           <!-- to have the jar plugin pickup the nbm generated manifest -->
   633                           <useDefaultManifestFile>true</useDefaultManifestFile>
   634                       </configuration>
   635                   </plugin>
   636               </plugins>
   637           </build>
   638       </profile>      
   639   </profiles>  
   640 </project>