You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Thiago Moreira (timba)" <tm...@gmail.com> on 2010/12/08 00:35:53 UTC

Defining a project name when creating it from an archetype.

  Hi there!

  I'm building an archetype and one thing that I need to take in account
when creating an instance of the archetype is the directory's name
generated. This is important because the artifact generated will be used in
another system that the name is important. Is there way to force the
articfactId to be a format like my-articfact*-hook*? The bold part is that
is important for me.

  Thanks in advance

  Thiago Moreira

Re: Defining a project name when creating it from an archetype.

Posted by Ryan Connolly <ry...@gmail.com>.
Excellent!  I've used the portlet and theme archetypes in central and look
forward to seeing the official hook archetype there as well.  Glad to hear
you got it sorted out.

-Ryan


On Wed, Dec 8, 2010 at 2:38 PM, Thiago Moreira (timba) <
tmoreira2020@gmail.com> wrote:

>  Hey Ryan,
>
>  Yes, I'm working on Liferay Hook and Ext plugins port to Maven.
> I realized that I can do something like you described. Thanks for the
> input.
>
>  Thiago Moreira
>
> On Tue, Dec 7, 2010 at 5:52 PM, Ryan Connolly <ry...@gmail.com> wrote:
>
> > Hi Thiago:
> >     For starters let me take a guess and say that the liferay archetypes
> > will soon have a new addition?  Secondly, I am no archetype expert but
> I'm
> > guessing by the docs at
> > guide-creating-archetypes<
> > http://maven.apache.org/guides/mini/guide-creating-archetypes.html>
> > you
> > could simply add the desired extension following the artifactId property
> in
> > the prototype POM.  For example:
> > <artifactId>${artifactId}-hook</artifactId>
> >
> > This would have the drawback of users who actually follow the required
> > naming convention of hooks ending up with an artifactId of
> > my-artifact-hook-hook. Of course users who encounter the aforementioned
> > drawback would likely regenerate without the convention and end up with a
> > nicely named artifact.
> >
> > I have not tried this but it may be an option for you.
> >
> > -Ryan
> >
> >
> >
> > On Tue, Dec 7, 2010 at 6:35 PM, Thiago Moreira (timba) <
> > tmoreira2020@gmail.com> wrote:
> >
> > >  Hi there!
> > >
> > >  I'm building an archetype and one thing that I need to take in account
> > > when creating an instance of the archetype is the directory's name
> > > generated. This is important because the artifact generated will be
> used
> > in
> > > another system that the name is important. Is there way to force the
> > > articfactId to be a format like my-articfact*-hook*? The bold part is
> > that
> > > is important for me.
> > >
> > >  Thanks in advance
> > >
> > >  Thiago Moreira
> > >
> >
> >
> >
> > --
> > ®¥@N
> >
>



-- 
®¥@N

Re: Defining a project name when creating it from an archetype.

Posted by "Thiago Moreira (timba)" <tm...@gmail.com>.
  Hey Ryan,

  Yes, I'm working on Liferay Hook and Ext plugins port to Maven.
I realized that I can do something like you described. Thanks for the input.

  Thiago Moreira

On Tue, Dec 7, 2010 at 5:52 PM, Ryan Connolly <ry...@gmail.com> wrote:

> Hi Thiago:
>     For starters let me take a guess and say that the liferay archetypes
> will soon have a new addition?  Secondly, I am no archetype expert but I'm
> guessing by the docs at
> guide-creating-archetypes<
> http://maven.apache.org/guides/mini/guide-creating-archetypes.html>
> you
> could simply add the desired extension following the artifactId property in
> the prototype POM.  For example:
> <artifactId>${artifactId}-hook</artifactId>
>
> This would have the drawback of users who actually follow the required
> naming convention of hooks ending up with an artifactId of
> my-artifact-hook-hook. Of course users who encounter the aforementioned
> drawback would likely regenerate without the convention and end up with a
> nicely named artifact.
>
> I have not tried this but it may be an option for you.
>
> -Ryan
>
>
>
> On Tue, Dec 7, 2010 at 6:35 PM, Thiago Moreira (timba) <
> tmoreira2020@gmail.com> wrote:
>
> >  Hi there!
> >
> >  I'm building an archetype and one thing that I need to take in account
> > when creating an instance of the archetype is the directory's name
> > generated. This is important because the artifact generated will be used
> in
> > another system that the name is important. Is there way to force the
> > articfactId to be a format like my-articfact*-hook*? The bold part is
> that
> > is important for me.
> >
> >  Thanks in advance
> >
> >  Thiago Moreira
> >
>
>
>
> --
> ®¥@N
>

Re: Defining a project name when creating it from an archetype.

Posted by Ryan Connolly <ry...@gmail.com>.
Hi Thiago:
     For starters let me take a guess and say that the liferay archetypes
will soon have a new addition?  Secondly, I am no archetype expert but I'm
guessing by the docs at
guide-creating-archetypes<http://maven.apache.org/guides/mini/guide-creating-archetypes.html>
you
could simply add the desired extension following the artifactId property in
the prototype POM.  For example: <artifactId>${artifactId}-hook</artifactId>

This would have the drawback of users who actually follow the required
naming convention of hooks ending up with an artifactId of
my-artifact-hook-hook. Of course users who encounter the aforementioned
drawback would likely regenerate without the convention and end up with a
nicely named artifact.

I have not tried this but it may be an option for you.

-Ryan



On Tue, Dec 7, 2010 at 6:35 PM, Thiago Moreira (timba) <
tmoreira2020@gmail.com> wrote:

>  Hi there!
>
>  I'm building an archetype and one thing that I need to take in account
> when creating an instance of the archetype is the directory's name
> generated. This is important because the artifact generated will be used in
> another system that the name is important. Is there way to force the
> articfactId to be a format like my-articfact*-hook*? The bold part is that
> is important for me.
>
>  Thanks in advance
>
>  Thiago Moreira
>



-- 
®¥@N