You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christopher Cudennec <cu...@web.de> on 2006/04/06 11:57:26 UTC
Multi modules/different pom/more than one source dir
Hey everyone,
as far as I know it is not possible to set the name of the pom-file when
using a multi module project. The xml schema states this:
<xs:element name="modules" minOccurs="0">
<xs:annotation>
<xs:documentation source="version">4.0.0</xs:documentation>
<xs:documentation source="description">The modules to build in
addition to the current project</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="module" minOccurs="0"
maxOccurs="unbounded" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
So my pom.xml for the project looks something like
<project>
...
<modules>
<module>one</module>
<module>two</module>
</modules>
</project>
I guess the default file name (i.e. pom.xml) is assumed. I can build my
projects by commandline using something like "mvn -f myproject.xml" so
why not adding an attribute to set the name of the pom file?
The reason why I need this is that I have to cope with a multi source
folder problem. I already know that this is regarded as being "evil" but
I would like to introduce maven to an existing project without (much)
changing the directory structure... I can solve my problem in each
subproject by creating a new pom.xml and packaging this project before
my "real" project.
Any comments or suggestions?
Thanks,
Christopher
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multi modules/different pom/more than one source dir
Posted by Napoleon Esmundo Ramirez <nr...@gmail.com>.
Hello,
Well, you are right that the <module /> requires a directory and that the
multi-module build assumes a pom.xml in every module--but it isn't what the
xsd states (it only describes the elements, types and cardinality).
Anyway, I would recommend that you follow the convention. It would really
be easier that way since you wouldn't have to configure much. :)
Cheers!
Nap
On 4/6/06, Christopher Cudennec <cu...@web.de> wrote:
>
> Hey everyone,
>
> as far as I know it is not possible to set the name of the pom-file when
> using a multi module project. The xml schema states this:
>
> <xs:element name="modules" minOccurs="0">
> <xs:annotation>
> <xs:documentation source="version">4.0.0</xs:documentation>
> <xs:documentation source="description">The modules to build in
> addition to the current project</xs:documentation>
> </xs:annotation>
> <xs:complexType>
> <xs:sequence>
> <xs:element name="module" minOccurs="0"
> maxOccurs="unbounded" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
>
> So my pom.xml for the project looks something like
>
> <project>
> ...
> <modules>
> <module>one</module>
> <module>two</module>
> </modules>
> </project>
>
> I guess the default file name (i.e. pom.xml) is assumed. I can build my
> projects by commandline using something like "mvn -f myproject.xml" so
> why not adding an attribute to set the name of the pom file?
>
> The reason why I need this is that I have to cope with a multi source
> folder problem. I already know that this is regarded as being "evil" but
> I would like to introduce maven to an existing project without (much)
> changing the directory structure... I can solve my problem in each
> subproject by creating a new pom.xml and packaging this project before
> my "real" project.
>
> Any comments or suggestions?
>
> Thanks,
>
> Christopher
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>