Well, IMO an archetype is by definition something rarely used: you often work on an existing project, but are unlikely to create a new one every day. So, you may have a very specific use-case, and that is often the cause of something not working the way one want on a specific situation.
I was talking about templating-m-p in Eclipse because I thought you may somehow be able to use the m2e.version property to activate a special dev profile that would for example define your archetype sources as the source for filtering, re/define some kind of hardcoded dev properties and so on to be able to iterate inside the IDE. Not that clean, sounding a bit hacky as I said, but may seem acceptable since it's only for use when the project is open in the IDE. You also have to develop your archetype's ITs to ensure it keeps working [1]. But I suppose you already do so. Cheers -- Baptiste [1] https://maven.apache.org/archetype/maven-archetype-plugin/integration-test-mojo.html 2014-03-09 22:06 GMT+01:00 Petar Tahchiev <[email protected]>: > Hello, > > thanks for your responses. Yes, unforutnately, I do need parameterized Java > code (package names, classnames, also xml files, etc..). As I said it's > pretty complicated project. > I looked at templating-maven-plugin but it seems that filtering the > standard src/main/java folder is not supported. Also, I may not understand > the quite your suggestion, but using the templating-maven-plugin will also > break Eclipse as I will be still having ${packageName} in my sources. > > I'm kind of surprised that no one else has had this problem before. Does > this mean that the archetypes are only supposed to work with simple > projects that are not continuously developed? > > > 2014-03-09 22:50 GMT+02:00 Baptiste Mathus <[email protected]>: > > > Just a quick thought, maybe using some hacky form of a development > profile > > using the templating-maven-plugin to filter those properties could help? > > > > > > 2014-03-09 20:47 GMT+01:00 Benson Margulies <[email protected]>: > > > > > Are you sure that you absolutely need parameterized Java code? There's > > > really no good way to work with it. You could instead use the > > > maven-shade-plugin to customer-ize your results as part of their > > > build. > > > > > > > > > On Sun, Mar 9, 2014 at 3:36 PM, Petar Tahchiev <[email protected]> > > > wrote: > > > > Hey guys, > > > > > > > > here's an interesting question: how do you develop your maven > > > archetypes? I > > > > have a web-project that consists of lots of controllers and jsps, > and I > > > > have been developing this for a long time, and I want to keep > > developing > > > > it. I also want to provide this project to my clients as an archetype > > so > > > > they can be up-and-running as quickly as possible. > > > > > > > > I thought of creating an archetype from my project every time I > release > > > the > > > > archetype, but that seems really unefficient as I release new > versions > > > very > > > > often, and also the archetype is quite complicated. > > > > > > > > I also thought to create the archetype once, and keep developing it > in > > > > Eclipse, but that's not possible because for instance the package > names > > > > look like this: > > > > > > > > package ${packageName}; > > > > > > > > and of-course Eclipse complains. > > > > > > > > So my questions is - if you have a complicated archetype that you > keep > > > > developing over time, how do you develop it? Is there an > > Eclipse/IntelliJ > > > > plugin for archetype developing? > > > > > > > > -- > > > > Regards, Petar! > > > > Karlovo, Bulgaria. > > > > --- > > > > Public PGP Key at: > > > > > > > > > > https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611 > > > > Key Fingerprint: A369 A7EE 61BC 93A3 CDFF 55A5 1965 8550 C311 0611 > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [email protected] > > > For additional commands, e-mail: [email protected] > > > > > > > > > > > > -- > > Baptiste <Batmat> MATHUS - http://batmat.net > > Sauvez un arbre, > > Mangez un castor ! > > > > > > -- > Regards, Petar! > Karlovo, Bulgaria. > --- > Public PGP Key at: > https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611 > Key Fingerprint: A369 A7EE 61BC 93A3 CDFF 55A5 1965 8550 C311 0611 > -- Baptiste <Batmat> MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor !
