You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wendy Smoak <ws...@gmail.com> on 2005/11/11 19:11:51 UTC

[m2] Creating a new webapp archetype

I'm trying to create the "Struts Blank Archetype" (the m2 version of
the struts-blank.war webapp that's available.)

So I'm following the instructions here...
   http://maven.apache.org/guides/mini/guide-creating-archetypes.html

And I read:
The <sources>, <resources>, <test-resources> and <site-resources> tags
represent the different sections of the project:

    * <sources> = src/main/java
    * <resources> = src/main/resources
    * <test-sources> = src/test/java
    * <test-resources> = src/test/resources
    * <site-resources> = src/site

What about src/main/webapp?  I need to put the various config files in
WEB-INF and have them included in the archetype.

Then I thought I'd check out the sources of maven-archetype-plugin,
but there's no 'Project Info' section with a 'Source Repository' link
on http://maven.apache.org/plugins/maven-archetype-plugin/index.html

What I'm really looking for is the source code for
maven-archetype-webapp so I can see how to structure an archetype that
creates a webapp.

Help?

--
Wendy Smoak

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


Re: [m2] Creating a new webapp archetype

Posted by Wendy Smoak <ws...@gmail.com>.
On 11/11/05, Wendy Smoak <ws...@gmail.com> wrote:

> Interestingly, all four of the .xml files in WEB-INF were included in
> my archetype, not just web.xml.  So do I even have to put them in
> archetype.xml?

As long as I'm having this conversation with myself... all four xml
files were in the archetype, but only the ones in archetype.xml make
it into the new project when you use 'mvn archetype:create'.

--
Wendy

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


Re: [m2] Creating a new webapp archetype

Posted by Wendy Smoak <ws...@gmail.com>.
On 11/11/05, Wendy Smoak <ws...@gmail.com> wrote:

> What I'm really looking for is the source code for
> maven-archetype-webapp so I can see how to structure an archetype that
> creates a webapp.

http://svn.apache.org/repos/asf/maven/archetype/trunk/maven-archetypes/

Moving on... I copied from maven-archetype-webapp's archetype.xml:

<archetype>
  <id>struts-archetype-blank</id>
  <resources>
    <resource>src/main/webapp/WEB-INF/web.xml</resource>
  </resources>
</archetype>

Interestingly, all four of the .xml files in WEB-INF were included in
my archetype, not just web.xml.  So do I even have to put them in
archetype.xml?

Also, the guide says that the <id> tag in archetype.xml should be the
same as the <artifactId> in the archetype's pom.xml, but that is not
the case for maven-archetype-webapp, which has:
   archetype.xml:  <id>webapp</id>
   pom.xml:  <artifactId>maven-archetype-webapp</artifactId>

Somewhat confused, but making progress,
--
Wendy Smoak

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