I personally have never had any desire to perform a partial build as
you desire. So I have no idea if it is possible and how it would be
configured. ;-)

If you figure it out, please do let the rest of us know.

Wayne


On 3/17/06, Pierre Monestie <[EMAIL PROTECTED]> wrote:
> Wayne,
> The second way you describe is the way my project is defined.
> Assume I have a couple extra modules defined this way and I only want
> to build module1. If I issue mvn package all the modules will be build
> correct? My question is: Is there a command line switch to tell mvn to
> build only module1 (and it's dependencies). I know I could put  an
> ignore clause(or something like that) in the top level file but that's
> not really what I want.
>
> Thanks,
> Pierre
>
> On 3/17/06, Wayne Fay <[EMAIL PROTECTED]> wrote:
> > A few ways to do this...
> >
> > Assume you're starting from parent directory...
> > cd module3
> > mvn install
> > cd ..
> > cd module1
> > mvn package
> >
> > This will result in module1 being built and the resulting jar placed
> > in module1/target.
> >
> > OR
> >
> > Add to parent/pom.xml:
> >   <modules>
> >     <module>module3</module>
> >     <module>module2</module>
> >     <module>module1</module>
> >   </modules>
> >
> > Then make sure you have in module1/pom.xml:
> > <?xml version="1.0" encoding="iso-8859-1"?>
> > <project>
> >   <parent>
> >     <groupId>blah</groupId>
> >     <artifactId>parent</artifactId>
> >     <version>1.0.0</version>
> >   </parent>
> >   <modelVersion>4.0.0</modelVersion>
> >   <groupId>blah</groupId>
> >   <artifactId>module1</artifactId>
> >   <packaging>jar</packaging>
> >   <version>1.0.0</version>
> >   <dependencies>
> >     <dependency>
> >       <groupId>blah</groupId>
> >       <artifactId>module3</artifactId>
> >       <version>1.0.0</version>
> >       <scope>compile</scope>
> >       <type>jar</type>
> >    </dependency>
> >
> > And then issue a simple "mvn package" command from parent directory.
> > This will also place the resulting jar in the module1/target
> > directory.
> >
> > Wayne
> >
> >
> > On 3/17/06, Pierre Monestie <[EMAIL PROTECTED]> wrote:
> > > Hello,
> > > I've been looking all over for this and could not find any answer:
> > > In a multi module project how can I, from the parent level, build a
> > > specific module?
> > > Going into the child I want to build does not work as it refers to a 
> > > parent.
> > >
> > > For example I have:
> > > parent
> > >  --module1 (depends on module3)
> > >  --module2
> > >  --module3
> > >
> > > and I just want to build module1.
> > > Tell me this is possible plz :)
> > > Thanks in advance,
> > > Pierre
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to