You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Lachlan Deck <la...@gmail.com> on 2008/04/26 23:48:52 UTC

archetype for creating packaging 'pom'?

Hi there,

I'm sure this must be a FAQ - but I can't see an answer anywhere. Is  
there not an archetype for creating a pom.xml with packaging pom?

Thanks.

with regards,
--

Lachlan Deck




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


Re: archetype for creating packaging 'pom'?

Posted by Lachlan Deck <la...@gmail.com>.
On 27/04/2008, at 1:29 PM, Wendy Smoak wrote:

> On Sun, Apr 27, 2008 at 5:48 AM, Lachlan Deck  
> <la...@gmail.com> wrote:
>
>> I'm sure this must be a FAQ - but I can't see an answer anywhere.  
>> Is there
>> not an archetype for creating a pom.xml with packaging pom?
>
> Not afaik, it's generally less typing to just copy one and modify it.

I thought it would be less typing to simply create a parent pom  
*without* having to edit it before adding sub-modules.
i.e.,
mvn create....
cd parentDir
mvn create

Rather than having to continually edit the parent pom each time you  
need to create a sub-module grouping.

> It might be nice to have the values filtered in though... if you'd
> like to contribute an archetype we can see about adding it to the
> list.

I'll need to get more familiar with maven prior to doing this... I  
just assumed it would have annoyed enough people by now that someone  
would have done it already. Obviously not.

with regards,
--

Lachlan Deck

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


Re: archetype for creating packaging 'pom'?

Posted by Wendy Smoak <ws...@gmail.com>.
On Sun, Apr 27, 2008 at 5:48 AM, Lachlan Deck <la...@gmail.com> wrote:

>  I'm sure this must be a FAQ - but I can't see an answer anywhere. Is there
> not an archetype for creating a pom.xml with packaging pom?

Not afaik, it's generally less typing to just copy one and modify it.
It might be nice to have the values filtered in though... if you'd
like to contribute an archetype we can see about adding it to the
list.

-- 
Wendy

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


Re: archetype for creating packaging 'pom'?

Posted by Wayne Fay <wa...@gmail.com>.
I don't disagree with any of your comments. Quite simply, this is open
source so no one (before now) has seen the value of making a pom
archetype, thus it doesn't exist. File a RFE in JIRA and wait for
someone else to make one, or make one yourself and contribute it back.

It might also be useful to have some generic "change" plugin goals eg
change:packaging-to-pom (would change packing in the pom to pom),
change:packaging-to-jar (duh), change:add-modules (it would look at
the subdirs and offer to add each one in turn to the modules section
if not already there), etc. This is all stuff I've done manually
myself in the past, but it could be automated a bit with plugins if
someone was inclined to do the coding...

Wayne

On 4/28/08, Lachlan Deck <la...@gmail.com> wrote:
> Hi Wayne,
>
> On 28/04/2008, at 1:49 PM, Wayne Fay wrote:
>
> > In that case, I would probably just use maven-archetype-quickstart and
> > then edit the pom.xml to change packaging "jar" to "pom". And I might
> > remove the junit dependency that comes in by default. You will also
> > need to add the <modules> section etc.
> >
>
> That's my point - why keep doing something repetitively? I was under the
> impression that maven was designed to save you from silly repetitive
> (simple) tasks like this :-)
> I just assumed that someone by now would have provided a shortcut.
>
> Obviously not.
>
> > But I tend to not use archetypes at all, so...
> >
>
> At the very least it would save you having to type those initial xml headers
> whilst providing a simple starting point.
>
>
> > Wayne
> >
> > On 4/27/08, Lachlan Deck <la...@gmail.com> wrote:
> >
> > > Hi Wayne,
> > >
> > > On 27/04/2008, at 11:26 AM, Wayne Fay wrote:
> > >
> > >
> > > > What kind of project are you really looking to build? For what
> > > > purpose? The more detail you provide, the better the answer you will
> > > > get, generally.
> > > >
> > > >
> > >
> > > Okay - more details... though I thought it was obvious enough :-)
> > >
> > > There's two scenarios that this is needed:
> > > 1) creating an initial multi-module project (where the sub-modules will
> be
> > > created subsequently)
> > > $ mvn create rootParentProject
> > >
> > > 2) creating sub-module group.
> > > cd rootParentProject
> > > $ mvn create anotherParent
> > > $ cd anotherParent
> > > $ mvn create someModule
> > > $ cd ..
> > > $ mvn create yetAnotherParent
> > > $ cd yetAnotherParent
> > > $ mvn create someModule
> > >
> > > which would be quite simple (without any editing of files prior to
> creating
> > > a sub-module grouping). The above structure would then be:
> > >
> > > /pom.xml
> > > /anotherParent/pom.xml
> > > /anotherParent/someModule/pom.xml
> > > /yetAnotherParent/pom.xml
> > > /yetAnotherParent/someModule/pom.xml
> > >
> > >
> > > > On 4/26/08, Lachlan Deck <la...@gmail.com> wrote:
> > > >
> > > >
> > > > > I'm sure this must be a FAQ - but I can't see an answer anywhere. Is
> > > > > there not an archetype for creating a pom.xml with packaging pom?
> > > > >
> > > >
> > >
> > >
> > > with regards,
> > > --
> > >
> > > Lachlan Deck
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> with regards,
> --
>
> Lachlan Deck
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: archetype for creating packaging 'pom'?

Posted by Lachlan Deck <la...@gmail.com>.
Hi Wayne,

On 28/04/2008, at 1:49 PM, Wayne Fay wrote:

> In that case, I would probably just use maven-archetype-quickstart and
> then edit the pom.xml to change packaging "jar" to "pom". And I might
> remove the junit dependency that comes in by default. You will also
> need to add the <modules> section etc.

