We had a couple of discussions around this in the past. Tim Berglund
proposed and started to work on a Github based templating mechanism 6
months ago or so. We should try to gather the use cases and move forward
from there.

Here is what the Maven archetype plugin is providing:

   - 
archetype:generate<http://maven.apache.org/archetype/maven-archetype-plugin/generate-mojo.html>
creates
   a Maven project from an archetype: asks the user to choose an archetype
   from the archetype catalog, and retrieves it from the remote repository.
   Once retrieved, it is processed to create a working Maven project.
   - 
archetype:create-from-project<http://maven.apache.org/archetype/maven-archetype-plugin/create-from-project-mojo.html>
creates
   an archetype from an existing project.
   - 
archetype:crawl<http://maven.apache.org/archetype/maven-archetype-plugin/crawl-mojo.html>
search
   a repository for archetypes and updates a catalog.

The archetypes are obviously parameterized and you can fill in the
parameters either from a console or from a properties file. The archetype
has input files which live in a jar. In the metadata file for a specific
archetype you then basically specify a bunch of copy operations where the
files of the jar are copied and the tokens in those files are replaced with
the parameters. The result is the template project.

- You might have large binaries as part of your template where I think
Github is not a good place to store them. I easily see enterprise scenarios
where this is the case.
- We want to anyhow improve the generic Gradle configuration mechanisms,
e.g. make it very easy to specify that properties are retrieved from the
console.
- With auto-apply and improved generic property handling that might take us
a long way to a templating solution. A template would be just a Gradle
plugin with some resources. The only thing we would additionally need is
some metadata per template for building a catalog.

The cool thing with the above solution is that we could also somehow
integrate those template plugins with our language plugins. The language
plugins for example define many of the conventions that make up the project
template for this language. You don't want to define them a second time in
the template but rather ask the language plugin for them.

Hans

On Mon, Feb 4, 2013 at 4:45 PM, Daz DeBoer <[email protected]>wrote:

> On 4 February 2013 02:55, Luke Daley <[email protected]> wrote:
> > https://github.com/n8han/giter8
> >
> > Interesting bits:
> >
> > 1. “archetypes” are github repos.
> > 2. Testability is built in (no idea how well it works)
> > 3. Not much more than a retrieval engine and template renderer
>
> I like the idea of keeping the 'archetypes' out of Gradle but
> providing a standard plugin for using them. Naturally, we'd need to
> provide some 'standard' templates, but making it very easy for users
> to add to the set would be cool. I'm sure enterprise users would
> benefit from this as well - no doubt many organisations already have
> standard "project templates".
>
> --
> Darrell (Daz) DeBoer
> Principal Engineer, Gradleware
> http://www.gradleware.com
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>

Reply via email to