overlay takes two war files and merges them.
so whatever classes and resources you have in one will be included in
the other.
The reason to use a war instead of a jar is if you want to be able to
run that common war in its own (for dev and debug)
- Brill Pappin
On 19-Jun-08, at 12:22 PM, Frank Silbermann wrote:
OK, so I need to package my dependency as a JAR file because I need to
add it to my classpath in Eclipse.
I am not sure how the war overlay tool will help me; it seems to be
used
for getting resources out of a .war file, and we've concluded that I
need a JAR file, right? Is there an easy way to tell Maven to create
both a JAR and a WAR file from the same codebase?
Or, perhaps if I am satisfied to test the common code in Eclipse via
Jetty I don't need to create a WAR file at all?
-----Original Message-----
From: Brill Pappin [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2008 11:06 AM
To: [email protected]
Subject: Re: How to indicate dependency on a .war file?
if you need to do that, then John was right, package it as a JAR file.
In your case you presumably don't need all the webapp metadata that
usually goes along with a war.
However, it still might be worth using the overlay feature because it
means you can easily run the separate wars for debugging and
development
(which it sounds like you are doing). The result however will pretty
much be the same.
1) if you *are not* "running" the common war code for independent
debugging, package it as a jar.
2) if you *are* independently running the common code, then use the
war
overlay.
there is *no* way to get eclipse to see your war as a dependency in
the
eclipse classpath (as John pointed out) because a war is a packaged
application, not a library.
- Brill Pappin
On 19-Jun-08, at 11:55 AM, Frank Silbermann wrote:
That satisfies Maven, thanks! I'm not looking to add any resources
or
pages from the dependency, just the java classes and HTML files, so I
don't think I need the "war overlay" feature. But now I have another
problem.
For debugging in eclipse, how do I tell Eclipse about this
dependency?
When I ran "mvn eclipse:eclipse" it did not produce a classpath
reference for the .war file. When I hand coded the path to the .war
file in my local Maven repository, Eclipse couldn't use it -- perhaps
because the .war file places the .class and .html files inside the
WEB-INF/classes folder.
Is there a way I can expose the classes in the .war file to Eclipse?
-----Original Message-----
From: Brill Pappin [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2008 10:10 AM
To: [email protected]
Subject: Re: How to indicate dependency on a .war file?
Look up "war overlay" in the maven-war-plugin that will give you some
useful information on what you want to do beyond your original
questions.
as for dep types.
A war can be depended upon just like a jar (or anything else for that
matter) you simply specify the type:
<dependency>
<groupId>com.mypackage</groupId>
<artifactId>mywebapp</artifactId>
<version>1.0.0XXX</version>
<type>war</type>
</dependency>
- Brill Pappin
On 19-Jun-08, at 10:59 AM, Frank Silbermann wrote:
I have a question about packaging. I have two Wicket web
applications that display data for two different corporate areas,
but
the look-and-feel are similar. Therefore, I coded in Wicket a tool
project consisting of a bunch of higher-level problem-specific
components that my two projects should depend upon.
In my tool project I built a web page that I use to test (display
and
play with) these components. Therefore, the output of my tool
project
is also .war. How do I tell Maven that my two business applications
depend upon a .war and not a .jar? I'd rather not have to partition
my tool project into separate .war and .jar projects.
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
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]