Browse code

refactor maven build

devnewton authored on 08/08/2014 at 09:57:44
Showing 17 changed files
... ...
@@ -2,20 +2,20 @@
2 2
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 3
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4 4
     <modelVersion>4.0.0</modelVersion>
5
+    <parent>
6
+        <groupId>im.bci.newtonadv</groupId>
7
+        <artifactId>newton-adventure</artifactId>
8
+        <version>1.16-SNAPSHOT</version>
9
+        <relativePath>../pom.xml</relativePath>
10
+    </parent>
5 11
     <groupId>im.bci.newtonadv</groupId>
6 12
     <artifactId>newton_adventure_editor</artifactId>
7 13
     <packaging>jar</packaging>
8
-    <version>1.0</version>
9 14
     <name>newton_adventure_editor</name>
10 15
     <build>
11 16
         <plugins>
12 17
             <plugin>
13 18
                 <artifactId>maven-compiler-plugin</artifactId>
14
-                <version>3.1</version>
15
-                <configuration>
16
-                    <source>1.7</source>
17
-                    <target>1.7</target>
18
-                </configuration>
19 19
             </plugin>
20 20
             <plugin>
21 21
                 <groupId>org.apache.maven.plugins</groupId>
... ...
@@ -625,7 +625,8 @@ public class XMLMapTransformer implements MapReader {
625 625
                     if (cdata == null) {
626 626
                         logger.warn("layer <data> tag enclosed no data. (empty data tag)");
627 627
                     } else {
628
-                        try (Scanner scanner = new Scanner(cdata.getNodeValue().trim())) {
628
+                        Scanner scanner = new Scanner(cdata.getNodeValue().trim());
629
+                        try {
629 630
                             scanner.useDelimiter("[\\s]*,[\\s]*");
630 631
                             for (int y = 0; y < ml.getHeight(); ++y) {
631 632
                                 for (int x = 0; x < ml.getWidth(); ++x) {
... ...
@@ -640,6 +641,8 @@ public class XMLMapTransformer implements MapReader {
640 640
                                     }
641 641
                                 }
642 642
                             }
643
+                        } finally {
644
+                            scanner.close();
643 645
                         }
644 646
                     }
645 647
                 } else {
... ...
@@ -47,26 +47,10 @@ SUCH DAMAGE. */ -->
47 47
         <plugins>
48 48
             <plugin>
49 49
                 <artifactId>maven-compiler-plugin</artifactId>
50
-                <version>3.1</version>
51
-                <configuration>
52
-                    <source>1.7</source>
53
-                    <target>1.7</target>
54
-                </configuration>
55 50
             </plugin>
56 51
             <plugin>
57 52
                 <groupId>org.apache.maven.plugins</groupId>
58 53
                 <artifactId>maven-source-plugin</artifactId>
59
-                <version>2.2.1</version>
60
-                <!-- build a -sources.jar always, rather than only on deploy -->
61
-                <executions>
62
-                    <execution>
63
-                        <id>attach-sources</id>
64
-                        <phase>generate-resources</phase>
65
-                        <goals>
66
-                            <goal>jar-no-fork</goal>
67
-                        </goals>
68
-                    </execution>
69
-                </executions>
70 54
             </plugin>
71 55
         </plugins>
72 56
     </build>
... ...
@@ -47,11 +47,6 @@ SUCH DAMAGE. */ -->
47 47
         <plugins>
48 48
             <plugin>
49 49
                 <artifactId>maven-compiler-plugin</artifactId>
50
-                <version>3.1</version>
51
-                <configuration>
52
-                    <source>1.7</source>
53
-                    <target>1.7</target>
54
-                </configuration>
55 50
             </plugin>
56 51
             <plugin>
57 52
                 <groupId>org.apache.maven.plugins</groupId>
... ...
@@ -100,7 +100,7 @@ public class FileGameData implements IGameData {
100 100
     }
101 101
 
102 102
     private List<String> listSubDirectories(String path, List<String> order) {
103
-        TreeSet<String> subdirs = new TreeSet<>();
103
+        TreeSet<String> subdirs = new TreeSet<String>();
104 104
         for (File dataDir : dataDirs) {
105 105
             File dir = new File(dataDir, path);
106 106
             if (dir.exists()) {
... ...
@@ -112,16 +112,22 @@ public class FileGameData implements IGameData {
112 112
             }
113 113
         }
114 114
         subdirs.retainAll(order);
115
-        ArrayList<String> result = new ArrayList<>(subdirs);
115
+        ArrayList<String> result = new ArrayList<String>(subdirs);
116 116
         reorderList(result, order);
117 117
         return result;
118 118
     }
119 119
 
120 120
     @Override
121 121
     public List<String> listQuestsToCompleteToUnlockQuest(String questName) {
122
-        try (InputStream is = new FileInputStream(getVirtualFile("quests/" + questName + "/quest.json")); InputStreamReader reader = new InputStreamReader(is)) {
123
-            QuestConfig conf = new Gson().fromJson(reader, QuestConfig.class);
124
-            return conf.getLockedBy();
122
+        try {
123
+            InputStream is = new FileInputStream(getVirtualFile("quests/" + questName + "/quest.json"));
124
+            try {
125
+                InputStreamReader reader = new InputStreamReader(is);
126
+                QuestConfig conf = new Gson().fromJson(reader, QuestConfig.class);
127
+                return conf.getLockedBy();
128
+            } finally {
129
+                is.close();
130
+            }
125 131
         } catch (IOException ex) {
126 132
             throw new RuntimeException(ex);
127 133
         }
... ...
@@ -160,8 +166,14 @@ public class FileGameData implements IGameData {
160 160
     }
161 161
 
162 162
     public String loadText(File f) {
163
-        try (InputStream is = new FileInputStream(f); Scanner s = new Scanner(is, "UTF-8").useDelimiter("\\Z")) {
164
-            return s.next();
163
+        try {
164
+            InputStream is = new FileInputStream(f);
165
+            try {
166
+                Scanner s = new Scanner(is, "UTF-8").useDelimiter("\\Z");
167
+                return s.next();
168
+            } finally {
169
+                is.close();
170
+            }
165 171
         } catch (FileNotFoundException ex) {
166 172
             throw new RuntimeException("Cannot find text file: " + f, ex);
167 173
         } catch (IOException ex) {
... ...
@@ -202,9 +214,15 @@ public class FileGameData implements IGameData {
202 202
 
203 203
     private List<String> getConfiguredQuests() {
204 204
         final File file = getVirtualFile("quests/quests.json");
205
-        try (InputStream is = new FileInputStream(file); InputStreamReader reader = new InputStreamReader(is)) {
206
-            QuestsConfig quests = new Gson().fromJson(reader, QuestsConfig.class);
207
-            return quests.getQuests();
205
+        try {
206
+            InputStream is = new FileInputStream(file);
207
+            try {
208
+                InputStreamReader reader = new InputStreamReader(is);
209
+                QuestsConfig quests = new Gson().fromJson(reader, QuestsConfig.class);
210
+                return quests.getQuests();
211
+            } finally {
212
+                is.close();
213
+            }
208 214
         } catch (Exception ex) {
209 215
             throw new RuntimeException("Cannot load " + file, ex);
210 216
         }
... ...
@@ -235,17 +253,26 @@ public class FileGameData implements IGameData {
235 235
 
236 236
     private List<String> getConfiguredLevels(String questName) {
237 237
         final File file = getVirtualFile("quests/" + questName + "/quest.json");
238
-        try (InputStream is = new FileInputStream(file); InputStreamReader reader = new InputStreamReader(is)) {
239
-            QuestConfig levels = new Gson().fromJson(reader, QuestConfig.class);
240
-            return levels.getLevels();
238
+        try {
239
+            InputStream is = new FileInputStream(file);
240
+            try {
241
+                InputStreamReader reader = new InputStreamReader(is);
242
+                QuestConfig levels = new Gson().fromJson(reader, QuestConfig.class);
243
+                return levels.getLevels();
244
+            } finally {
245
+                is.close();
246
+            }
241 247
         } catch (Exception ex) {
242 248
             throw new RuntimeException("Cannot load " + file, ex);
243 249
         }
244 250
     }
245 251
 
246 252
     public BufferedImage openImage(String file) throws IOException {
247
-        try (InputStream is = openFile(getFile(file))) {
253
+        InputStream is = openFile(getFile(file));
254
+        try {
248 255
             return ImageIO.read(is);
256
+        } finally {
257
+            is.close();
249 258
         }
250 259
     }
251 260
 
... ...
@@ -1186,7 +1186,7 @@ public strictfp class GameView implements IGameView {
1186 1186
                 - cameraSize, heroPos.getY() - cameraSize, heroPos.getX()
1187 1187
                 + cameraSize, heroPos.getY() + cameraSize);
1188 1188
 
1189
-        ArrayList<Drawable> drawableBodies = new ArrayList<>();
1189
+        ArrayList<Drawable> drawableBodies = new ArrayList<Drawable>();
1190 1190
         world.staticPlatformDrawer.resetVisibles();
1191 1191
         for (int i = 0; i < visibleBodies.size(); i++) {
1192 1192
             Body body = visibleBodies.get(i);
... ...
@@ -1278,7 +1278,9 @@ public strictfp class GameView implements IGameView {
1278 1278
 
1279 1279
     private AnimationCollection loadNanim(String filename) throws IOException {
1280 1280
         AnimationCollection nanim = new AnimationCollection();
1281
-        try (InputStream is = data.openFile(filename); InputStreamReader reader = new InputStreamReader(is)) {
1281
+        InputStream is = data.openFile(filename);
1282
+        try {
1283
+            InputStreamReader reader = new InputStreamReader(is);
1282 1284
             JsonObject json = new Gson().fromJson(reader, JsonObject.class);
1283 1285
             for (JsonElement jsonAnimationElement : json.getAsJsonArray("animations")) {
1284 1286
                 JsonObject jsonAnimation = jsonAnimationElement.getAsJsonObject();
... ...
@@ -1291,6 +1293,8 @@ public strictfp class GameView implements IGameView {
1291 1291
                 }
1292 1292
                 nanim.addAnimation(animation);
1293 1293
             }
1294
+        } finally {
1295
+            is.close();
1294 1296
         }
1295 1297
         nanim.setReady(true);
1296 1298
         return nanim;
... ...
@@ -1536,7 +1540,7 @@ public strictfp class GameView implements IGameView {
1536 1536
     }
1537 1537
 
1538 1538
     private TrueTypeFont initFont() {
1539
-        HashMap<Character, BufferedImage> fontSpecialCharacters = new HashMap<>();
1539
+        HashMap<Character, BufferedImage> fontSpecialCharacters = new HashMap<Character, BufferedImage>();
1540 1540
         try {
1541 1541
             fontSpecialCharacters.put('$', data.openImage("default_level_data/apple.png"));
1542 1542
         } catch (IOException e) {
... ...
@@ -89,7 +89,7 @@ public class LwjglHelper {
89 89
                 methods = new Methods();
90 90
             }
91 91
             if (null != methods.getWidthMethod) {
92
-                return (int) methods.getWidthMethod.invoke(null);
92
+                return (int) (Integer) methods.getWidthMethod.invoke(null);
93 93
             }
94 94
         } catch (Exception e) {
95 95
         }
... ...
@@ -102,7 +102,7 @@ public class LwjglHelper {
102 102
                 methods = new Methods();
103 103
             }
104 104
             if (null != methods.getHeightMethod) {
105
-                return (int) methods.getHeightMethod.invoke(null);
105
+                return (int) (Integer)methods.getHeightMethod.invoke(null);
106 106
             }
107 107
         } catch (Exception e) {
108 108
         }
... ...
@@ -118,7 +118,7 @@ public class PlatformSpecific implements IPlatformSpecific {
118 118
 
119 119
     private IGameData createGameData() {
120 120
         if (data == null) {
121
-            List<File> dataDirs = new ArrayList<>();
121
+            List<File> dataDirs = new ArrayList<File>();
122 122
             IMod mod = findModByName(config.getString("newton_adventure.mod", ""));
123 123
             if (null != mod) {
124 124
                 dataDirs.add(new File(mod.getPath()));
... ...
@@ -309,7 +309,7 @@ public class PlatformSpecific implements IPlatformSpecific {
309 309
         File modDir = null != mod ? new File(mod.getPath()) : getDefaultDataDir();
310 310
         File currentModDir = null != currentMod ? new File(currentMod.getPath()) : getDefaultDataDir();
311 311
         if (!modDir.equals(currentModDir)) {
312
-            List<File> dataDirs = new ArrayList<>();
312
+            List<File> dataDirs = new ArrayList<File>();
313 313
             dataDirs.add(modDir);
314 314
             dataDirs.add(getDefaultDataDir());
315 315
             data.setDataDirs(dataDirs);
... ...
@@ -333,7 +333,7 @@ public class PlatformSpecific implements IPlatformSpecific {
333 333
     }
334 334
 
335 335
     private List<IMod> listModsInDirs(File... dirs) {
336
-        List<IMod> mods = new ArrayList<>();
336
+        List<IMod> mods = new ArrayList<IMod>();
337 337
         for (File dir : dirs) {
338 338
             if (dir.exists()) {
339 339
                 for (File f : dir.listFiles()) {
... ...
@@ -38,7 +38,7 @@ public class StaticPlatformDrawable implements IStaticPlatformDrawable {
38 38
     };
39 39
 
40 40
     static List<StaticPlatformDrawable> create(IGameView view, List<StaticPlatform> platforms) {
41
-        List<StaticPlatformDrawable> result = new ArrayList<>();
41
+        List<StaticPlatformDrawable> result = new ArrayList<StaticPlatformDrawable>();
42 42
         java.util.Collections.sort(platforms, COMPARATOR);
43 43
         for (List<StaticPlatform> partitionedPlatforms : partition(platforms)) {
44 44
             if (!partitionedPlatforms.isEmpty()) {
... ...
@@ -55,12 +55,12 @@ public class StaticPlatformDrawable implements IStaticPlatformDrawable {
55 55
     }
56 56
 
57 57
     private static List<List<StaticPlatform>> partition(List<StaticPlatform> platforms) {
58
-        List<List<StaticPlatform>> result = new ArrayList<>();
58
+        List<List<StaticPlatform>> result = new ArrayList<List<StaticPlatform>>();
59 59
         StaticPlatform previousPlatform = null;
60 60
         List<StaticPlatform> currentPlatforms = null;
61 61
         for (StaticPlatform platform : platforms) {
62 62
             if (null == currentPlatforms || 0 != COMPARATOR.compare(previousPlatform, platform)) {
63
-                currentPlatforms = new ArrayList<>();
63
+                currentPlatforms = new ArrayList<StaticPlatform>();
64 64
                 result.add(currentPlatforms);
65 65
             }
66 66
             currentPlatforms.add(platform);
... ...
@@ -11,7 +11,7 @@ import java.util.List;
11 11
 public class StaticPlatformDrawer implements IStaticPlatformDrawer {
12 12
 
13 13
     private List<StaticPlatformDrawable> drawables;
14
-    private final List<StaticPlatform> platforms = new ArrayList<>();
14
+    private final List<StaticPlatform> platforms = new ArrayList<StaticPlatform>();
15 15
 
16 16
     @Override
17 17
     public void add(StaticPlatform platform) {
... ...
@@ -73,8 +73,8 @@ import org.lwjgl.opengl.GLContext;
73 73
 public class TextureCache implements ITextureCache {
74 74
 
75 75
     private static final Logger logger = Logger.getLogger(TextureCache.class.getName());
76
-    private final HashMap<String/* name */, TextureWeakReference> textures = new HashMap<>();
77
-    private final ReferenceQueue<Texture> referenceQueue = new ReferenceQueue<>();
76
+    private final HashMap<String/* name */, TextureWeakReference> textures = new HashMap<String/* name */, TextureWeakReference>();
77
+    private final ReferenceQueue<Texture> referenceQueue = new ReferenceQueue<Texture>();
78 78
     private final FileGameData data;
79 79
     /**
80 80
      * The colour model including alpha for the GL image
... ...
@@ -77,27 +77,6 @@
77 77
                     </execution>
78 78
                 </executions>
79 79
             </plugin>
80
-            <!--<plugin>
81
-              <groupId>com.pyx4j</groupId>
82
-              <artifactId>maven-junction-plugin</artifactId>
83
-              <version>1.0.3</version>
84
-              <executions>
85
-                <execution>
86
-                  <phase>generate-sources</phase>
87
-                  <goals>
88
-                    <goal>link</goal>
89
-                  </goals>
90
-                </execution>
91
-              </executions>
92
-              <configuration>
93
-                <links>
94
-                  <link>
95
-                    <src>${basedir}/../assets/src/main/resources/assets</src>
96
-                    <dst>${basedir}/assets</dst>
97
-                  </link>
98
-                </links>
99
-              </configuration>
100
-            </plugin>-->
101 80
             <plugin>
102 81
                 <groupId>com.jayway.maven.plugins.android.generation2</groupId>
103 82
                 <artifactId>android-maven-plugin</artifactId>
... ...
@@ -7,52 +7,30 @@
7 7
         <groupId>im.bci.newtonadv</groupId>
8 8
         <artifactId>playn</artifactId>
9 9
         <version>1.16-SNAPSHOT</version>
10
+        <relativePath>../pom.xml</relativePath>
10 11
     </parent>
11
-
12 12
     <artifactId>playn-core</artifactId>
13 13
     <packaging>jar</packaging>
14 14
     <name>newton-adventure-playn-core</name>
15
-
16 15
     <dependencies>
17 16
         <dependency>
18 17
             <groupId>com.googlecode.playn</groupId>
19 18
             <artifactId>playn-core</artifactId>
20
-            <version>${playn.version}</version>
21 19
         </dependency>
22 20
         <dependency>
23 21
             <groupId>im.bci.newtonadv</groupId>
24 22
             <artifactId>newton-adventure-core</artifactId>
25
-            <version>${project.version}</version>
26 23
         </dependency>
27 24
         <dependency>
28 25
             <groupId>im.bci</groupId>
29 26
             <artifactId>jnuit-playn-utils</artifactId>
30
-            <version>${jnuit.version}</version>
31 27
         </dependency>
32 28
     </dependencies>
33 29
     <build>
34 30
         <plugins>
35 31
             <plugin>
36
-                <artifactId>maven-compiler-plugin</artifactId>
37
-                <version>3.1</version>
38
-                <configuration>
39
-                    <source>1.7</source>
40
-                    <target>1.7</target>
41
-                </configuration>
42
-            </plugin>
43
-            <plugin>
44 32
                 <groupId>org.apache.maven.plugins</groupId>
45 33
                 <artifactId>maven-source-plugin</artifactId>
46
-                <!-- build a -sources.jar always, rather than only on deploy -->
47
-                <executions>
48
-                    <execution>
49
-                        <id>attach-sources</id>
50
-                        <phase>generate-resources</phase>
51
-                        <goals>
52
-                            <goal>jar-no-fork</goal>
53
-                        </goals>
54
-                    </execution>
55
-                </executions>
56 34
             </plugin>
57 35
         </plugins>
58 36
     </build>
... ...
@@ -16,84 +16,70 @@
16 16
     <properties>
17 17
         <gwt.module>im.bci.newtonadv.platform.playn.PlaynNewtonAdventureGame</gwt.module>
18 18
         <gwt.name>playn</gwt.name>
19
-        <!-- Desired Google App Engine SDK version -->
20
-        <!--<gae.version>1.6.1</gae.version>-->
21 19
     </properties>
22 20
 
23 21
     <dependencies>
24 22
         <dependency>
25 23
             <groupId>im.bci.newtonadv</groupId>
26 24
             <artifactId>playn-core</artifactId>
27
-            <version>${project.version}</version>
28 25
         </dependency>
29 26
 
30 27
         <dependency>
31 28
             <groupId>im.bci.newtonadv</groupId>
32 29
             <artifactId>playn-core</artifactId>
33
-            <version>${project.version}</version>
34 30
             <classifier>sources</classifier>
35 31
         </dependency>
36 32
     
37 33
         <dependency>
38 34
             <groupId>im.bci.newtonadv</groupId>
39 35
             <artifactId>playn-assets</artifactId>
40
-            <version>${project.version}</version>
41 36
         </dependency>
42 37
     
43 38
         <dependency>
44 39
             <groupId>im.bci.newtonadv</groupId>
45 40
             <artifactId>newton-adventure-core</artifactId>
46
-            <version>${project.version}</version>
47 41
         </dependency>
48 42
     
49 43
         <dependency>
50 44
             <groupId>im.bci.newtonadv</groupId>
51 45
             <artifactId>newton-adventure-core</artifactId>
52
-            <version>${project.version}</version>
53 46
             <classifier>sources</classifier>
54 47
         </dependency>
55 48
     
56 49
         <dependency>
57 50
             <groupId>im.bci</groupId>
58 51
             <artifactId>jnuit-core</artifactId>
59
-            <version>${jnuit.version}</version>
60 52
             <classifier>sources</classifier>
61 53
         </dependency>
62 54
  
63 55
         <dependency>
64 56
             <groupId>im.bci</groupId>
65 57
             <artifactId>jnuit-playn</artifactId>
66
-            <version>${jnuit.version}</version>
67 58
             <classifier>sources</classifier>
68 59
         </dependency>
69 60
        <dependency>
70 61
             <groupId>im.bci</groupId>
71 62
             <artifactId>jnuit-playn-utils</artifactId>
72
-            <version>${jnuit.version}</version>
73 63
             <classifier>sources</classifier>
74 64
         </dependency>
75 65
        <dependency>
76 66
             <groupId>im.bci</groupId>
77 67
             <artifactId>tablelayout</artifactId>
78
-            <version>${jnuit.version}</version>
79 68
             <classifier>sources</classifier>
80 69
         </dependency>
81 70
         <dependency>
82 71
             <groupId>im.bci</groupId>
83 72
             <artifactId>libtiled-jpurexml</artifactId>
84
-            <version>0.4</version>
85 73
         </dependency>
86 74
         <dependency>
87 75
             <groupId>im.bci</groupId>
88 76
             <artifactId>libtiled-jpurexml</artifactId>
89 77
             <classifier>sources</classifier>
90
-            <version>0.4</version>
91 78
         </dependency>
92 79
         <dependency>
93 80
             <groupId>com.github.asilvestre</groupId>
94 81
             <artifactId>jpurexml</artifactId>
95 82
             <classifier>sources</classifier>
96
-            <version>0.12</version>
97 83
         </dependency>
98 84
         <dependency>
99 85
             <groupId>com.googlecode.playn</groupId>
... ...
@@ -103,7 +89,6 @@
103 103
         <dependency>
104 104
             <groupId>com.googlecode.playn</groupId>
105 105
             <artifactId>playn-html</artifactId>
106
-            <version>${playn.version}</version>
107 106
             <classifier>sources</classifier>
108 107
         </dependency>
109 108
     </dependencies>
... ...
@@ -111,11 +96,6 @@
111 111
         <plugins>
112 112
             <plugin>
113 113
                 <artifactId>maven-compiler-plugin</artifactId>
114
-                <version>3.1</version>
115
-                <configuration>
116
-                    <source>1.7</source>
117
-                    <target>1.7</target>
118
-                </configuration>
119 114
             </plugin>
120 115
             <plugin>
121 116
                 <groupId>org.codehaus.mojo</groupId>
... ...
@@ -130,41 +110,23 @@
130 130
                 </executions>
131 131
             </plugin>
132 132
             <!-- allows testing of HTML backend via: mvn integration-test -Phtml -->
133
-            <plugin>
134
-              <groupId>org.mortbay.jetty</groupId>
135
-              <artifactId>jetty-maven-plugin</artifactId>
136
-              <version>8.0.0.v20110901</version>
137
-              <configuration>
138
-                <webApp>
139
-                  ${project.basedir}/target/${project.artifactId}-${project.version}
140
-                </webApp>
141
-              </configuration>
142
-              <executions>
143
-                <execution>
144
-                  <id>test-html</id>
145
-                  <phase>integration-test</phase>
146
-                  <goals>
147
-                    <goal>run-exploded</goal>
148
-                  </goals>
149
-                </execution>
150
-              </executions>
151
-            </plugin>
152
-            <plugin>
153
-                <artifactId>maven-eclipse-plugin</artifactId>
154
-                <version>2.8</version>
155
-                <configuration>
156
-                    <downloadSources>true</downloadSources>
157
-                    <downloadJavadocs>false</downloadJavadocs>
158
-                    <wtpversion>2.0</wtpversion>
159
-                    <additionalBuildcommands>
160
-                        <buildCommand>
161
-                            <name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
162
-                        </buildCommand>
163
-                    </additionalBuildcommands>
164
-                    <additionalProjectnatures>
165
-                        <projectnature>com.google.gwt.eclipse.core.gwtNature</projectnature>
166
-                    </additionalProjectnatures>
167
-                </configuration>
133
+            <plugin>
134
+                <groupId>org.apache.tomcat.maven</groupId>
135
+                <artifactId>tomcat7-maven-plugin</artifactId>
136
+                <version>2.2</version>
137
+                <configuration>
138
+                    <port>9090</port>
139
+                    <path>/</path>
140
+                </configuration>
141
+                <executions>
142
+                    <execution>
143
+                        <id>test-html</id>
144
+                        <phase>integration-test</phase>
145
+                        <goals>
146
+                            <goal>run-war</goal>
147
+                        </goals>
148
+                    </execution>
149
+                </executions>
168 150
             </plugin>
169 151
         </plugins>
170 152
     </build>
... ...
@@ -12,44 +12,27 @@
12 12
     <artifactId>playn-java</artifactId>
13 13
     <packaging>jar</packaging>
14 14
     <name>newton-adventure-playn-java</name>
15
-
16 15
     <properties>
17 16
         <mainClass>im.bci.newtonadv.platform.playn.java.PlaynNewtonAdventureGameJava</mainClass>
18 17
     </properties>
19
-
20 18
     <dependencies>
21 19
         <dependency>
22 20
             <groupId>im.bci.newtonadv</groupId>
23 21
             <artifactId>playn-core</artifactId>
24
-            <version>${project.version}</version>
25 22
         </dependency>
26
-
27 23
         <dependency>
28 24
             <groupId>im.bci.newtonadv</groupId>
29 25
             <artifactId>playn-assets</artifactId>
30
-            <version>${project.version}</version>
31 26
         </dependency>
32
-        
33 27
         <dependency>
34 28
             <groupId>im.bci</groupId>
35 29
             <artifactId>jnuit-playn-java</artifactId>
36
-            <version>${jnuit.version}</version>
37 30
         </dependency>
38
-
39 31
         <dependency>
40 32
             <groupId>com.googlecode.playn</groupId>
41 33
             <artifactId>playn-java</artifactId>
42
-            <version>${playn.version}</version>
43
-          <!--  <exclusions>
44
-                <exclusion>
45
-                    <groupId>jlayer</groupId>
46
-                    <artifactId>mp3spi</artifactId>        
47
-                </exclusion>
48
-            </exclusions>-->
49 34
         </dependency>
50
-    
51 35
     </dependencies>
52
-
53 36
     <build>
54 37
         <plugins>
55 38
             <!-- builds a standalone jar file during 'mvn package' -->
... ...
@@ -1,44 +1,47 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 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/maven-v4_0_0.xsd">
3
-  <modelVersion>4.0.0</modelVersion>
4
-  <parent>
5
-    <groupId>com.googlecode.playn</groupId>
6
-    <artifactId>playn-project</artifactId>
7
-    <version>1.8.5</version>
8
-  </parent>
9
-
10
-  <groupId>im.bci.newtonadv</groupId>
11
-  <artifactId>playn</artifactId>
12
-  <version>1.16-SNAPSHOT</version>
13
-  <packaging>pom</packaging>
14
-  <name>newton-adventure-playn</name>
15
-
16
-  <properties>
17
-    <playn.version>1.8.5</playn.version>
18
-    <jnuit.version>0.12</jnuit.version>
19
-  </properties>
20
-
21
-  <profiles>
22
-    <profile>
23
-      <id>java</id>
24
-      <activation><activeByDefault>true</activeByDefault></activation>
25
-      <modules><module>java</module></modules>
26
-    </profile>
27
-    <profile>
28
-      <id>android</id>
29
-      <modules><module>android</module></modules>
30
-    </profile>
31
-    <profile>
32
-      <id>ios</id>
33
-      <modules><module>ios</module></modules>
34
-    </profile>
35
-    <profile>
36
-      <id>html</id>
37
-      <modules><module>html</module></modules>
38
-    </profile>
39
-  </profiles>
40
-  <modules>
41
-    <module>assets</module>
42
-    <module>core</module>
43
-  </modules>
3
+    <modelVersion>4.0.0</modelVersion>
4
+    <parent>
5
+        <groupId>im.bci.newtonadv</groupId>
6
+        <artifactId>newton-adventure</artifactId>
7
+        <version>1.16-SNAPSHOT</version>
8
+        <relativePath>../../pom.xml</relativePath>
9
+    </parent>
10
+    <groupId>im.bci.newtonadv</groupId>
11
+    <artifactId>playn</artifactId>
12
+    <packaging>pom</packaging>
13
+    <name>newton-adventure-playn</name>
14
+    <profiles>
15
+        <profile>
16
+            <id>java</id>
17
+            <activation>
18
+                <activeByDefault>true</activeByDefault>
19
+            </activation>
20
+            <modules>
21
+                <module>java</module>
22
+            </modules>
23
+        </profile>
24
+        <profile>
25
+            <id>android</id>
26
+            <modules>
27
+                <module>android</module>
28
+            </modules>
29
+        </profile>
30
+        <profile>
31
+            <id>ios</id>
32
+            <modules>
33
+                <module>ios</module>
34
+            </modules>
35
+        </profile>
36
+        <profile>
37
+            <id>html</id>
38
+            <modules>
39
+                <module>html</module>
40
+            </modules>
41
+        </profile>
42
+    </profiles>
43
+    <modules>
44
+        <module>assets</module>
45
+        <module>core</module>
46
+    </modules>
44 47
 </project>
... ...
@@ -13,10 +13,12 @@
13 13
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
14 14
         <lwjgl.version>2.9.1</lwjgl.version>
15 15
         <jnuit.version>0.12</jnuit.version>
16
+        <playn.version>1.8.5</playn.version>
16 17
     </properties>
17 18
     <modules>
18 19
         <module>game/core</module>
19 20
         <module>game/lwjgl</module>
21
+        <module>game/playn</module>
20 22
         <module>editor</module>
21 23
         <module>packages/deb</module>
22 24
         <module>packages/generic</module>
... ...
@@ -35,6 +37,11 @@
35 35
             </dependency>
36 36
             <dependency>
37 37
                 <groupId>im.bci.newtonadv</groupId>
38
+                <artifactId>playn-core</artifactId>
39
+                <version>${project.version}</version>
40
+            </dependency>
41
+            <dependency>
42
+                <groupId>im.bci.newtonadv</groupId>
38 43
                 <artifactId>newton-adventure-lwjgl</artifactId>
39 44
                 <version>${project.version}</version>
40 45
             </dependency>
... ...
@@ -60,6 +67,12 @@
60 60
             </dependency>
61 61
             <dependency>
62 62
                 <groupId>im.bci</groupId>
63
+                <artifactId>libtiled-jpurexml</artifactId>
64
+                <classifier>sources</classifier>
65
+                <version>0.4</version>
66
+            </dependency>
67
+            <dependency>
68
+                <groupId>im.bci</groupId>
63 69
                 <artifactId>jnuit-core</artifactId>
64 70
                 <version>${jnuit.version}</version>
65 71
             </dependency>
... ...
@@ -68,8 +81,118 @@
68 68
                 <artifactId>jnuit-lwjgl-utils</artifactId>
69 69
                 <version>${jnuit.version}</version>
70 70
             </dependency>
71
+            <dependency>
72
+                <groupId>com.googlecode.playn</groupId>
73
+                <artifactId>playn-core</artifactId>
74
+                <version>${playn.version}</version>
75
+            </dependency>
76
+            <dependency>
77
+                <groupId>im.bci.newtonadv</groupId>
78
+                <artifactId>playn-core</artifactId>
79
+                <version>${project.version}</version>
80
+                <classifier>sources</classifier>
81
+            </dependency>
82
+    
83
+            <dependency>
84
+                <groupId>im.bci.newtonadv</groupId>
85
+                <artifactId>playn-assets</artifactId>
86
+                <version>${project.version}</version>
87
+            </dependency>
88
+    
89
+            <dependency>
90
+                <groupId>im.bci</groupId>
91
+                <artifactId>jnuit-core</artifactId>
92
+                <version>${jnuit.version}</version>
93
+                <classifier>sources</classifier>
94
+            </dependency>
95
+ 
96
+            <dependency>
97
+                <groupId>im.bci</groupId>
98
+                <artifactId>jnuit-playn</artifactId>
99
+                <version>${jnuit.version}</version>
100
+                <classifier>sources</classifier>
101
+            </dependency>
102
+            <dependency>
103
+                <groupId>im.bci</groupId>
104
+                <artifactId>jnuit-playn-utils</artifactId>
105
+                <version>${jnuit.version}</version>
106
+            </dependency>
107
+            <dependency>
108
+                <groupId>im.bci</groupId>
109
+                <artifactId>jnuit-playn-utils</artifactId>
110
+                <version>${jnuit.version}</version>
111
+                <classifier>sources</classifier>
112
+            </dependency>
113
+            <dependency>
114
+                <groupId>im.bci</groupId>
115
+                <artifactId>tablelayout</artifactId>
116
+                <version>${jnuit.version}</version>
117
+                <classifier>sources</classifier>
118
+            </dependency>
119
+            <dependency>
120
+                <groupId>com.github.asilvestre</groupId>
121
+                <artifactId>jpurexml</artifactId>
122
+                <classifier>sources</classifier>
123
+                <version>0.12</version>
124
+            </dependency>
125
+            <dependency>
126
+                <groupId>com.googlecode.playn</groupId>
127
+                <artifactId>playn-html</artifactId>
128
+                <version>${playn.version}</version>
129
+            </dependency>
130
+            <dependency>
131
+                <groupId>com.googlecode.playn</groupId>
132
+                <artifactId>playn-html</artifactId>
133
+                <version>${playn.version}</version>
134
+                <classifier>sources</classifier>
135
+            </dependency>
136
+            <dependency>
137
+                <groupId>im.bci</groupId>
138
+                <artifactId>jnuit-playn-java</artifactId>
139
+                <version>${jnuit.version}</version>
140
+            </dependency>
141
+            <dependency>
142
+                <groupId>com.googlecode.playn</groupId>
143
+                <artifactId>playn-java</artifactId>
144
+                <version>${playn.version}</version>
145
+                <exclusions>
146
+                    <exclusion>
147
+                        <groupId>jlayer</groupId>
148
+                        <artifactId>mp3spi</artifactId>        
149
+                    </exclusion>
150
+                </exclusions>
151
+            </dependency>
71 152
         </dependencies>
72 153
     </dependencyManagement>
154
+    <build>
155
+        <pluginManagement>
156
+            <plugins>
157
+                <plugin>
158
+                    <groupId>org.apache.maven.plugins</groupId>
159
+                    <artifactId>maven-source-plugin</artifactId>
160
+                    <version>2.3</version>
161
+                    <!-- build a -sources.jar always, rather than only on deploy -->
162
+                    <executions>
163
+                        <execution>
164
+                            <id>attach-sources</id>
165
+                            <phase>generate-resources</phase>
166
+                            <goals>
167
+                                <goal>jar-no-fork</goal>
168
+                            </goals>
169
+                        </execution>
170
+                    </executions>
171
+                </plugin>
172
+                <plugin>
173
+                    <artifactId>maven-compiler-plugin</artifactId>
174
+                    <version>3.1</version>
175
+                    <configuration>
176
+                        <source>1.6</source>
177
+                        <target>1.6</target>
178
+                    </configuration>
179
+                </plugin>
180
+            </plugins>
181
+        </pluginManagement>
182
+    </build>
73 183
     <profiles>
74 184
         <profile>
75 185
             <id>java</id>
... ...
@@ -88,7 +211,7 @@
88 88
         </profile>
89 89
         <profile>
90 90
             <id>html</id>
91
-        </profile>        
91
+        </profile>   
92 92
     </profiles>
93 93
 </project>
94 94