Creating ibrwsr profile and using classical component injection to find the right presenter ibrwsr
authorJaroslav Tulach <jtulach@netbeans.org>
Thu, 27 Mar 2014 15:37:25 +0100
branchibrwsr
changeset 125d7b40912b16d
parent 124 533c2be1747c
child 126 a090087ae580
Creating ibrwsr profile and using classical component injection to find the right presenter
minesweeper/nbactions-ibrwsr.xml
minesweeper/pom.xml
minesweeper/src/main/java/org/apidesign/demo/minesweeper/Main.java
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/minesweeper/nbactions-ibrwsr.xml	Thu Mar 27 15:37:25 2014 +0100
     1.3 @@ -0,0 +1,35 @@
     1.4 +<?xml version="1.0" encoding="UTF-8"?>
     1.5 +<!--
     1.6 +
     1.7 +    The MIT License (MIT)
     1.8 +
     1.9 +    Copyright (C) 2013 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
    1.10 +
    1.11 +    Permission is hereby granted, free of charge, to any person obtaining a copy
    1.12 +    of this software and associated documentation files (the "Software"), to deal
    1.13 +    in the Software without restriction, including without limitation the rights
    1.14 +    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    1.15 +    copies of the Software, and to permit persons to whom the Software is
    1.16 +    furnished to do so, subject to the following conditions:
    1.17 +
    1.18 +    The above copyright notice and this permission notice shall be included in
    1.19 +    all copies or substantial portions of the Software.
    1.20 +
    1.21 +    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    1.22 +    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    1.23 +    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    1.24 +    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    1.25 +    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    1.26 +    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    1.27 +    THE SOFTWARE.
    1.28 +
    1.29 +-->
    1.30 +<actions>
    1.31 +    <action>
    1.32 +        <actionName>run</actionName>
    1.33 +        <goals>
    1.34 +            <goal>package</goal>
    1.35 +            <goal>robovm:ipad-sim</goal>
    1.36 +        </goals>
    1.37 +    </action>
    1.38 +</actions>
     2.1 --- a/minesweeper/pom.xml	Thu Mar 27 15:14:48 2014 +0100
     2.2 +++ b/minesweeper/pom.xml	Thu Mar 27 15:37:25 2014 +0100
     2.3 @@ -23,24 +23,6 @@
     2.4    <build>
     2.5        <plugins>
     2.6            <plugin>
     2.7 -                <groupId>org.robovm</groupId>
     2.8 -                <artifactId>robovm-maven-plugin</artifactId>
     2.9 -                <version>0.0.10.1</version>
    2.10 -                <configuration>
    2.11 -                    <config>
    2.12 -                        <mainClass>org.apidesign.demo.minesweeper.Main</mainClass>
    2.13 -                        <forceLinkClasses>
    2.14 -                            <pattern>java.util.logging.ConsoleHandler</pattern>
    2.15 -                            <pattern>java.util.logging.SimpleFormatter</pattern>
    2.16 -                            <pattern>org.netbeans.html.ko4j.KO4J</pattern>
    2.17 -                            <pattern>org.netbeans.html.sound.impl.BrowserAudioEnv</pattern>
    2.18 -                            <pattern>org.apidesign.brwsr.IBrwsrPrsntr</pattern>
    2.19 -                        </forceLinkClasses>                        
    2.20 -                    </config>
    2.21 -                    <includeJFX>false</includeJFX>
    2.22 -                </configuration>
    2.23 -          </plugin>
    2.24 -          <plugin>
    2.25                <groupId>org.apache.maven.plugins</groupId>
    2.26                <artifactId>maven-compiler-plugin</artifactId>
    2.27                <version>2.3.2</version>
    2.28 @@ -141,11 +123,6 @@
    2.29        <version>6.7</version>
    2.30        <scope>test</scope>
    2.31      </dependency>
    2.32 -    <dependency>
    2.33 -      <groupId>org.apidesign.brwsr</groupId>
    2.34 -      <artifactId>ibrwsr</artifactId>
    2.35 -      <version>1.0-SNAPSHOT</version>
    2.36 -    </dependency>
    2.37    </dependencies>
    2.38    <profiles>
    2.39        <profile>
    2.40 @@ -426,6 +403,39 @@
    2.41            </build>
    2.42        </profile>
    2.43        <profile>
    2.44 +          <id>ibrwsr</id>
    2.45 +          <dependencies>
    2.46 +              <dependency>
    2.47 +                  <groupId>org.apidesign.brwsr</groupId>
    2.48 +                  <artifactId>ibrwsr</artifactId>
    2.49 +                  <version>1.0-SNAPSHOT</version>
    2.50 +                  <scope>runtime</scope>
    2.51 +              </dependency>
    2.52 +          </dependencies>
    2.53 +          <build>
    2.54 +              <plugins>
    2.55 +                  <plugin>
    2.56 +                      <groupId>org.robovm</groupId>
    2.57 +                      <artifactId>robovm-maven-plugin</artifactId>
    2.58 +                      <version>0.0.10.1</version>
    2.59 +                      <configuration>
    2.60 +                          <config>
    2.61 +                              <mainClass>org.apidesign.demo.minesweeper.Main</mainClass>
    2.62 +                              <forceLinkClasses>
    2.63 +                                  <pattern>java.util.logging.ConsoleHandler</pattern>
    2.64 +                                  <pattern>java.util.logging.SimpleFormatter</pattern>
    2.65 +                                  <pattern>org.netbeans.html.ko4j.KO4J</pattern>
    2.66 +                                  <pattern>org.netbeans.html.sound.impl.BrowserAudioEnv</pattern>
    2.67 +                                  <pattern>org.apidesign.brwsr.IBrwsrPrsntr</pattern>
    2.68 +                              </forceLinkClasses>                        
    2.69 +                          </config>
    2.70 +                          <includeJFX>false</includeJFX>
    2.71 +                      </configuration>
    2.72 +                  </plugin>
    2.73 +              </plugins>
    2.74 +          </build>
    2.75 +      </profile>      
    2.76 +      <profile>
    2.77            <id>nbrwsr</id>
    2.78            <dependencies>
    2.79                <dependency>
     3.1 --- a/minesweeper/src/main/java/org/apidesign/demo/minesweeper/Main.java	Thu Mar 27 15:14:48 2014 +0100
     3.2 +++ b/minesweeper/src/main/java/org/apidesign/demo/minesweeper/Main.java	Thu Mar 27 15:37:25 2014 +0100
     3.3 @@ -37,7 +37,7 @@
     3.4  
     3.5      /** Launches the browser */
     3.6      public static void main(String... args) throws Exception {
     3.7 -        BrowserBuilder.newBrowser(new org.apidesign.brwsr.IBrwsrPrsntr()).
     3.8 +        BrowserBuilder.newBrowser().
     3.9              loadPage("pages/index.html").
    3.10              loadClass(MinesModel.class).
    3.11              invoke("main", args).