Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 6bef714afd7c5162e12380390e3f69cea6cb2f63 1 parent aabc31a
@samskivert samskivert authored
View
10 archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -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>
View
22 archetype/src/main/resources/archetype-resources/android/pom.xml
@@ -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>
View
15 archetype/src/main/resources/archetype-resources/assets/pom.xml
@@ -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>
View
0  ...ain/resources/__JavaGameClassName__Assets.gwt.xml → ...ain/resources/__JavaGameClassName__Assets.gwt.xml
File renamed without changes
View
0  ...rces/core/src/main/resources/assets/images/bg.png → ...es/assets/src/main/resources/assets/images/bg.png
File renamed without changes
View
6 archetype/src/main/resources/archetype-resources/flash/pom.xml
@@ -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>
View
6 archetype/src/main/resources/archetype-resources/html/pom.xml
@@ -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>
View
22 archetype/src/main/resources/archetype-resources/ios/pom.xml
@@ -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>
View
6 archetype/src/main/resources/archetype-resources/java/pom.xml
@@ -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>
View
1  archetype/src/main/resources/archetype-resources/pom.xml
@@ -42,5 +42,4 @@
<modules><module>flash</module></modules>
</profile>
</profiles>
-
</project>
Please sign in to comment.
Something went wrong with that request. Please try again.