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