That's my point - why keep doing something repetitively? I was under  
the impression that maven was designed to save you from silly  
repetitive (simple) tasks like this :-)
I just assumed that someone by now would have provided a shortcut.

Obviously not.

> But I tend to not use archetypes at all, so...

At the very least it would save you having to type those initial xml  
headers whilst providing a simple starting point.

> Wayne
>
> On 4/27/08, Lachlan Deck <la...@gmail.com> wrote:
>> Hi Wayne,
>>
>> On 27/04/2008, at 11:26 AM, Wayne Fay wrote:
>>
>>> What kind of project are you really looking to build? For what
>>> purpose? The more detail you provide, the better the answer you will
>>> get, generally.
>>>
>>
>> Okay - more details... though I thought it was obvious enough :-)
>>
>> There's two scenarios that this is needed:
>> 1) creating an initial multi-module project (where the sub-modules  
>> will be
>> created subsequently)
>> $ mvn create rootParentProject
>>
>> 2) creating sub-module group.
>> cd rootParentProject
>> $ mvn create anotherParent
>> $ cd anotherParent
>> $ mvn create someModule
>> $ cd ..
>> $ mvn create yetAnotherParent
>> $ cd yetAnotherParent
>> $ mvn create someModule
>>
>> which would be quite simple (without any editing of files prior to  
>> creating
>> a sub-module grouping). The above structure would then be:
>>
>> /pom.xml
>> /anotherParent/pom.xml
>> /anotherParent/someModule/pom.xml
>> /yetAnotherParent/pom.xml
>> /yetAnotherParent/someModule/pom.xml
>>
>>> On 4/26/08, Lachlan Deck <la...@gmail.com> wrote:
>>>
>>>> I'm sure this must be a FAQ - but I can't see an answer anywhere.  
>>>> Is
>>>> there not an archetype for creating a pom.xml with packaging pom?
>>
>>
>> with regards,
>> --
>>
>> Lachlan Deck
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

with regards,
--

Lachlan Deck




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


Re: archetype for creating packaging 'pom'?

Posted by Wayne Fay <wa...@gmail.com>.
In that case, I would probably just use maven-archetype-quickstart and
then edit the pom.xml to change packaging "jar" to "pom". And I might
remove the junit dependency that comes in by default. You will also
need to add the <modules> section etc.

But I tend to not use archetypes at all, so...

Wayne

On 4/27/08, Lachlan Deck <la...@gmail.com> wrote:
> Hi Wayne,
>
> On 27/04/2008, at 11:26 AM, Wayne Fay wrote:
>
> > What kind of project are you really looking to build? For what
> > purpose? The more detail you provide, the better the answer you will
> > get, generally.
> >
>
> Okay - more details... though I thought it was obvious enough :-)
>
> There's two scenarios that this is needed:
> 1) creating an initial multi-module project (where the sub-modules will be
> created subsequently)
> $ mvn create rootParentProject
>
> 2) creating sub-module group.
> cd rootParentProject
> $ mvn create anotherParent
> $ cd anotherParent
> $ mvn create someModule
> $ cd ..
> $ mvn create yetAnotherParent
> $ cd yetAnotherParent
> $ mvn create someModule
>
> which would be quite simple (without any editing of files prior to creating
> a sub-module grouping). The above structure would then be:
>
> /pom.xml
> /anotherParent/pom.xml
> /anotherParent/someModule/pom.xml
> /yetAnotherParent/pom.xml
> /yetAnotherParent/someModule/pom.xml
>
> > On 4/26/08, Lachlan Deck <la...@gmail.com> wrote:
> >
> > > I'm sure this must be a FAQ - but I can't see an answer anywhere. Is
> there
> > > not an archetype for creating a pom.xml with packaging pom?
> > >
> >
>
> with regards,
> --
>
> Lachlan Deck
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: archetype for creating packaging 'pom'?

Posted by Lachlan Deck <la...@gmail.com>.
Hi Wayne,

On 27/04/2008, at 11:26 AM, Wayne Fay wrote:

> What kind of project are you really looking to build? For what
> purpose? The more detail you provide, the better the answer you will
> get, generally.

Okay - more details... though I thought it was obvious enough :-)

There's two scenarios that this is needed:
1) creating an initial multi-module project (where the sub-modules  
will be created subsequently)
$ mvn create rootParentProject

2) creating sub-module group.
cd rootParentProject
$ mvn create anotherParent
$ cd anotherParent
$ mvn create someModule
$ cd ..
$ mvn create yetAnotherParent
$ cd yetAnotherParent
$ mvn create someModule

which would be quite simple (without any editing of files prior to  
creating a sub-module grouping). The above structure would then be:

/pom.xml
/anotherParent/pom.xml
/anotherParent/someModule/pom.xml
/yetAnotherParent/pom.xml
/yetAnotherParent/someModule/pom.xml

> On 4/26/08, Lachlan Deck <la...@gmail.com> wrote:
>> I'm sure this must be a FAQ - but I can't see an answer anywhere.  
>> Is there
>> not an archetype for creating a pom.xml with packaging pom?

with regards,
--

Lachlan Deck




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


Re: archetype for creating packaging 'pom'?

Posted by Wayne Fay <wa...@gmail.com>.
What kind of project are you really looking to build? For what
purpose? The more detail you provide, the better the answer you will
get, generally.

Wayne

On 4/26/08, Lachlan Deck <la...@gmail.com> wrote:
> Hi there,
>
> I'm sure this must be a FAQ - but I can't see an answer anywhere. Is there
> not an archetype for creating a pom.xml with packaging pom?
>
> Thanks.
>
> with regards,
> --
>
> Lachlan Deck
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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