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 2008/10/25 03:54:45 UTC
Re: packaging statement does not get in pom file
On Fri, Oct 24, 2008 at 6:39 PM, Petr V. <gr...@yahoo.com> wrote:
> I am issuing following commands from command prompt :
> c:\project\ >mvn archetype:create -DgroupId=com.company.project -DartifactId=main
> Then I get the whole maven dir structure created for project
>
> But
> I want main to have packaging of type "pom" but by default, it defines
> packaging type as "jar"
I don't think there's an archetype for a pom type project. It's come
up before though, maybe there should be. I usually just copy one from
another project and edit it. All you need is:
<project ... >
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>myproject</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
</project>
> Now I go to main dir and issue following command
> c:\project\main >mvn archetype:create -DgroupId=com.company.project -DartifactId=mod1
>
> Now
> the whole structure is created for mod1 but the pom file does not
> define packaging type at all :-( . Though it adds parent detail in pom
> file and also add module detail in pom file of main's pom file. How can
> I ask maven to add packaging statement with "jar"
It's interesting that it includes packaging when you use the archetype
to create a standalone project but not if you use it to create a child
project. However, packaging of jar is the default, so you don't have
to specify it. (Try removing <packaging> from the standalone
project-- mvn install will still work.)
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org