I consider archetypes as a service from Maven to get started a bit faster.
From what I've seen, JBoss Forge[1] looks like a better alternative for.
It claims to support incremental project enhancement.

-Robert

[1] https://docs.jboss.org/author/display/FORGE/Home


Op Wed, 07 Mar 2012 12:15:08 +0100 schreef Troels Selch Sørensen <tro...@golthak.dk>:

Hi.

We have made some archetypes that we use internally, but they contain much
of the same code. We would like to avoid the risk of updating one
archetype, but forget the others when making changes in the code they have
in common.

We are using Springsource Tool Suite and Maven to create bundles for Apache
Felix. All bundles have some boilerplate code in common, and some bundles
have boilerplate code for different technologies (XML reader, DB2 writer,
etc.). We would like it if a developer could use our archetype to add or
get the code for the needed technologies for a bundle and only get the
files and project setup related to those technologies.

The solution we are using now is different archetypes; Basic, Basic+XML,
Basic+XML+DB2, but this is difficult to maintain. We thought about making
one archetype project with all technologies and then build it multiple
times with different archetype-metadata.xml files which includes/excludes
the necessary files, but that does not solve our problem with files like
for instance application-context.xml with varying contents but same name.

We have looked into partial archetypes, but we still need to add beans for
injection to the application-context.xml and code calling the library and
Maven doesn’t seem able to merge files. We are unable to find any good
documentation on this.

A different solution could be to make an archetype for each technology (but not as a bundle), and then add them as modules, but we cannot see how this could solve our problem, when we still can’t change the code and xml files
in the main project.

Thanks in advance,
Troels

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to