You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by John Prystash <st...@yahoo.com> on 2009/02/02 16:08:53 UTC

[mule-user] Environment dependant and independent modules question

Hi, I have a couple best practices questions.  My project setup is a parent with two modules, I'll call them core and container.  The core module has all the core logic.  The container module depends on it and packages everything up via the assembly plugin for distribution.  The core is environment-independent, no property filters, and the container module is environment dependent with properties files filtered for environment specific things (install directory, db connections, ports, etc.).

Now I throw in an applicationContext.xml for Spring with many of beans dependant on environment specific database information.  Since the Application Context is specific and really required by the core logic, I would first think that the file belongs in my core module, but that then breaks the environment-independent aspect of the core, so maybe the container module would be better?

On the other hand, my database-related beans and the related Application Context definitions might be better served living in a third "datbase" module.  I could then keep the core entity classes environment-independent and have the new module depend on the core.

Second question: In my container module, I reproduce many of the dependencies found in the core module scoped at runtime so that they can be included in my assembly.  To avoid this duplication, would it may be better to have the core module produce a jar-with-dependenices and have only that be part of the assembly?  What would be the best or recommended practice here?

Whew.. 
Thanks for any thoughts and insights in advance.


      

[maven-user] Environment dependant and independent modules question

Posted by John Prystash <st...@yahoo.com>.
Meant to prefix this email with maven-user, my apologies.




________________________________
From: John Prystash <st...@yahoo.com>
To: Maven Users List <us...@maven.apache.org>
Sent: Monday, February 2, 2009 10:08:53 AM
Subject: [mule-user] Environment dependant and independent modules question


Hi, I have a couple best practices questions.  My project setup is a parent with two modules, I'll call them core and container.  The core module has all the core logic.  The container module depends on it and packages everything up via the assembly plugin for distribution.  The core is environment-independent, no property filters, and the container module is environment dependent with properties files filtered for environment specific things (install directory, db connections, ports, etc.).

Now I throw in an applicationContext.xml for Spring with many of beans dependant on environment specific database information.  Since the Application Context is specific and really required by the core logic, I would first think that the file belongs in my core module, but that then breaks the environment-independent aspect of the core, so maybe the container module would be better?

On the other hand, my database-related beans and the related Application Context definitions might be better served living in a third "datbase" module.  I could then keep the core entity classes environment-independent and have the new module depend on the core.

Second question: In my container module, I reproduce many of the dependencies found in the core module scoped at runtime so that they can be included in my assembly.  To avoid this duplication, would it may be better to have the core module produce a jar-with-dependenices and have only that be part of the assembly?  What would be the best or recommended practice here?

Whew.. 
Thanks for any thoughts and insights in advance.