Permalink
Browse files

Update the archetype with separate assets submodule.

It turns out there's a Maven mojo that creates symlinks, so we might be able to
use the symlink approach without incredible pain. I'm sure Eclipse will choke
and gargle on the plugin and things won't work out of the box there, but when
have things ever worked out of the box on Eclipse?
  • Loading branch information...
1 parent aabc31a commit 6bef714afd7c5162e12380390e3f69cea6cb2f63 @samskivert samskivert committed Jan 7, 2013
@@ -151,14 +151,18 @@
</fileSets>
<modules>
+ <module id="${rootArtifactId}-assets" dir="assets" name="${rootArtifactId}-assets">
+ <fileSets>
+ <fileSet packaged="false" encoding="UTF-8">
+ <directory>src/main/resources</directory>
+ </fileSet>
+ </fileSets>
+ </module>
<module id="${rootArtifactId}-core" dir="core" name="${rootArtifactId}-core">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
</fileSet>
- <fileSet packaged="false" encoding="UTF-8">
- <directory>src/main/resources</directory>
- </fileSet>
</fileSets>
</module>
</modules>
@@ -45,6 +45,28 @@
<build>
<plugins>
<plugin>
+ <groupId>com.pyx4j</groupId>
+ <artifactId>maven-junction-plugin</artifactId>
+ <version>1.0.3</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>link</goal>
+ </goals>
+ </execution>
+ </executions>
+ <!-- generate a symlink to our assets directory in the proper location -->
+ <configuration>
+ <links>
+ <link>
+ <src>${basedir}/../assets/src/main/resources/assets</src>
+ <dst>${basedir}/assets</dst>
+ </link>
+ </links>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>${android.maven.version}</version>
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>${groupId}</groupId>
+ <artifactId>${rootArtifactId}</artifactId>
+ <version>${version}</version>
+ </parent>
+
+ <artifactId>${artifactId}</artifactId>
+ <packaging>jar</packaging>
+ <name>${JavaGameClassName} Assets</name>
+</project>
@@ -34,6 +34,12 @@
</dependency>
<dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>${rootArtifactId}-assets</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>com.googlecode.playn</groupId>
<artifactId>playn-flash</artifactId>
<version>${playn.version}</version>
@@ -35,6 +35,12 @@
</dependency>
<dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>${rootArtifactId}-assets</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>com.googlecode.playn</groupId>
<artifactId>playn-html</artifactId>
<version>${playn.version}</version>
@@ -34,6 +34,28 @@
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
+ <groupId>com.pyx4j</groupId>
+ <artifactId>maven-junction-plugin</artifactId>
+ <version>1.0.3</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>link</goal>
+ </goals>
+ </execution>
+ </executions>
+ <!-- generate a symlink to our assets directory in the proper location -->
+ <configuration>
+ <links>
+ <link>
+ <src>${basedir}/../assets/src/main/resources/assets</src>
+ <dst>${basedir}/assets</dst>
+ </link>
+ </links>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>com.samskivert</groupId>
<artifactId>ikvm-maven-plugin</artifactId>
<version>1.1.4</version>
@@ -25,6 +25,12 @@
</dependency>
<dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>${rootArtifactId}-assets</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>com.googlecode.playn</groupId>
<artifactId>playn-java</artifactId>
<version>${playn.version}</version>
@@ -42,5 +42,4 @@
<modules><module>flash</module></modules>
</profile>
</profiles>
-
</project>

0 comments on commit 6bef714

Please sign in to comment.