You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Piotr Skawinski <pi...@gmail.com> on 2011/01/19 09:22:06 UTC
Generating web project with java, webapp, and resource folder from
archtype goal
Hi,
Is there a way in maven to generate a web project with java, resources, and
webapp folders running the archtype goal. Maven suggest to create a multi
project module with:
multi-project
|-- pom.xml
|-- my-app
|-- my-web-app
by creating a multi project pom file and then running:
mvn archetype:create \
-DgroupId=some-group-id \
-DartifactId=my-app
which generates:
my-app
|-- pom.xml
|--src
'-- main
'-- java
and then:
mvn archetype:create \
-DarchetypeArtifactId=maven-archetype-webapp \
-DgroupId=some-group-id \
-DartifactId=my-web-app
which generates:
my-web-app
|-- pom.xml
|-- src
'--main
'-- resources
'-- webapp
But i would like to get this structure
web-app
|-- pom.xml
|-- src
'--main
'-- java
'-- resources
'-- webapp
from running the archtype goal on.
cheers, Piotr
Re: Generating web project with java, webapp, and resource folder
from archtype goal
Posted by Wayne Fay <wa...@gmail.com>.
> But i would like to get this structure
>
> web-app
> |-- src
> '--main
> '-- java
Simply use the existing archetype and then run "mkdir
web-app/src/main/java" and poof, you've got it.
The archetype builds a project that conforms to the Maven believes are
the best practices/standards. You're asking how to build something
that is not a best practice and thus, is not as well supported. You'll
have to handle this manually, or make your own archetype that includes
this directory.
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org