minesweeper/pom.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Wed, 19 Mar 2014 16:01:17 +0100
branchnbrwsr
changeset 111 2c3e79e7d61c
parent 110 fcdfcb9998eb
child 112 41b280ebabf3
permissions -rw-r--r--
Can package minesweeper as an NBM file
     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-jar-plugin</artifactId>
    37               <version>2.4</version>
    38               <configuration>
    39                   <archive>
    40                       <manifest>
    41                           <mainClass>${project.mainclass}</mainClass>
    42                           <addClasspath>true</addClasspath>
    43                           <classpathPrefix>lib/</classpathPrefix>
    44                       </manifest>
    45                   </archive>
    46               </configuration>
    47           </plugin>
    48           <plugin>
    49               <groupId>org.codehaus.mojo</groupId>
    50               <artifactId>exec-maven-plugin</artifactId>
    51               <version>1.2.1</version>
    52               <configuration>
    53                   <systemProperties>
    54                       <systemProperty>
    55                           <key>browser.rootdir</key>
    56                           <value>${basedir}/src/main/webapp/</value>
    57                       </systemProperty>
    58                   </systemProperties>
    59                   <mainClass>${project.mainclass}</mainClass>
    60               </configuration>
    61           </plugin>      
    62       </plugins>
    63   </build>
    64   <dependencies>
    65     <dependency>
    66         <groupId>org.netbeans.html</groupId>
    67         <artifactId>net.java.html.json</artifactId>
    68         <version>${net.java.html.version}</version>
    69     </dependency>
    70     <dependency>
    71         <groupId>org.netbeans.html</groupId>
    72         <artifactId>net.java.html.boot</artifactId>
    73         <version>${net.java.html.version}</version>
    74     </dependency>
    75     <dependency>
    76         <groupId>org.netbeans.html</groupId>
    77         <artifactId>net.java.html</artifactId>
    78         <version>${net.java.html.version}</version>
    79     </dependency>
    80     <dependency>
    81         <groupId>org.netbeans.html</groupId>
    82         <artifactId>net.java.html.sound</artifactId>
    83         <version>${net.java.html.version}</version>
    84     </dependency>
    85     <dependency>
    86         <groupId>org.netbeans.html</groupId>
    87         <artifactId>ko4j</artifactId>
    88         <version>${net.java.html.version}</version>
    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                     <artifactId>maven-assembly-plugin</artifactId>
   107                     <version>2.4</version>
   108                     <executions>
   109                         <execution>
   110                             <id>distro-assembly</id>
   111                             <phase>package</phase>
   112                             <goals>
   113                                 <goal>single</goal>
   114                             </goals>
   115                             <configuration>
   116                                 <descriptors>
   117                                     <descriptor>src/main/assembly/html.java.net.xml</descriptor>
   118                                 </descriptors>
   119                             </configuration>
   120                         </execution>
   121                     </executions>                
   122                 </plugin>      
   123             </plugins>
   124           </build>
   125           <dependencies>
   126             <dependency>
   127                 <groupId>org.netbeans.html</groupId>
   128                 <artifactId>net.java.html.boot.fx</artifactId>
   129                 <version>${net.java.html.version}</version>
   130                 <scope>runtime</scope>
   131             </dependency>
   132           </dependencies>
   133       </profile>
   134       <profile>
   135           <id>bck2brwsr</id>
   136           <activation>
   137               <property>
   138                   <name>brwsr</name>
   139                   <value>bck2brwsr</value>
   140               </property>
   141           </activation>
   142           <build>
   143               <plugins>
   144                   <plugin>
   145                       <groupId>org.apidesign.bck2brwsr</groupId>
   146                       <artifactId>bck2brwsr-maven-plugin</artifactId>
   147                       <version>${bck2brwsr.version}</version>
   148                       <executions>
   149                           <execution>
   150                               <goals>
   151                                   <goal>brwsr</goal>
   152                               </goals>
   153                           </execution>
   154                       </executions>
   155                       <configuration>
   156                           <directory>${basedir}/src/main/webapp/</directory>
   157                           <startpage>${brwsr.startpage}</startpage>
   158                       </configuration>
   159                   </plugin>
   160                   <plugin>
   161                       <groupId>org.apache.maven.plugins</groupId>
   162                       <artifactId>maven-compiler-plugin</artifactId>
   163                       <configuration>
   164                           <compilerArguments>
   165                               <bootclasspath>netbeans.ignore.jdk.bootclasspath</bootclasspath>
   166                           </compilerArguments>
   167                       </configuration>
   168                   </plugin>
   169                   <plugin>
   170                       <artifactId>maven-assembly-plugin</artifactId>
   171                       <version>2.4</version>
   172                       <executions>
   173                           <execution>
   174                               <id>distro-assembly</id>
   175                               <phase>package</phase>
   176                               <goals>
   177                                   <goal>single</goal>
   178                               </goals>
   179                               <configuration>
   180                                   <descriptors>
   181                                       <descriptor>src/main/assembly/bck2brwsr.xml</descriptor>
   182                                   </descriptors>
   183                               </configuration>
   184                           </execution>
   185                       </executions>                
   186                   </plugin>      
   187               </plugins>
   188           </build>
   189           <dependencies>
   190               <dependency>
   191                   <groupId>org.apidesign.bck2brwsr</groupId>
   192                   <artifactId>emul</artifactId>
   193                   <version>${bck2brwsr.version}</version>
   194                   <classifier>rt</classifier>
   195               </dependency>
   196               <dependency>
   197                   <groupId>org.apidesign.bck2brwsr</groupId>
   198                   <artifactId>ko-bck2brwsr</artifactId>
   199                   <version>${bck2brwsr.version}</version>
   200                   <scope>runtime</scope>
   201               </dependency>
   202               <dependency>
   203                   <groupId>org.apidesign.bck2brwsr</groupId>
   204                   <artifactId>vm4brwsr</artifactId>
   205                   <classifier>js</classifier>
   206                   <type>zip</type>
   207                   <version>${bck2brwsr.version}</version>
   208                   <scope>provided</scope>
   209               </dependency>
   210           </dependencies>
   211       </profile>
   212       <profile>
   213           <id>dlvkbrwsr</id>
   214           <properties>
   215               <platform.version>4.1.1.4</platform.version>
   216               <android.plugin.version>3.7.0</android.plugin.version>
   217               <debug>false</debug>
   218           </properties>
   219           <dependencies>
   220               <dependency>
   221                   <groupId>com.google.android</groupId>
   222                   <artifactId>android</artifactId>
   223                   <version>${platform.version}</version>
   224                   <scope>provided</scope>
   225               </dependency>
   226               <dependency>
   227                   <groupId>org.apidesign.brwsr</groupId>
   228                   <artifactId>dlvkbrwsr</artifactId>
   229                   <version>0.5</version>
   230                   <type>jar</type>
   231               </dependency>
   232               <dependency>
   233                   <groupId>org.netbeans.html</groupId>
   234                   <artifactId>ko-ws-tyrus</artifactId>
   235                   <version>${net.java.html.version}</version>
   236                   <exclusions>
   237                       <exclusion>
   238                           <artifactId>org.json-osgi</artifactId>
   239                           <groupId>de.twentyeleven.skysail</groupId>
   240                       </exclusion>
   241                   </exclusions>
   242               </dependency>
   243           </dependencies>
   244           <build>
   245               <plugins>
   246                   <plugin>
   247                       <groupId>com.jayway.maven.plugins.android.generation2</groupId>
   248                       <artifactId>android-maven-plugin</artifactId>
   249                       <version>${android.plugin.version}</version>
   250                       <extensions>true</extensions>
   251                       <configuration>
   252                           <classifier>apk</classifier>
   253                           <attachJar>false</attachJar>
   254                           <apkDebug>debug</apkDebug>
   255                           <assetsDirectory>src/main/webapp</assetsDirectory>
   256                           <sdk>
   257                               <platform>16</platform>
   258                           </sdk>
   259                           <apk>
   260                               <metaIncludes>
   261                                   <metaInclude>services/org.apidesign.**</metaInclude>
   262                               </metaIncludes>
   263                           </apk>
   264                           <extractDuplicates>true</extractDuplicates>
   265                           <file>${project.build.directory}/${project.build.finalName}.apk</file>
   266                       </configuration>
   267                       <executions>
   268                           <execution>
   269                               <id>apk</id>
   270                               <goals>
   271                                   <goal>apk</goal>
   272                                   <goal>dex</goal>
   273                               </goals>
   274                           </execution>
   275                       </executions>
   276                   </plugin>
   277                   <plugin>
   278                       <groupId>org.apache.maven.plugins</groupId>
   279                       <artifactId>maven-install-plugin</artifactId>
   280                       <version>2.5.1</version>
   281                       <configuration>
   282                           <groupId>${project.groupId}</groupId>
   283                           <artifactId>${project.artifactId}</artifactId>
   284                           <version>${project.version}</version>
   285                           <file>${project.build.directory}/${project.build.finalName}.apk</file>
   286                           <packaging>apk</packaging>
   287                           <skip>true</skip>
   288                       </configuration>
   289                       <executions>
   290                           <execution>
   291                               <id>install-apk</id>
   292                               <phase>install</phase>
   293                               <goals>
   294                                   <goal>install-file</goal>
   295                               </goals>
   296                           </execution>
   297                       </executions>
   298                   </plugin>
   299               </plugins>
   300           </build>
   301           
   302       </profile>
   303       <profile>
   304           <id>nbrwsr</id>
   305           <build>
   306               <plugins>
   307                   <plugin>
   308                       <groupId>org.codehaus.mojo</groupId>
   309                       <artifactId>nbm-maven-plugin</artifactId>
   310                       <version>3.13</version>
   311                       <extensions>true</extensions>
   312                       <executions>
   313                           <execution>
   314                               <id>default-manifest</id>
   315                               <phase>process-classes</phase>
   316                               <goals>
   317                                   <goal>manifest</goal>
   318                               </goals>
   319                               <configuration>
   320                                   <useOSGiDependencies>true</useOSGiDependencies>
   321                                   <brandingToken>html4j4nb</brandingToken>
   322                                   <cluster>html4j4nb</cluster>
   323                                   <verifyIntegrity>false</verifyIntegrity>
   324                               </configuration>
   325                           </execution>                       
   326                           <execution>
   327                               <id>default-nbm</id>
   328                               <phase>package</phase>
   329                               <goals>
   330                                   <goal>nbm</goal>
   331                               </goals>
   332                               <configuration>
   333                                   <useOSGiDependencies>true</useOSGiDependencies>
   334                                   <cluster>html4j4nb</cluster>
   335                                   <verifyIntegrity>false</verifyIntegrity>
   336                               </configuration>
   337                           </execution>
   338                       </executions>
   339                       <configuration>
   340                           <useOSGiDependencies>true</useOSGiDependencies>
   341                           <brandingToken>html4j4nb</brandingToken>
   342                           <cluster>html4j4nb</cluster>
   343                           <verifyIntegrity>false</verifyIntegrity>
   344                       </configuration>
   345                   </plugin>                      
   346 
   347                   <plugin>
   348                       <groupId>org.apache.maven.plugins</groupId>
   349                       <artifactId>maven-jar-plugin</artifactId>
   350                       <configuration>
   351                           <!-- to have the jar plugin pickup the nbm generated manifest -->
   352                           <useDefaultManifestFile>true</useDefaultManifestFile>
   353                       </configuration>
   354                   </plugin>
   355               </plugins>
   356           </build>
   357       </profile>      
   358   </profiles>  
   359 </project>