minesweeper/pom.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Thu, 17 Apr 2014 11:17:16 +0200
changeset 131 49834c96798d
parent 130 3d99b96ffbd4
child 132 5a91cecadd7e
permissions -rw-r--r--
The Class-Path reference to libraries is only useful in case of fxbrwsr and bck2brwsr profiles
     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>1.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 entertainin 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.codehaus.mojo</groupId>
    44               <artifactId>exec-maven-plugin</artifactId>
    45               <version>1.2.1</version>
    46               <configuration>
    47                   <systemProperties>
    48                       <systemProperty>
    49                           <key>browser.rootdir</key>
    50                           <value>${basedir}/src/main/webapp/</value>
    51                       </systemProperty>
    52                   </systemProperties>
    53                   <mainClass>${project.mainclass}</mainClass>
    54               </configuration>
    55           </plugin>      
    56       </plugins>
    57   </build>
    58   <dependencies>
    59     <dependency>
    60         <groupId>org.netbeans.html</groupId>
    61         <artifactId>net.java.html.json</artifactId>
    62         <version>${net.java.html.version}</version>
    63     </dependency>
    64     <dependency>
    65         <groupId>org.netbeans.html</groupId>
    66         <artifactId>net.java.html.boot</artifactId>
    67         <version>${net.java.html.version}</version>
    68     </dependency>
    69     <dependency>
    70         <groupId>org.netbeans.html</groupId>
    71         <artifactId>net.java.html</artifactId>
    72         <version>${net.java.html.version}</version>
    73     </dependency>
    74     <dependency>
    75         <groupId>org.netbeans.html</groupId>
    76         <artifactId>net.java.html.sound</artifactId>
    77         <version>${net.java.html.version}</version>
    78     </dependency>
    79     <dependency>
    80         <groupId>org.netbeans.html</groupId>
    81         <artifactId>ko4j</artifactId>
    82         <version>${net.java.html.version}</version>
    83     </dependency>
    84     <dependency>
    85       <groupId>org.netbeans.html</groupId>
    86       <artifactId>nbrwsr</artifactId>
    87       <version>${net.java.html.version}</version>
    88       <scope>provided</scope>
    89     </dependency>
    90     <dependency>
    91       <groupId>org.testng</groupId>
    92       <artifactId>testng</artifactId>
    93       <version>6.7</version>
    94       <scope>test</scope>
    95     </dependency>
    96   </dependencies>
    97   <profiles>
    98       <profile>
    99           <id>fxbrwsr</id>
   100           <activation>
   101               <activeByDefault>true</activeByDefault>
   102           </activation>
   103           <build>
   104             <plugins>
   105                 <plugin>
   106                     <groupId>org.apache.maven.plugins</groupId>
   107                     <artifactId>maven-jar-plugin</artifactId>
   108                     <version>2.4</version>
   109                     <configuration>
   110                         <archive>
   111                             <manifest>
   112                                 <mainClass>${project.mainclass}</mainClass>
   113                                 <addClasspath>true</addClasspath>
   114                                 <classpathPrefix>lib/</classpathPrefix>
   115                             </manifest>
   116                         </archive>
   117                     </configuration>
   118                 </plugin>
   119                 <plugin>
   120                     <artifactId>maven-assembly-plugin</artifactId>
   121                     <version>2.4</version>
   122                     <executions>
   123                         <execution>
   124                             <id>distro-assembly</id>
   125                             <phase>package</phase>
   126                             <goals>
   127                                 <goal>single</goal>
   128                             </goals>
   129                             <configuration>
   130                                 <descriptors>
   131                                     <descriptor>src/main/assembly/html.java.net.xml</descriptor>
   132                                 </descriptors>
   133                             </configuration>
   134                         </execution>
   135                     </executions>                
   136                 </plugin>      
   137             </plugins>
   138           </build>
   139           <dependencies>
   140             <dependency>
   141                 <groupId>org.netbeans.html</groupId>
   142                 <artifactId>net.java.html.boot.fx</artifactId>
   143                 <version>${net.java.html.version}</version>
   144                 <scope>runtime</scope>
   145             </dependency>
   146           </dependencies>
   147       </profile>
   148       <profile>
   149           <id>bck2brwsr</id>
   150           <activation>
   151               <property>
   152                   <name>brwsr</name>
   153                   <value>bck2brwsr</value>
   154               </property>
   155           </activation>
   156           <build>
   157               <plugins>
   158                   <plugin>
   159                       <groupId>org.apache.maven.plugins</groupId>
   160                       <artifactId>maven-jar-plugin</artifactId>
   161                       <version>2.4</version>
   162                       <configuration>
   163                           <archive>
   164                               <manifest>
   165                                   <mainClass>${project.mainclass}</mainClass>
   166                                   <addClasspath>true</addClasspath>
   167                                   <classpathPrefix>lib/</classpathPrefix>
   168                               </manifest>
   169                           </archive>
   170                       </configuration>
   171                   </plugin>
   172                   <plugin>
   173                       <groupId>org.apidesign.bck2brwsr</groupId>
   174                       <artifactId>bck2brwsr-maven-plugin</artifactId>
   175                       <version>${bck2brwsr.version}</version>
   176                       <executions>
   177                           <execution>
   178                               <goals>
   179                                   <goal>brwsr</goal>
   180                               </goals>
   181                           </execution>
   182                       </executions>
   183                       <configuration>
   184                           <directory>${basedir}/src/main/webapp/</directory>
   185                           <startpage>${brwsr.startpage}</startpage>
   186                       </configuration>
   187                   </plugin>
   188                   <plugin>
   189                       <groupId>org.apache.maven.plugins</groupId>
   190                       <artifactId>maven-compiler-plugin</artifactId>
   191                       <configuration>
   192                           <compilerArguments>
   193                               <bootclasspath>netbeans.ignore.jdk.bootclasspath</bootclasspath>
   194                           </compilerArguments>
   195                       </configuration>
   196                   </plugin>
   197                   <plugin>
   198                       <artifactId>maven-assembly-plugin</artifactId>
   199                       <version>2.4</version>
   200                       <executions>
   201                           <execution>
   202                               <id>distro-assembly</id>
   203                               <phase>package</phase>
   204                               <goals>
   205                                   <goal>single</goal>
   206                               </goals>
   207                               <configuration>
   208                                   <descriptors>
   209                                       <descriptor>src/main/assembly/bck2brwsr.xml</descriptor>
   210                                   </descriptors>
   211                               </configuration>
   212                           </execution>
   213                       </executions>                
   214                   </plugin>      
   215               </plugins>
   216           </build>
   217           <dependencies>
   218               <dependency>
   219                   <groupId>org.apidesign.bck2brwsr</groupId>
   220                   <artifactId>emul</artifactId>
   221                   <version>${bck2brwsr.version}</version>
   222                   <classifier>rt</classifier>
   223               </dependency>
   224               <dependency>
   225                   <groupId>org.apidesign.bck2brwsr</groupId>
   226                   <artifactId>ko-bck2brwsr</artifactId>
   227                   <version>${bck2brwsr.version}</version>
   228                   <scope>runtime</scope>
   229               </dependency>
   230               <dependency>
   231                   <groupId>org.apidesign.bck2brwsr</groupId>
   232                   <artifactId>vm4brwsr</artifactId>
   233                   <classifier>js</classifier>
   234                   <type>zip</type>
   235                   <version>${bck2brwsr.version}</version>
   236                   <scope>provided</scope>
   237               </dependency>
   238           </dependencies>
   239       </profile>
   240       <profile>
   241           <id>dlvkbrwsr</id>
   242           <properties>
   243               <platform.version>4.1.1.4</platform.version>
   244               <android.plugin.version>3.7.0</android.plugin.version>
   245               <debug>false</debug>
   246           </properties>
   247           <dependencies>
   248               <dependency>
   249                   <groupId>com.google.android</groupId>
   250                   <artifactId>android</artifactId>
   251                   <version>${platform.version}</version>
   252                   <scope>provided</scope>
   253               </dependency>
   254               <dependency>
   255                   <groupId>org.apidesign.brwsr</groupId>
   256                   <artifactId>dlvkbrwsr</artifactId>
   257                   <version>0.5</version>
   258                   <type>jar</type>
   259               </dependency>
   260               <dependency>
   261                   <groupId>org.netbeans.html</groupId>
   262                   <artifactId>ko-ws-tyrus</artifactId>
   263                   <version>${net.java.html.version}</version>
   264                   <exclusions>
   265                       <exclusion>
   266                           <artifactId>org.json-osgi</artifactId>
   267                           <groupId>de.twentyeleven.skysail</groupId>
   268                       </exclusion>
   269                   </exclusions>
   270               </dependency>
   271           </dependencies>
   272           <build>
   273               <plugins>
   274                   <plugin>
   275                       <groupId>com.jayway.maven.plugins.android.generation2</groupId>
   276                       <artifactId>android-maven-plugin</artifactId>
   277                       <version>${android.plugin.version}</version>
   278                       <extensions>true</extensions>
   279                       <configuration>
   280                           <classifier>apk</classifier>
   281                           <attachJar>false</attachJar>
   282                           <apkDebug>debug</apkDebug>
   283                           <assetsDirectory>src/main/webapp</assetsDirectory>
   284                           <sdk>
   285                               <platform>16</platform>
   286                           </sdk>
   287                           <apk>
   288                               <metaIncludes>
   289                                   <metaInclude>services/org.apidesign.**</metaInclude>
   290                               </metaIncludes>
   291                           </apk>
   292                           <extractDuplicates>true</extractDuplicates>
   293                           <file>${project.build.directory}/${project.build.finalName}.apk</file>
   294                       </configuration>
   295                       <executions>
   296                           <execution>
   297                               <id>apk</id>
   298                               <goals>
   299                                   <goal>apk</goal>
   300                                   <goal>dex</goal>
   301                               </goals>
   302                           </execution>
   303                       </executions>
   304                   </plugin>
   305                   <plugin>
   306                       <groupId>org.apache.maven.plugins</groupId>
   307                       <artifactId>maven-install-plugin</artifactId>
   308                       <version>2.5.1</version>
   309                       <configuration>
   310                           <groupId>${project.groupId}</groupId>
   311                           <artifactId>${project.artifactId}</artifactId>
   312                           <version>${project.version}</version>
   313                           <file>${project.build.directory}/${project.build.finalName}.apk</file>
   314                           <packaging>apk</packaging>
   315                           <skip>true</skip>
   316                       </configuration>
   317                       <executions>
   318                           <execution>
   319                               <id>install-apk</id>
   320                               <phase>install</phase>
   321                               <goals>
   322                                   <goal>install-file</goal>
   323                               </goals>
   324                           </execution>
   325                       </executions>
   326                   </plugin>
   327               </plugins>
   328           </build>
   329       </profile>
   330       <profile>
   331           <id>teabrwsr</id>
   332           <build>
   333               <plugins>
   334                   <plugin>
   335                       <groupId>org.teavm</groupId>
   336                       <artifactId>teavm-maven-plugin</artifactId>
   337                       <version>${teavm.version}</version>
   338                       <dependencies>
   339                           <dependency>
   340                               <groupId>org.teavm</groupId>
   341                               <artifactId>teavm-classlib</artifactId>
   342                               <version>${teavm.version}</version>
   343                           </dependency>
   344                           <!-- This module adds html4j support. It mainly includes JavaScriptBuilder support.
   345                           Also there are some little patches to JCL emulation, that are required to pass TCK -->
   346                           <dependency>
   347                               <groupId>org.teavm</groupId>
   348                               <artifactId>teavm-html4j</artifactId>
   349                               <version>${teavm.version}</version>
   350                           </dependency>
   351                       </dependencies>
   352                       <executions>
   353                           <execution>
   354                               <id>generate-minesweeper</id>
   355                               <goals>
   356                                   <goal>build-javascript</goal>
   357                               </goals>
   358                               <phase>process-classes</phase>
   359                               <configuration>
   360                                   <!-- Whether we want TeaVM to minify (obfuscate) the generated JavaScript -->
   361                                   <minifying>false</minifying>
   362                                   <properties>
   363                                       <!-- This classes (separated with , ; space) will be available through vm.loadClass() -->
   364                                       <html4j.entryPoints>org.apidesign.demo.minesweeper.MainBrwsr</html4j.entryPoints>
   365                                   </properties>
   366                                   <!-- Don't include main page - we created it by ourselves -->
   367                                   <mainPageIncluded>false</mainPageIncluded>
   368                                   <!-- Merge runtime.js instead of putting as a separate file -->
   369                                   <runtime>MERGED</runtime>
   370                                   <!-- Name of the generated file -->
   371                                   <targetFileName>bck2brwsr.js</targetFileName>
   372                                   <targetDirectory>${project.build.directory}/teavm</targetDirectory>
   373                                   <!-- This transformer adds null checks before virtual calls. It is not included
   374                                   by default as we don't always need these null checks -->
   375                                   <transformers>
   376                                       <param>org.teavm.javascript.NullPointerExceptionTransformer</param>
   377                                   </transformers>
   378                               </configuration>
   379                           </execution>
   380                       </executions>
   381                   </plugin>
   382                   <plugin>
   383                       <artifactId>maven-assembly-plugin</artifactId>
   384                       <version>2.4</version>
   385                       <executions>
   386                           <execution>
   387                               <id>distro-assembly</id>
   388                               <phase>package</phase>
   389                               <goals>
   390                                   <goal>single</goal>
   391                               </goals>
   392                               <configuration>
   393                                   <descriptors>
   394                                       <descriptor>src/main/assembly/teabrwsr.xml</descriptor>
   395                                   </descriptors>
   396                               </configuration>
   397                           </execution>
   398                       </executions>                
   399                   </plugin>      
   400               </plugins>
   401           </build>
   402       </profile>
   403       <profile>
   404           <id>nbrwsr</id>
   405           <dependencies>
   406               <dependency>
   407                   <groupId>org.netbeans.html</groupId>
   408                   <artifactId>nbrwsr</artifactId>
   409                   <version>${net.java.html.version}</version>
   410                   <scope>compile</scope>
   411               </dependency>
   412           </dependencies>
   413           <build>
   414               <plugins>
   415                   <plugin>
   416                       <groupId>org.apache.maven.plugins</groupId>
   417                       <artifactId>maven-resources-plugin</artifactId>
   418                       <version>2.6</version>
   419                       <executions>
   420                           <execution>
   421                               <id>include-webpages</id>
   422                               <goals>
   423                                   <goal>copy-resources</goal>
   424                               </goals>
   425                               <phase>process-resources</phase>
   426                               <configuration>
   427                                   <outputDirectory>${basedir}/target/classes/org/apidesign/demo/minesweeper</outputDirectory>
   428                                   <overwrite>true</overwrite>
   429                                   <resources>          
   430                                       <resource>
   431                                           <directory>src/main/webapp/pages</directory>
   432                                       </resource>
   433                                   </resources>              
   434                               </configuration>   
   435                           </execution>
   436                       </executions>
   437                   </plugin>
   438                   <plugin>
   439                       <groupId>org.codehaus.mojo</groupId>
   440                       <artifactId>nbm-maven-plugin</artifactId>
   441                       <version>3.13</version>
   442                       <extensions>true</extensions>
   443                       <executions>
   444                           <execution>
   445                               <id>default-manifest</id>
   446                               <phase>process-classes</phase>
   447                               <goals>
   448                                   <goal>manifest</goal>
   449                               </goals>
   450                               <configuration>
   451                                   <useOSGiDependencies>true</useOSGiDependencies>
   452                                   <brandingToken>html4j4nb</brandingToken>
   453                                   <cluster>extra</cluster>
   454                                   <verifyIntegrity>false</verifyIntegrity>
   455                               </configuration>
   456                           </execution>                       
   457                           <execution>
   458                               <id>default-nbm</id>
   459                               <phase>package</phase>
   460                               <goals>
   461                                   <goal>nbm</goal>
   462                               </goals>
   463                               <configuration>
   464                                   <useOSGiDependencies>true</useOSGiDependencies>
   465                                   <cluster>extra</cluster>
   466                                   <verifyIntegrity>false</verifyIntegrity>
   467                               </configuration>
   468                           </execution>
   469                       </executions>
   470                       <configuration>
   471                           <useOSGiDependencies>true</useOSGiDependencies>
   472                           <brandingToken>html4j4nb</brandingToken>
   473                           <cluster>html4j4nb</cluster>
   474                           <verifyIntegrity>false</verifyIntegrity>
   475                       </configuration>
   476                   </plugin>                      
   477 
   478                   <plugin>
   479                       <groupId>org.apache.maven.plugins</groupId>
   480                       <artifactId>maven-jar-plugin</artifactId>
   481                       <configuration>
   482                           <!-- to have the jar plugin pickup the nbm generated manifest -->
   483                           <useDefaultManifestFile>true</useDefaultManifestFile>
   484                       </configuration>
   485                   </plugin>
   486               </plugins>
   487           </build>
   488       </profile>      
   489   </profiles>  
   490 </project>