I am not a big fan of the "big bang" theory of software development.
I prefer to have a set of core apis that are compiled, tested and deployed into a repository (nexus in my case) on their own and referenced by the poms that produce the executable artifacts.

We also have poms that only produce consolidated jars of third party software so that the modules have a smaller set of dependencies that reference our poms and our shared poms control the versions of the third party software.

  <dependencies>
    <dependency>
      <groupId>com.artifact-software.lms</groupId>
      <artifactId>lms-pom-mysql-hibernate-spring</artifactId>
      <version>${project.version}</version>
    </dependency>

This will get you the "official" versions of all of the Spring, Hibernate and MySQL jars that are packaged up by the POM for the lms-pom-mysql-hibernate-spring.jar. This jar is also deployed as a shared jar under tomcat so it only appears once on the server.

The person developing the main module does not have to be aware of the versions of the third party artifacts and the project poms are really small even in a project that uses around 60 individual 3rd party libraries. They only have to know what version of our application they are building.

Ron

On 05/05/2010 6:47 AM, Peter Butkovic wrote:
Hello,

I'd need some more clarification in case I use module structure proposed:

does it mean I'd have in server/pom.xml as well as in client/pom.xml?
   <dependencies>
     <dependency>
       <groupId>core-api</groupId>
       <artifactId>core-api</artifactId>
       <version>0.0.1-SNAPSHOT</version>
     </dependency>

or something similar that would match name+version of core-api

I'd like to have automatically built core-api in case I do some
updates in it and then I build server or client module using:
mvn site (but in client or server module, not in the root one)

As for example, server developer doesn't need client to be built (as
it's quite time consuming), but needs only server and core-api.

Do you have any suggestion? Did I get it correctly or am I missing
some important point?

Thanks

Peter B.




On Wed, May 5, 2010 at 12:20 PM, Peter Butkovic<[email protected]>  wrote:
Hello,

thanks for fast reply! I'll follow your proposal.

Peter B.


On Wed, May 5, 2010 at 10:42 AM, Karl Heinz Marbaise<[email protected]>  wrote:
Hi,

i would suggest to create the following structure. Mor


   pom.xml (root) (modules: client, server, core-api)
     +---- client
                 +-- pom.xml  (parent: root: dependency: core-api)
     +---- server
                 +-- pom.xml   (parent: root: dependeny: core-api)
     +---- core-api
                 +-- pom.xml   (parent: root)


The question about core-api is that you don't positioned core-api under
client nor under server, cause it's used by both so you have to put it on
the same level.

Kind regards
Karl Heinz Marbaise
--
View this message in context: 
http://old.nabble.com/maven-multi-module-project-structure-tp28457606p28458206.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]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to