The modules are not more than a maven project and as such they build to an
artifact that can be in your local machine repository or in a remote
repository like maven central.

You can reference them by using the <dependency> tag as Benson said.

If you have have a multi-module project like it seems to be the case you
usually do something like:

"mvn clean install" and it will put the artifacts in your local repository
for maven use.

If you haven't already you might want to create a parent pom that agregates
the build. The maven reactor will find the right order to build them.

If you do not have a parent pom then you will have to build each project and
run 'mvn clean install'


On Wed, Jul 6, 2011 at 5:55 PM, Benson Margulies <[email protected]>wrote:

> You will generally find it helpful to grab a look at some significant
> open source project that addresses some of what you are looking to do.
> Have, for example, a look at cxf.apache.org.
>
> On Wed, Jul 6, 2011 at 6:37 PM, kanesee <[email protected]> wrote:
> > I thought the <dependency> section was just for artifacts that are
> located in
> > the repository.
> > For artifacts that consist of my own code, aren't those modules? I may be
> > confusing the two.
> >
> > Our code base actually contains several different products, so I don't
> think
> > it makes sense to have one pom that lists all of the subdirs as modules.
> My
> > understanding is that I would have a pom-package for each of our
> products,
> > which references only the subdirs (modules or dependencies) that it
> needed.
> >
> > Is my understanding correct?
> >
> > --
> > View this message in context:
> http://maven.40175.n5.nabble.com/Referencing-modules-in-a-sibling-folder-tp4559091p4559177.html
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > 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]
>
>


-- 
Those who do not understand Unix are condemned to reinvent it, poorly.
Any sufficiently recent Microsoft OS contains an ad hoc,
informally-specified, bug-ridden, slow implementation of half of Unix.

Reply via email to