You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by gerhard presser <gp...@groiss.com> on 2009/04/03 08:34:21 UTC

project layout, multiple inter-dependent modules

hi all
i'm new to using maven. i'm developing a huge java enterprise application.
up to now, we are using ant to compile, pack and distribute our sources.

we also have some kind of module architecture. we have several source
folders which
are ordered as a 'stack', so lower 'modules' must not reference higher
'modules'. this
is accomplished by compiling the folders in the propper order. in the end
all classfiles
are in the same directory.

my 'poor-man's-approach' was, to use the builder-helper-plugin to add
multiple source-folders.
but with that solution, inter-module-references are possible again.

how can i set up our project with maven? do i really have to set up a
project for each of your modules
and define the dependencies, use the reactor plugin or something else to
build it?

our folder sturcture looks something like:

root
----java
-------utils
-------servlets
-------store
-------orgdata
-------core

so utils may not reference any classes from serlvet/store... and core may
reference all other modules

thanks for some advice
cu
-- 
View this message in context: http://www.nabble.com/project-layout%2C-multiple-inter-dependent-modules-tp22862757p22862757.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: project layout, multiple inter-dependent modules

Posted by gerhard presser <gp...@groiss.com>.
the problem is that it's not really at my hand to choose that.
the module-structure is just an internal decision our customers
may not have to know about.


Wayne Fay wrote:
> 
>> ok...and what's the best way to create ONE jar-file with all sources in
>> the
>> end?
> 
> I simply wouldn't do that. But if you had to, you could use
> dependency:unpack to grab all the sources, unpack into a common
> target, and then repackage it.
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/project-layout%2C-multiple-inter-dependent-modules-tp22862757p22863619.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: project layout, multiple inter-dependent modules

Posted by Wayne Fay <wa...@gmail.com>.
> ok...and what's the best way to create ONE jar-file with all sources in the
> end?

I simply wouldn't do that. But if you had to, you could use
dependency:unpack to grab all the sources, unpack into a common
target, and then repackage it.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: project layout, multiple inter-dependent modules

Posted by gerhard presser <gp...@groiss.com>.
ok...and what's the best way to create ONE jar-file with all sources in the
end?


Wayne Fay wrote:
> 
>> how can i set up our project with maven? do i really have to set up a
>> project for each of your modules and define the dependencies
> 
> Yes, this is the best/right way to use Maven.
> 
> Pick the smallest/lowest artifact and turn it into a Maven project.
> Repeat for all of the items in the bottom of your stack. Move to the
> next level, repeat, adding dependencies on the previous level as
> needed. Continue until you get to the top (core in your case).
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/project-layout%2C-multiple-inter-dependent-modules-tp22862757p22863284.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: project layout, multiple inter-dependent modules

Posted by Wayne Fay <wa...@gmail.com>.
> how can i set up our project with maven? do i really have to set up a
> project for each of your modules and define the dependencies

Yes, this is the best/right way to use Maven.

Pick the smallest/lowest artifact and turn it into a Maven project.
Repeat for all of the items in the bottom of your stack. Move to the
next level, repeat, adding dependencies on the previous level as
needed. Continue until you get to the top (core in your case).

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org