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