minesweeper/pom.xml
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Sun, 08 Jun 2014 09:10:08 +0200
changeset 158 115273e5bb77
parent 154 b37d0281edf8
child 159 1b667288ba9c
permissions -rw-r--r--
Having just one icon picture and generating the rest of iOS icons from it
     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.jayway.maven.plugins.android.generation2</groupId>
   290                       <artifactId>android-maven-plugin</artifactId>
   291                       <version>${android.plugin.version}</version>
   292                       <extensions>true</extensions>
   293                       <configuration>
   294                           <classifier>apk</classifier>
   295                           <attachJar>false</attachJar>
   296                           <apkDebug>debug</apkDebug>
   297                           <assetsDirectory>src/main/webapp</assetsDirectory>
   298                           <sdk>
   299                               <platform>19</platform>
   300                           </sdk>
   301                           <apk>
   302                               <metaIncludes>
   303                                   <metaInclude>services/org.apidesign.**</metaInclude>
   304                               </metaIncludes>
   305                           </apk>
   306                           <extractDuplicates>true</extractDuplicates>
   307                           <file>${project.build.directory}/${project.build.finalName}.apk</file>
   308                       </configuration>
   309                       <executions>
   310                           <execution>
   311                               <id>apk</id>
   312                               <goals>
   313                                   <goal>apk</goal>
   314                                   <goal>dex</goal>
   315                               </goals>
   316                           </execution>
   317                       </executions>
   318                   </plugin>
   319                   <plugin>
   320                       <groupId>org.apache.maven.plugins</groupId>
   321                       <artifactId>maven-install-plugin</artifactId>
   322                       <version>2.5.1</version>
   323                       <configuration>
   324                           <groupId>${project.groupId}</groupId>
   325                           <artifactId>${project.artifactId}</artifactId>
   326                           <version>${project.version}</version>
   327                           <file>${project.build.directory}/${project.build.finalName}.apk</file>
   328                           <packaging>apk</packaging>
   329                           <skip>true</skip>
   330                       </configuration>
   331                       <executions>
   332                           <execution>
   333                               <id>install-apk</id>
   334                               <phase>install</phase>
   335                               <goals>
   336                                   <goal>install-file</goal>
   337                               </goals>
   338                           </execution>
   339                       </executions>
   340                   </plugin>
   341               </plugins>
   342           </build>
   343       </profile>
   344       <profile>
   345           <id>teabrwsr</id>
   346           <build>
   347               <plugins>
   348                   <plugin>
   349                       <groupId>org.teavm</groupId>
   350                       <artifactId>teavm-maven-plugin</artifactId>
   351                       <version>${teavm.version}</version>
   352                       <dependencies>
   353                           <dependency>
   354                               <groupId>org.teavm</groupId>
   355                               <artifactId>teavm-classlib</artifactId>
   356                               <version>${teavm.version}</version>
   357                           </dependency>
   358                           <!-- This module adds html4j support. It mainly includes JavaScriptBuilder support.
   359                           Also there are some little patches to JCL emulation, that are required to pass TCK -->
   360                           <dependency>
   361                               <groupId>org.teavm</groupId>
   362                               <artifactId>teavm-html4j</artifactId>
   363                               <version>${teavm.version}</version>
   364                           </dependency>
   365                       </dependencies>
   366                       <executions>
   367                           <execution>
   368                               <id>generate-minesweeper</id>
   369                               <goals>
   370                                   <goal>build-javascript</goal>
   371                               </goals>
   372                               <phase>process-classes</phase>
   373                               <configuration>
   374                                   <!-- Whether we want TeaVM to minify (obfuscate) the generated JavaScript -->
   375                                   <minifying>false</minifying>
   376                                   <properties>
   377                                       <!-- This classes (separated with , ; space) will be available through vm.loadClass() -->
   378                                       <html4j.entryPoints>org.apidesign.demo.minesweeper.MainBrwsr</html4j.entryPoints>
   379                                   </properties>
   380                                   <!-- Don't include main page - we created it by ourselves -->
   381                                   <mainPageIncluded>false</mainPageIncluded>
   382                                   <!-- Merge runtime.js instead of putting as a separate file -->
   383                                   <runtime>MERGED</runtime>
   384                                   <!-- Name of the generated file -->
   385                                   <targetFileName>bck2brwsr.js</targetFileName>
   386                                   <targetDirectory>${project.build.directory}/teavm</targetDirectory>
   387                                   <!-- This transformer adds null checks before virtual calls. It is not included
   388                                   by default as we don't always need these null checks -->
   389                                   <transformers>
   390                                       <param>org.teavm.javascript.NullPointerExceptionTransformer</param>
   391                                   </transformers>
   392                               </configuration>
   393                           </execution>
   394                       </executions>
   395                   </plugin>
   396                   <plugin>
   397                       <artifactId>maven-assembly-plugin</artifactId>
   398                       <version>2.4</version>
   399                       <executions>
   400                           <execution>
   401                               <id>distro-assembly</id>
   402                               <phase>package</phase>
   403                               <goals>
   404                                   <goal>single</goal>
   405                               </goals>
   406                               <configuration>
   407                                   <descriptors>
   408                                       <descriptor>src/main/assembly/teabrwsr.xml</descriptor>
   409                                   </descriptors>
   410                               </configuration>
   411                           </execution>
   412                       </executions>                
   413                   </plugin>      
   414               </plugins>
   415           </build>
   416       </profile>
   417       <profile>
   418           <id>ibrwsr</id>
   419           <dependencies>
   420               <dependency>
   421                   <groupId>org.apidesign.brwsr</groupId>
   422                   <artifactId>ibrwsr</artifactId>
   423                   <version>0.6</version>
   424                   <scope>runtime</scope>
   425               </dependency>
   426           </dependencies>
   427           <build>
   428               <plugins>
   429                   <plugin>
   430                       <groupId>com.filmon.maven</groupId>
   431                       <artifactId>image-maven-plugin</artifactId>
   432                       <version>1.1</version>
   433                       <executions>
   434                           <execution>
   435                               <goals>
   436                                   <goal>scale</goal>
   437                               </goals>
   438                               <configuration>
   439                                   <outputDirectory>target/images</outputDirectory>
   440                                   <images>
   441                                       <image>
   442                                           <source>src/main/icons/DukeSweeper.png</source>
   443                                           <destination>Icon.png</destination>
   444                                           <width>57</width>
   445                                       </image>
   446                                       <image>
   447                                           <source>src/main/icons/DukeSweeper.png</source>
   448                                           <destination>Icon@2.png</destination>
   449                                           <width>114</width>
   450                                       </image>
   451                                       <image>
   452                                           <source>src/main/icons/DukeSweeper.png</source>
   453                                           <destination>Icon-60.png</destination>
   454                                           <width>60</width>
   455                                       </image>
   456                                       <image>
   457                                           <source>src/main/icons/DukeSweeper.png</source>
   458                                           <destination>Icon-60@2.png</destination>
   459                                           <width>120</width>
   460                                       </image>
   461                                       <image>
   462                                           <source>src/main/icons/DukeSweeper.png</source>
   463                                           <destination>Icon-72.png</destination>
   464                                           <width>72</width>
   465                                       </image>
   466                                       <image>
   467                                           <source>src/main/icons/DukeSweeper.png</source>
   468                                           <destination>Icon-76.png</destination>
   469                                           <width>76</width>
   470                                       </image>
   471                                   </images>
   472                               </configuration>
   473                           </execution>
   474                       </executions>
   475                   </plugin>
   476                   <plugin>
   477                       <groupId>org.robovm</groupId>
   478                       <artifactId>robovm-maven-plugin</artifactId>
   479                       <version>0.0.11.1</version>
   480                       <configuration>
   481                           <config>
   482                               <mainClass>org.apidesign.demo.minesweeper.Main</mainClass>
   483                               <forceLinkClasses>
   484                                   <pattern>java.util.logging.ConsoleHandler</pattern>
   485                                   <pattern>java.util.logging.SimpleFormatter</pattern>
   486                                   <pattern>org.netbeans.html.ko4j.KO4J</pattern>
   487                                   <pattern>org.netbeans.html.sound.impl.BrowserAudioEnv</pattern>
   488                                   <pattern>org.apidesign.brwsr.IBrwsrPrsntr</pattern>
   489                               </forceLinkClasses>
   490                               <executableName>MineSweeper</executableName>
   491                               <resources>
   492                                   <resource>src/main/webapp/pages</resource>
   493                                   <resource>
   494                                       <targetPath>/</targetPath>
   495                                       <directory>src/main/icons/</directory>
   496                                       <includes>
   497                                           <include>Default*.png</include>
   498                                       </includes>
   499                                   </resource>
   500                                   <resource>
   501                                       <targetPath>/</targetPath>
   502                                       <directory>target/images/</directory>
   503                                       <includes>
   504                                           <include>*.png</include>
   505                                       </includes>
   506                                   </resource>
   507                               </resources>
   508                           </config>
   509                           <includeJFX>false</includeJFX>
   510                       </configuration>
   511                   </plugin>
   512               </plugins>
   513           </build>
   514       </profile>      
   515       <profile>
   516           <id>nbrwsr</id>
   517           <dependencies>
   518               <dependency>
   519                   <groupId>org.netbeans.html</groupId>
   520                   <artifactId>nbrwsr</artifactId>
   521                   <version>${nb.html.version}</version>
   522                   <scope>compile</scope>
   523               </dependency>
   524           </dependencies>
   525           <build>
   526               <plugins>
   527                   <plugin>
   528                       <groupId>org.apache.maven.plugins</groupId>
   529                       <artifactId>maven-resources-plugin</artifactId>
   530                       <version>2.6</version>
   531                       <executions>
   532                           <execution>
   533                               <id>include-webpages</id>
   534                               <goals>
   535                                   <goal>copy-resources</goal>
   536                               </goals>
   537                               <phase>process-resources</phase>
   538                               <configuration>
   539                                   <outputDirectory>${basedir}/target/classes/org/apidesign/demo/minesweeper</outputDirectory>
   540                                   <overwrite>true</overwrite>
   541                                   <resources>          
   542                                       <resource>
   543                                           <directory>src/main/webapp/pages</directory>
   544                                       </resource>
   545                                   </resources>              
   546                               </configuration>   
   547                           </execution>
   548                       </executions>
   549                   </plugin>
   550                   <plugin>
   551                       <groupId>org.codehaus.mojo</groupId>
   552                       <artifactId>nbm-maven-plugin</artifactId>
   553                       <version>3.13</version>
   554                       <extensions>true</extensions>
   555                       <executions>
   556                           <execution>
   557                               <id>default-manifest</id>
   558                               <phase>process-classes</phase>
   559                               <goals>
   560                                   <goal>manifest</goal>
   561                               </goals>
   562                               <configuration>
   563                                   <useOSGiDependencies>true</useOSGiDependencies>
   564                                   <brandingToken>html4j4nb</brandingToken>
   565                                   <cluster>extra</cluster>
   566                                   <verifyIntegrity>false</verifyIntegrity>
   567                               </configuration>
   568                           </execution>                       
   569                           <execution>
   570                               <id>default-nbm</id>
   571                               <phase>package</phase>
   572                               <goals>
   573                                   <goal>nbm</goal>
   574                               </goals>
   575                               <configuration>
   576                                   <useOSGiDependencies>true</useOSGiDependencies>
   577                                   <cluster>extra</cluster>
   578                                   <verifyIntegrity>false</verifyIntegrity>
   579                               </configuration>
   580                           </execution>
   581                       </executions>
   582                       <configuration>
   583                           <useOSGiDependencies>true</useOSGiDependencies>
   584                           <brandingToken>html4j4nb</brandingToken>
   585                           <cluster>html4j4nb</cluster>
   586                           <verifyIntegrity>false</verifyIntegrity>
   587                       </configuration>
   588                   </plugin>                      
   589 
   590                   <plugin>
   591                       <groupId>org.apache.maven.plugins</groupId>
   592                       <artifactId>maven-jar-plugin</artifactId>
   593                       <configuration>
   594                           <!-- to have the jar plugin pickup the nbm generated manifest -->
   595                           <useDefaultManifestFile>true</useDefaultManifestFile>
   596                       </configuration>
   597                   </plugin>
   598               </plugins>
   599           </build>
   600       </profile>      
   601   </profiles>  
   602 </project>