|
I've modified archetype-core and archetype-plugin to provide this functionality for our projects. I'll attache the code I modified to get this to work. Here's an example of a multi-module archetype.xml:
<?xml version="1.0"?>
<archetype xmlns="http://maven.apache.org/Archetype/1.0.0">
<id>archetype-webservice</id>
<modules>
<module>
<dir>api</dir>
<sources>
<source>src/main/java/readme.txt</source>
</sources>
</module>
<module>
<dir>impl</dir>
<sources>
<source>src/main/java/readme.txt</source>
</sources>
<resources>
<resource>src/main/resources/readme.txt</resource>
<resource>src/main/resources/META-INF/PropertyMetadata.xml</resource>
<resource>src/main/sql/readme.txt</resource>
</resources>
<testSources>
<testSource>src/test/java/readme.txt</testSource>
</testSources>
<testResources>
<testResource>src/test/resources/readme.txt</testResource>
<testResource>src/test/sql/readme.txt</testResource>
</testResources>
<siteResources>
<siteResource>src/site/site.xml</siteResource>
<siteResource>src/site/apt/index.apt</siteResource>
</siteResources>
</module>
<module>
<dir>client</dir>
</module>
<module>
<dir>webapp</dir>
<resources>
<resource>src/main/resources/log4j.xml</resource>
<resource>src/main/webapp/WEB-INF/web.xml</resource>
</resources>
<testSources>
<testSource>src/test/java/readme.txt</testSource>
</testSources>
</module>
</modules>
</archetype>
Files I modified to provide multi-module archetype functionality.
John, this looks like a good change (including using modello), but the attached files are only part of the picture, and the plugin has changed since 1 Feb. I don't have time to manually implement this for the 1.0-alpha-4 version, but I'm sure Jason will add similar functionality to the next version.
I see that
This issue will be fixed by NG-alpha-1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
How about creating Java sources in different subpackages such as ${package}\model or ${package}\web ?