minesweeper/pom.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Mon, 10 Mar 2014 13:05:18 +0100
branchibrwsr
changeset 102 09a95867af5e
parent 101 5ef40158eb9c
child 122 898f93ea65e2
permissions -rw-r--r--
Copy the webapp/pages into the final JAR, so xtrnlbrwsr can find them
     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.robovm</groupId>
    27                 <artifactId>robovm-maven-plugin</artifactId>
    28                 <version>0.0.8.1</version>
    29                 <configuration>
    30                     <config>
    31                         <mainClass>org.apidesign.demo.minesweeper.RoboVMJFXLauncher</mainClass>
    32                         <forceLinkClasses>
    33                             <pattern>java.util.logging.ConsoleHandler</pattern>
    34                             <pattern>java.util.logging.SimpleFormatter</pattern>
    35                             <pattern>org.netbeans.html.ko4j.KO4J</pattern>
    36                             <pattern>org.netbeans.html.sound.impl.BrowserAudioEnv</pattern>
    37                         </forceLinkClasses>                        
    38                     </config>
    39                     <includeJFX>false</includeJFX>
    40                 </configuration>
    41           </plugin>
    42           <plugin>
    43               <groupId>org.apache.maven.plugins</groupId>
    44               <artifactId>maven-compiler-plugin</artifactId>
    45               <version>2.3.2</version>
    46               <configuration>
    47                   <source>1.6</source>
    48                   <target>1.6</target>
    49               </configuration>
    50           </plugin>
    51           <plugin>
    52               <groupId>org.apache.maven.plugins</groupId>
    53               <artifactId>maven-resources-plugin</artifactId>
    54               <version>2.6</version>
    55               <executions>
    56                   <execution>
    57                       <id>copy-resources</id>
    58                       <!-- here the phase you need -->
    59                       <phase>process-resources</phase>
    60                       <goals>
    61                           <goal>copy-resources</goal>
    62                       </goals>
    63                       <configuration>
    64                           <outputDirectory>${basedir}/target/classes/org/apidesign/demo/minesweeper/</outputDirectory>
    65                           <resources>          
    66                               <resource>
    67                                   <directory>src/main/webapp/</directory>
    68                                   <filtering>true</filtering>
    69                               </resource>
    70                           </resources>              
    71                       </configuration>            
    72                   </execution>
    73               </executions>
    74           </plugin>
    75           <plugin>
    76               <groupId>org.apache.maven.plugins</groupId>
    77               <artifactId>maven-jar-plugin</artifactId>
    78               <version>2.4</version>
    79               <configuration>
    80                   <archive>
    81                       <manifest>
    82                           <mainClass>${project.mainclass}</mainClass>
    83                           <addClasspath>true</addClasspath>
    84                           <classpathPrefix>lib/</classpathPrefix>
    85                       </manifest>
    86                   </archive>
    87               </configuration>
    88           </plugin>
    89           <plugin>
    90               <groupId>org.codehaus.mojo</groupId>
    91               <artifactId>exec-maven-plugin</artifactId>
    92               <version>1.2.1</version>
    93               <configuration>
    94                   <systemProperties>
    95                       <systemProperty>
    96                           <key>browser.rootdir</key>
    97                           <value>${basedir}/src/main/webapp/</value>
    98                       </systemProperty>
    99                   </systemProperties>
   100                   <mainClass>${project.mainclass}</mainClass>
   101               </configuration>
   102           </plugin>      
   103       </plugins>
   104   </build>
   105   <dependencies>
   106     <dependency>
   107         <groupId>org.netbeans.html</groupId>
   108         <artifactId>net.java.html.json</artifactId>
   109         <version>${net.java.html.version}</version>
   110     </dependency>
   111     <dependency>
   112         <groupId>org.netbeans.html</groupId>
   113         <artifactId>net.java.html.boot</artifactId>
   114         <version>${net.java.html.version}</version>
   115     </dependency>
   116     <dependency>
   117         <groupId>org.netbeans.html</groupId>
   118         <artifactId>net.java.html.sound</artifactId>
   119         <version>${net.java.html.version}</version>
   120     </dependency>
   121     <dependency>
   122         <groupId>org.netbeans.html</groupId>
   123         <artifactId>ko4j</artifactId>
   124         <version>${net.java.html.version}</version>
   125     </dependency>
   126     <dependency>
   127       <groupId>org.testng</groupId>
   128       <artifactId>testng</artifactId>
   129       <version>6.7</version>
   130       <scope>test</scope>
   131     </dependency>
   132     <dependency>
   133       <groupId>org.apidesign.html</groupId>
   134       <artifactId>xtrnlbrwsr</artifactId>
   135       <version>0.7-SNAPSHOT</version>
   136     </dependency>
   137     <dependency>
   138         <groupId>org.robovm</groupId>
   139         <artifactId>robovm-rt</artifactId>
   140         <version>0.0.8</version>
   141     </dependency>
   142     <dependency>
   143         <groupId>org.robovm</groupId>
   144         <artifactId>robovm-cocoatouch</artifactId>
   145         <version>0.0.8</version>
   146     </dependency>    
   147   </dependencies>
   148   <profiles>
   149       <profile>
   150           <id>fxbrwsr</id>
   151           <activation>
   152               <activeByDefault>true</activeByDefault>
   153           </activation>
   154           <build>
   155             <plugins>
   156                 <plugin>
   157                     <artifactId>maven-assembly-plugin</artifactId>
   158                     <version>2.4</version>
   159                     <executions>
   160                         <execution>
   161                             <id>distro-assembly</id>
   162                             <phase>package</phase>
   163                             <goals>
   164                                 <goal>single</goal>
   165                             </goals>
   166                             <configuration>
   167                                 <descriptors>
   168                                     <descriptor>src/main/assembly/html.java.net.xml</descriptor>
   169                                 </descriptors>
   170                             </configuration>
   171                         </execution>
   172                     </executions>                
   173                 </plugin>      
   174             </plugins>
   175           </build>
   176           <dependencies>
   177             <dependency>
   178                 <groupId>org.netbeans.html</groupId>
   179                 <artifactId>net.java.html.boot.fx</artifactId>
   180                 <version>${net.java.html.version}</version>
   181                 <scope>runtime</scope>
   182             </dependency>
   183           </dependencies>
   184       </profile>
   185       <profile>
   186           <id>bck2brwsr</id>
   187           <activation>
   188               <property>
   189                   <name>brwsr</name>
   190                   <value>bck2brwsr</value>
   191               </property>
   192           </activation>
   193           <build>
   194               <plugins>
   195                   <plugin>
   196                       <groupId>org.apidesign.bck2brwsr</groupId>
   197                       <artifactId>bck2brwsr-maven-plugin</artifactId>
   198                       <version>${bck2brwsr.version}</version>
   199                       <executions>
   200                           <execution>
   201                               <goals>
   202                                   <goal>brwsr</goal>
   203                               </goals>
   204                           </execution>
   205                       </executions>
   206                       <configuration>
   207                           <directory>${basedir}/src/main/webapp/</directory>
   208                           <startpage>${brwsr.startpage}</startpage>
   209                       </configuration>
   210                   </plugin>
   211                   <plugin>
   212                       <groupId>org.apache.maven.plugins</groupId>
   213                       <artifactId>maven-compiler-plugin</artifactId>
   214                       <configuration>
   215                           <compilerArguments>
   216                               <bootclasspath>netbeans.ignore.jdk.bootclasspath</bootclasspath>
   217                           </compilerArguments>
   218                       </configuration>
   219                   </plugin>
   220                   <plugin>
   221                       <artifactId>maven-assembly-plugin</artifactId>
   222                       <version>2.4</version>
   223                       <executions>
   224                           <execution>
   225                               <id>distro-assembly</id>
   226                               <phase>package</phase>
   227                               <goals>
   228                                   <goal>single</goal>
   229                               </goals>
   230                               <configuration>
   231                                   <descriptors>
   232                                       <descriptor>src/main/assembly/bck2brwsr.xml</descriptor>
   233                                   </descriptors>
   234                               </configuration>
   235                           </execution>
   236                       </executions>                
   237                   </plugin>      
   238               </plugins>
   239           </build>
   240           <dependencies>
   241               <dependency>
   242                   <groupId>org.apidesign.bck2brwsr</groupId>
   243                   <artifactId>emul</artifactId>
   244                   <version>${bck2brwsr.version}</version>
   245                   <classifier>rt</classifier>
   246               </dependency>
   247               <dependency>
   248                   <groupId>org.apidesign.bck2brwsr</groupId>
   249                   <artifactId>ko-bck2brwsr</artifactId>
   250                   <version>${bck2brwsr.version}</version>
   251                   <scope>runtime</scope>
   252               </dependency>
   253               <dependency>
   254                   <groupId>org.apidesign.bck2brwsr</groupId>
   255                   <artifactId>vm4brwsr</artifactId>
   256                   <classifier>js</classifier>
   257                   <type>zip</type>
   258                   <version>${bck2brwsr.version}</version>
   259                   <scope>provided</scope>
   260               </dependency>
   261           </dependencies>
   262       </profile>
   263       <profile>
   264           <id>dlvkbrwsr</id>
   265           <activation>
   266               <property>
   267                   <name>android.sdk.path</name>
   268               </property>
   269           </activation>
   270           <properties>
   271               <platform.version>4.1.1.4</platform.version>
   272               <android.plugin.version>3.7.0</android.plugin.version>
   273               <debug>false</debug>
   274           </properties>
   275           <dependencies>
   276               <dependency>
   277                   <groupId>com.google.android</groupId>
   278                   <artifactId>android</artifactId>
   279                   <version>${platform.version}</version>
   280                   <scope>provided</scope>
   281               </dependency>
   282               <dependency>
   283                   <groupId>org.apidesign.html</groupId>
   284                   <artifactId>dlvkbrwsr</artifactId>
   285                   <version>0.2-SNAPSHOT</version>
   286                   <type>jar</type>
   287               </dependency>
   288               <dependency>
   289                   <groupId>org.netbeans.html</groupId>
   290                   <artifactId>ko-ws-tyrus</artifactId>
   291                   <version>${net.java.html.version}</version>
   292                   <exclusions>
   293                       <exclusion>
   294                           <artifactId>org.json-osgi</artifactId>
   295                           <groupId>de.twentyeleven.skysail</groupId>
   296                       </exclusion>
   297                   </exclusions>
   298               </dependency>
   299           </dependencies>
   300           <build>
   301               <plugins>
   302                   <plugin>
   303                       <groupId>com.jayway.maven.plugins.android.generation2</groupId>
   304                       <artifactId>android-maven-plugin</artifactId>
   305                       <version>${android.plugin.version}</version>
   306                       <extensions>true</extensions>
   307                       <configuration>
   308                           <classifier>apk</classifier>
   309                           <attachJar>false</attachJar>
   310                           <apkDebug>debug</apkDebug>
   311                           <assetsDirectory>src/main/webapp</assetsDirectory>
   312                           <sdk>
   313                               <platform>16</platform>
   314                           </sdk>
   315                           <apk>
   316                               <metaIncludes>
   317                                   <metaInclude>services/org.apidesign.**</metaInclude>
   318                               </metaIncludes>
   319                           </apk>
   320                           <file>${project.build.directory}/${project.build.finalName}.apk</file>
   321                       </configuration>
   322                       <executions>
   323                           <execution>
   324                               <id>apk</id>
   325                               <goals>
   326                                   <goal>apk</goal>
   327                                   <goal>dex</goal>
   328                               </goals>
   329                           </execution>
   330                       </executions>
   331                   </plugin>
   332                   <plugin>
   333                       <groupId>org.apache.maven.plugins</groupId>
   334                       <artifactId>maven-install-plugin</artifactId>
   335                       <version>2.5.1</version>
   336                       <configuration>
   337                           <groupId>${project.groupId}</groupId>
   338                           <artifactId>${project.artifactId}</artifactId>
   339                           <version>${project.version}</version>
   340                           <file>${project.build.directory}/${project.build.finalName}.apk</file>
   341                           <packaging>apk</packaging>
   342                           <skip>true</skip>
   343                       </configuration>
   344                       <executions>
   345                           <execution>
   346                               <id>install-apk</id>
   347                               <phase>install</phase>
   348                               <goals>
   349                                   <goal>install-file</goal>
   350                               </goals>
   351                           </execution>
   352                       </executions>
   353                   </plugin>
   354               </plugins>
   355           </build>
   356           
   357       </profile>
   358   </profiles>  
   359 </project>