You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Grzegorz Borkowski <gr...@o2.pl> on 2008/09/23 14:49:13 UTC
What's the point of listing all artifacts in archetype.xml?
I wanted to create my own archetype...
I've prepared set of prototype sources which should be used as tempate for
creating new project. According to document "Guide to creating archetypes" I
should put them under src/main/resources/archetype-resources/. That's ok, I
put them there.
But then the user guide says that I have to put every prototype file name
(with full path) into archetype.xml file! What for? (I gave up at this
point, it is too much unnecessary work.)
What's the point of such data redundancy? If I have the complete file
structure under src/main/resources/archetype-resources/, then maven
archetype plugin should simply copy it when creating project from archetype.
Putting the list of those files in archetype.xml is waste of time.
Can somebody explain me why it was designed so?
--
View this message in context: http://www.nabble.com/What%27s-the-point-of-listing-all-artifacts-in-archetype.xml--tp19626976p19626976.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: What's the point of listing all artifacts in archetype.xml?
Posted by Stephen Connolly <st...@gmail.com>.
One (albeit silly reason) is that you would not want the .svn and .CVS
subdirectories getting added as well....
Though at the very least it could offer a goal to generate the archetype.xml
by scanning the directory for you... and then you could massage the file by
hand removing the stuff that should not be there
-Stephen
2008/9/23 Wayne Fay <wa...@gmail.com>
> No clue why it was designed like this, but at least for me, creating
> an archetype is not an everyday thing so its really not a big deal to
> spend a little extra time when I occasionally need to build a new
> archetype or work on an existing one.
>
> With a little ls and sed/awk you can get all the files listed in the
> proper XML form right out of your command line.
>
> As with the rest of Maven, this is an open source project so you can
> post a JIRA and someone will consider adding the feature themselves or
> you can modify the code yourself and contribute it back to the
> project.
>
> Wayne
>
> On Tue, Sep 23, 2008 at 5:49 AM, Grzegorz Borkowski
> <gr...@o2.pl> wrote:
> >
> > I wanted to create my own archetype...
> > I've prepared set of prototype sources which should be used as tempate
> for
> > creating new project. According to document "Guide to creating
> archetypes" I
> > should put them under src/main/resources/archetype-resources/. That's ok,
> I
> > put them there.
> > But then the user guide says that I have to put every prototype file name
> > (with full path) into archetype.xml file! What for? (I gave up at this
> > point, it is too much unnecessary work.)
> > What's the point of such data redundancy? If I have the complete file
> > structure under src/main/resources/archetype-resources/, then maven
> > archetype plugin should simply copy it when creating project from
> archetype.
> > Putting the list of those files in archetype.xml is waste of time.
> > Can somebody explain me why it was designed so?
> > --
> > View this message in context:
> http://www.nabble.com/What%27s-the-point-of-listing-all-artifacts-in-archetype.xml--tp19626976p19626976.html
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > 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: What's the point of listing all artifacts in archetype.xml?
Posted by Wayne Fay <wa...@gmail.com>.
No clue why it was designed like this, but at least for me, creating
an archetype is not an everyday thing so its really not a big deal to
spend a little extra time when I occasionally need to build a new
archetype or work on an existing one.
With a little ls and sed/awk you can get all the files listed in the
proper XML form right out of your command line.
As with the rest of Maven, this is an open source project so you can
post a JIRA and someone will consider adding the feature themselves or
you can modify the code yourself and contribute it back to the
project.
Wayne
On Tue, Sep 23, 2008 at 5:49 AM, Grzegorz Borkowski
<gr...@o2.pl> wrote:
>
> I wanted to create my own archetype...
> I've prepared set of prototype sources which should be used as tempate for
> creating new project. According to document "Guide to creating archetypes" I
> should put them under src/main/resources/archetype-resources/. That's ok, I
> put them there.
> But then the user guide says that I have to put every prototype file name
> (with full path) into archetype.xml file! What for? (I gave up at this
> point, it is too much unnecessary work.)
> What's the point of such data redundancy? If I have the complete file
> structure under src/main/resources/archetype-resources/, then maven
> archetype plugin should simply copy it when creating project from archetype.
> Putting the list of those files in archetype.xml is waste of time.
> Can somebody explain me why it was designed so?
> --
> View this message in context: http://www.nabble.com/What%27s-the-point-of-listing-all-artifacts-in-archetype.xml--tp19626976p19626976.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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: What's the point of listing all artifacts in archetype.xml?
Posted by Raphaël Piéroni <ra...@gmail.com>.
Hi folks,
the file META-INF/maven/archetype.xml is used with the archetype
plugin 1.0-alpha
the 2.0-alpha version uses META-INF/maven/archetype-metadata.xml
Also the create-from-project mojo creates a correct
archetype-metadata.xml but it creates a buggy archetype.xml file
Hope this helps.
Raphaël
2008/9/24 Niels van Kampenhout <n....@onehippo.com>:
> Grzegorz Borkowski wrote:
>>
>> I wanted to create my own archetype...
>> I've prepared set of prototype sources which should be used as tempate for
>> creating new project. According to document "Guide to creating archetypes"
>> I
>> should put them under src/main/resources/archetype-resources/. That's ok,
>> I
>> put them there.
>> But then the user guide says that I have to put every prototype file name
>> (with full path) into archetype.xml file! What for? (I gave up at this
>> point, it is too much unnecessary work.)
>
> Try generating the archetype by running
>
> mvn archetype:create-from-project
>
> from the root of your prototype project. The generated archetype will be in
> target/generated-sources/archetype/. You will probably have to fine tune a
> little bit, but at least it saves you writing the file list in
> archetype.xml.
>
>> What's the point of such data redundancy? If I have the complete file
>> structure under src/main/resources/archetype-resources/, then maven
>> archetype plugin should simply copy it when creating project from
>> archetype.
>> Putting the list of those files in archetype.xml is waste of time.
>> Can somebody explain me why it was designed so?
>
> I can't answer that question I'm afraid -- to me the file list in
> archetype.xml seems redundant as well...
>
> Niels
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: What's the point of listing all artifacts in archetype.xml?
Posted by Niels van Kampenhout <n....@onehippo.com>.
Grzegorz Borkowski wrote:
> I wanted to create my own archetype...
> I've prepared set of prototype sources which should be used as tempate for
> creating new project. According to document "Guide to creating archetypes" I
> should put them under src/main/resources/archetype-resources/. That's ok, I
> put them there.
> But then the user guide says that I have to put every prototype file name
> (with full path) into archetype.xml file! What for? (I gave up at this
> point, it is too much unnecessary work.)
Try generating the archetype by running
mvn archetype:create-from-project
from the root of your prototype project. The generated archetype will be
in target/generated-sources/archetype/. You will probably have to fine
tune a little bit, but at least it saves you writing the file list in
archetype.xml.
> What's the point of such data redundancy? If I have the complete file
> structure under src/main/resources/archetype-resources/, then maven
> archetype plugin should simply copy it when creating project from archetype.
> Putting the list of those files in archetype.xml is waste of time.
> Can somebody explain me why it was designed so?
I can't answer that question I'm afraid -- to me the file list in
archetype.xml seems redundant as well...
Niels
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org