[m2] define dependencies between wars

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[m2] define dependencies between wars

Zachi Hazan
I have to several web modules which are dependent on each other.
Can I define dependency between wars? if not, is their a way to create
one war from several web modules (something like build both modules and
merge them into one war)?
The main problem I see is when merging web.xml and other possible
configuration files.

My structure is:
-pom.xml
-web-module1
-web-module2
... and I trying to create one war from both web-modules

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

Reply | Threaded
Open this post in threaded view
|

Re: [m2] define dependencies between wars

Haryon
I have exactly the same problem : multiple application modules on top
of some common business layer, each application module handle a set of
business functionnalities. One could imagine to deploy only the
required application modules depending on what the customer did buy.

Development didn't start yet, so I have really no idea whether it will
work or not in the long run, but :
- I have decided to test that each web module is a different web application.

My notes to you :
- what do you mean with war dependencies ?
If that's only declaring a <dependency> item in maven, you can for
sure, just add <type>war</type> and <war.bundle>false</> of course :).

- WHY do you need war dependencies ?
If you expect webapp2 to have access to classes in webapp1... no way,
won't work. You have to define a jar to share such. Then put those
shared class on the common (shared) classpath, or on the application
server using a EAR (well I have no idea whether one can share a jar
between two webapps without EJBs).

if you expect that some links on pages from webapp2 call actions from
webapp1, then generate the correct url in webapp2 (i.e. include the
right application context path, which sadly mean that webapp2 can't
work if webapp1 isn't deployed under the right name, or you have to
defined that name in a property file).

if you want to share images and such, you can also work with urls. If
you want to share jsps, call the right urls.

For me, merging web apps was possible, if I defined some XSLT sheet,
and invent some web.xml/struts-config.xml fragments that I would merge
all together. But what I couldn't solve was : how to open webapp1 and
webapp2 in eclipse, and have Lomboz, MyEclipse, or TomcatSysdeo plugin
package the right files at the right place without hand by hand copy
from myself. So I had only one option left : one project = one webapp.

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

Reply | Threaded
Open this post in threaded view
|

Re: [m2] define dependencies between wars

Zachi Hazan
I am also in process of "pre development", so I need to recommend/define
the projects structure.

Haryon wrote:

>I have exactly the same problem : multiple application modules on top
>of some common business layer, each application module handle a set of
>business functionnalities. One could imagine to deploy only the
>required application modules depending on what the customer did buy.
>
>Development didn't start yet, so I have really no idea whether it will
>work or not in the long run, but :
>- I have decided to test that each web module is a different web application.
>
>My notes to you :
>- what do you mean with war dependencies ?
>If that's only declaring a <dependency> item in maven, you can for
>sure, just add <type>war</type> and <war.bundle>false</> of course :)
>
I meant war dependencies in runtime

>- WHY do you need war dependencies ?
>If you expect webapp2 to have access to classes in webapp1... no way,
>won't work. You have to define a jar to share such. Then put those
>shared class on the common (shared) classpath, or on the application
>server using a EAR (well I have no idea whether one can share a jar
>between two webapps without EJBs).
>  
>
Exactly what i wanted ;). I had a feeling it won't work..

>if you expect that some links on pages from webapp2 call actions from
>webapp1, then generate the correct url in webapp2 (i.e. include the
>right application context path, which sadly mean that webapp2 can't
>work if webapp1 isn't deployed under the right name, or you have to
>defined that name in a property file).
>
>if you want to share images and such, you can also work with urls. If
>you want to share jsps, call the right urls.
>
>For me, merging web apps was possible, if I defined some XSLT sheet,
>and invent some web.xml/struts-config.xml fragments that I would merge
>all together. But what I couldn't solve was : how to open webapp1 and
>webapp2 in eclipse, and have Lomboz, MyEclipse, or TomcatSysdeo plugin
>package the right files at the right place without hand by hand copy
>from myself. So I had only one option left : one project = one webapp.
>  
>
It looks the only solution. I also thought on XSLT , but I think the
solution is not comprehensive enough.
Did you tried to create your own war plugin with multiple source paths
that will copy these files into one place?

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


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

Reply | Threaded
Open this post in threaded view
|

Re: [m2] define dependencies between wars

Haryon
I refused to merge 2 webapps from 2 projects, because of issues with
incremental compilation and IDE integration (I mean, too hard to make
MyEclipse automatically detect that a file changed in module1 and
should remerge web.xml and redeploy module 1 AND module 2 into a
webapp.

Two days ago, we found an article on Sun site, about sharing a jar
between two webapps in a EAR. They call it... bundled jar
dependencies, or something like this. We didn't test it yet. But I'm
pretty confident it will work.

On 6/6/05, Zachi Hazan <[hidden email]> wrote:

> I am also in process of "pre development", so I need to recommend/define
> the projects structure.
>
> Haryon wrote:
>
> >I have exactly the same problem : multiple application modules on top
> >of some common business layer, each application module handle a set of
> >business functionnalities. One could imagine to deploy only the
> >required application modules depending on what the customer did buy.
> >
> >Development didn't start yet, so I have really no idea whether it will
> >work or not in the long run, but :
> >- I have decided to test that each web module is a different web application.
> >
> >My notes to you :
> >- what do you mean with war dependencies ?
> >If that's only declaring a <dependency> item in maven, you can for
> >sure, just add <type>war</type> and <war.bundle>false</> of course :)
> >
> I meant war dependencies in runtime
>
> >- WHY do you need war dependencies ?
> >If you expect webapp2 to have access to classes in webapp1... no way,
> >won't work. You have to define a jar to share such. Then put those
> >shared class on the common (shared) classpath, or on the application
> >server using a EAR (well I have no idea whether one can share a jar
> >between two webapps without EJBs).
> >
> >
> Exactly what i wanted ;). I had a feeling it won't work..
>
> >if you expect that some links on pages from webapp2 call actions from
> >webapp1, then generate the correct url in webapp2 (i.e. include the
> >right application context path, which sadly mean that webapp2 can't
> >work if webapp1 isn't deployed under the right name, or you have to
> >defined that name in a property file).
> >
> >if you want to share images and such, you can also work with urls. If
> >you want to share jsps, call the right urls.
> >
> >For me, merging web apps was possible, if I defined some XSLT sheet,
> >and invent some web.xml/struts-config.xml fragments that I would merge
> >all together. But what I couldn't solve was : how to open webapp1 and
> >webapp2 in eclipse, and have Lomboz, MyEclipse, or TomcatSysdeo plugin
> >package the right files at the right place without hand by hand copy
> >from myself. So I had only one option left : one project = one webapp.
> >
> >
> It looks the only solution. I also thought on XSLT , but I think the
> solution is not comprehensive enough.
> Did you tried to create your own war plugin with multiple source paths
> that will copy these files into one place?
>
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [hidden email]
> >For additional commands, e-mail: [hidden email]
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

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