Mark,

> 
> On 09/01/07, andy law (RI) <[EMAIL PROTECTED]> wrote:
> > I have a situation where I need to build a webapp that has 
> an applet 
> > included in its web tree. I have been trying to work out how to use 
> > the assembly plugin to achieve this, with no success.
> >
> > I can make the web-app dependent on the applet, in which case the 
> > applet is included in WEB-INF/lib inside the war file. 
> However, I need 
> > it to be in / (the root of the war) in order for it to be 
> visible to 
> > be deployed through the server to the browser client.
> 
> Yep, I encountered this a while back and raised:
> http://jira.codehaus.org/browse/MWAR-18


Reading the ticket it seems there is a patch for this, although I'm not
smart enough to work out where the patch is?


> 
> > There is a second problem too. In order to get the applet built to 
> > include *its* dependencies, I've been using the assembly 
> module there 
> > too. It generates a jar file called 
> > project-applet-1.0-SNAPSHOT-jar-with-dependencies.jar which 
> of course 
> > doesn't get pushed into the local repository. It is this 
> version that 
> > I want to make my web app dependent on/include.
> >
> > So, how do I...
> >
> > A) make the applet project deploy the fully built (including
> > dependencies) jar into my local repository
> > B) make the web app dependent on that
> > C) install the applet into the target location inside the webapp, 
> > preferably also preventing it from being installed in the 
> WEB-INF/lib 
> > directory.
> 
> I achieved this by creating a war project that contained the 
> applet jar and it's dependencies, and then used it as a 
> war-overlay in the main webapp project.  The overlay war 
> dynamically brought it in the applet and it's dependencies by 
> using the antrun plugin and the maven ant tasks.  It's a bit 
> of a long-winded route, but it works.
> 
> I believe the dependency plugin can also be used to achieve 
> this, and would be a lot simpler, but I haven't got round to 
> trying it myself.


I've kind of got it working now using the assembly plugin, although
*that* insists on naming everything with extensions rather than just
generating the artifact with the name that one would hope it would use
like I mentioned above. Perhaps the antrun method might not insist on
doing that?

In any case, using this method I have to create the webapp in two steps
- firstly as a webapp that doesn't depend on the applet and then as a
second webapp that depends both on the first webapp and also on the
applet. I can't work out how to get mevenide/netbeans to deploy that
auotmatically, but at least I have something that I can deploy manually.


Later,

Andy

-------------
Yada, yada, yada...

The information contained in this e-mail (including any attachments) is
confidential and is intended for the use of the addressee only.   The
opinions expressed within this e-mail (including any attachments) are
the opinions of the sender and do not necessarily constitute those of
Roslin Institute (Edinburgh) ("the Institute") unless specifically
stated by a sender who is duly authorised to do so on behalf of the
Institute.
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to