minesweeper/pom.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Tue, 20 May 2014 06:27:53 +0200
changeset 150 95639e5c0e28
parent 149 8d13c397eb41
child 151 3bad49b62dfa
permissions -rw-r--r--
Version 0.6 of ibrwsr should be fine as well
     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>16</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>org.robovm</groupId>
   431                       <artifactId>robovm-maven-plugin</artifactId>
   432                       <version>0.0.11.1</version>
   433                       <configuration>
   434                           <config>
   435                               <mainClass>org.apidesign.demo.minesweeper.Main</mainClass>
   436                               <forceLinkClasses>
   437                                   <pattern>java.util.logging.ConsoleHandler</pattern>
   438                                   <pattern>java.util.logging.SimpleFormatter</pattern>
   439                                   <pattern>org.netbeans.html.ko4j.KO4J</pattern>
   440                                   <pattern>org.netbeans.html.sound.impl.BrowserAudioEnv</pattern>
   441                                   <pattern>org.apidesign.brwsr.IBrwsrPrsntr</pattern>
   442                               </forceLinkClasses>
   443                               <executableName>MineSweeper</executableName>
   444                               <resources>
   445                                   <resource>src/main/webapp/pages/</resource>
   446                               </resources>
   447                           </config>
   448                           <includeJFX>false</includeJFX>
   449                       </configuration>
   450                   </plugin>
   451               </plugins>
   452           </build>
   453       </profile>      
   454       <profile>
   455           <id>nbrwsr</id>
   456           <dependencies>
   457               <dependency>
   458                   <groupId>org.netbeans.html</groupId>
   459                   <artifactId>nbrwsr</artifactId>
   460                   <version>${nb.html.version}</version>
   461                   <scope>compile</scope>
   462               </dependency>
   463           </dependencies>
   464           <build>
   465               <plugins>
   466                   <plugin>
   467                       <groupId>org.apache.maven.plugins</groupId>
   468                       <artifactId>maven-resources-plugin</artifactId>
   469                       <version>2.6</version>
   470                       <executions>
   471                           <execution>
   472                               <id>include-webpages</id>
   473                               <goals>
   474                                   <goal>copy-resources</goal>
   475                               </goals>
   476                               <phase>process-resources</phase>
   477                               <configuration>
   478                                   <outputDirectory>${basedir}/target/classes/org/apidesign/demo/minesweeper</outputDirectory>
   479                                   <overwrite>true</overwrite>
   480                                   <resources>          
   481                                       <resource>
   482                                           <directory>src/main/webapp/pages</directory>
   483                                       </resource>
   484                                   </resources>              
   485                               </configuration>   
   486                           </execution>
   487                       </executions>
   488                   </plugin>
   489                   <plugin>
   490                       <groupId>org.codehaus.mojo</groupId>
   491                       <artifactId>nbm-maven-plugin</artifactId>
   492                       <version>3.13</version>
   493                       <extensions>true</extensions>
   494                       <executions>
   495                           <execution>
   496                               <id>default-manifest</id>
   497                               <phase>process-classes</phase>
   498                               <goals>
   499                                   <goal>manifest</goal>
   500                               </goals>
   501                               <configuration>
   502                                   <useOSGiDependencies>true</useOSGiDependencies>
   503                                   <brandingToken>html4j4nb</brandingToken>
   504                                   <cluster>extra</cluster>
   505                                   <verifyIntegrity>false</verifyIntegrity>
   506                               </configuration>
   507                           </execution>                       
   508                           <execution>
   509                               <id>default-nbm</id>
   510                               <phase>package</phase>
   511                               <goals>
   512                                   <goal>nbm</goal>
   513                               </goals>
   514                               <configuration>
   515                                   <useOSGiDependencies>true</useOSGiDependencies>
   516                                   <cluster>extra</cluster>
   517                                   <verifyIntegrity>false</verifyIntegrity>
   518                               </configuration>
   519                           </execution>
   520                       </executions>
   521                       <configuration>
   522                           <useOSGiDependencies>true</useOSGiDependencies>
   523                           <brandingToken>html4j4nb</brandingToken>
   524                           <cluster>html4j4nb</cluster>
   525                           <verifyIntegrity>false</verifyIntegrity>
   526                       </configuration>
   527                   </plugin>                      
   528 
   529                   <plugin>
   530                       <groupId>org.apache.maven.plugins</groupId>
   531                       <artifactId>maven-jar-plugin</artifactId>
   532                       <configuration>
   533                           <!-- to have the jar plugin pickup the nbm generated manifest -->
   534                           <useDefaultManifestFile>true</useDefaultManifestFile>
   535                       </configuration>
   536                   </plugin>
   537               </plugins>
   538           </build>
   539       </profile>      
   540   </profiles>  
   541 </project>