What I'm looking for is the ability to have a WAR that can act like a JAR. That is, any projects that depend on the WAR will inherit its dependencies. The current system basically requires me to publish a WAR w/o any dependencies and then make end-users projects include both a JAR and a WAR.
If I was able to use a WAR as a JAR, and inherit all its dependencies, I could test and publish the WAR for download - and somehow exclude WEB-INF/lib from publishing/downloading. The dependencies would then be downloaded in the normal Maven way. As it stands, my understanding is its best to create the following: 1. JAR project that contains all the dependencies 2. WAR project that contains no dependencies, just static files 3. WAR project to test including both #1 and #2 since #2 can't really be tested since it has no dependencies. Is this the current recommended way to do this? While the transition to Maven 2 might be easier to end users, using the setup above seems like it might be a lot more complicated for folks hoping to contribute to AppFuse. Thanks, Matt On 8/29/06, Carlos Sanchez <[EMAIL PROTECTED]> wrote:
right, I though that was what you requested, but I see now it's not On 8/29/06, Matt Raible <[EMAIL PROTECTED]> wrote: > Correct me if I'm wrong, but it seems like this plugin merely JARs up > the classes and puts them into WEB-INF/lib? > > I'm guessing it doesn't make the WAR dependency type any smarter, so > including a WAR gives you access to it's dependencies? Does it solve > the problem where a WAR dependency should have no dependencies (b/c > you won't get access to them anyway)? > > Thanks, > > Matt > > On 8/29/06, Carlos Sanchez <[EMAIL PROTECTED]> wrote: > > Something like > > > > <plugin> > > <artifactId>maven-war-plugin</artifactId> > > <version>2.0.2-20060829.202242-1</version> > > <configuration> > > <archiveClasses>true</archiveClasses> > > </configuration> > > </plugin> > > > > > > <pluginRepositories> > > <pluginRepository> > > <id>apache.org</id> > > <name>Apache Snapshot Repository</name> > > <url>http://people.apache.org/repo/m2-snapshot-repository</url> > > <releases> > > <enabled>false</enabled> > > </releases> > > </pluginRepository> > > </pluginRepositories> > > > > > > On 8/29/06, Matt Raible <[EMAIL PROTECTED]> wrote: > > > On 8/29/06, Carlos Sanchez <[EMAIL PROTECTED]> wrote: > > > > On 8/25/06, Matt Raible <[EMAIL PROTECTED]> wrote: > > > > > On 8/25/06, Carlos Sanchez <[EMAIL PROTECTED]> wrote: > > > > > > On 8/25/06, Matt Raible <[EMAIL PROTECTED]> wrote: > > > > > > > On 8/25/06, Carlos Sanchez <[EMAIL PROTECTED]> wrote: > > > > > > > > what's the problem? jetty:run? you can use war:inplace jetty:run > > > > > > > > > > > > > > Yeah, jetty6:run doesn't work. jetty6:run-war and jetty6:run-exploded > > > > > > > both seem to work fine, but don't pick up changes that I make/save in > > > > > > > my IDE. > > > > > > > > > > > > > > > > > > jetty6 was renamed to jetty > > > > > > It's mantained by Mortbay, I don't know if they'll be adding the war > > > > > > overlay feature to jetty:run. I was instructed to use the war:inplace > > > > > > jetty:run when overlaying wars. > > > > > > > > > > > > jetty:run-exploded works again the target dir so if you IDE don't copy > > > > > > the changed files there it won't work. You may configure it tough. > > > > > > > > > > > > > > > > > > > > Note: I say jetty6 vs. jetty b/c jetty6 actually works for me whereas > > > > > > > the jetty plugin seems to have issues with my project. > > > > > > > > > > > > > > I suppose war:inplace works, but I tend to stay away from that b/c it > > > > > > > copies files into your source tree and I've seen rookie developers > > > > > > > often get confused when they go to check things into source control. > > > > > > > If there was a war:inplace-clean, it might be more usable. However, > > > > > > > in something like AppFuse, where there will be .xml files overlayed > > > > > > > from another WAR - it might lead to a lot of confusion when folks use > > > > > > > war:inplace. > > > > > > > > > > > > > > Do you think the current directory/project structure I have in place > > > > > > > is a good one? > > > > > > > > > > > > > > appfuse2 > > > > > > > - data > > > > > > > - common (model objects, interfaces) > > > > > > > - hibernate > > > > > > > - ibatis > > > > > > > - service > > > > > > > - web > > > > > > > - common > > > > > > > - common-war > > > > > > > - jsf > > > > > > > - jsf-war > > > > > > > - spring > > > > > > > - spring-war > > > > > > > - struts > > > > > > > - struts-war > > > > > > > - tapestry > > > > > > > - tapestry-war > > > > > > > > > > > > > > I'd rather not have framework and framework-war, but it seems it's > > > > > > > necessary for end users to get both base classes and static files with > > > > > > > the war-overlay feature. > > > > > > > > > > > > looks right. In m1 I think there was an option to add the classes as a > > > > > > jar to the war instead of copying them to web-inf/classes. > > > > > > > > > > Really!? If this was added to M2, could I revert back to one WAR > > > > > project (removing the similar JAR) project? If so, I'd *really* like > > > > > to see this added, and of course, would be willing to try writing the > > > > > patch myself. > > > > > > > > > > > > The config option is archiveClasses, at least in the latest war plugin in svn > > > > > > Do you have a usage example for this option? How would I got about > > > checking this plugin out from svn and installing it locally? Is this > > > documented somewhere? > > > > > > Thanks, > > > > > > Matt > > > > > > > > > > > > > > > > > Matt > > > > > > > > > > > The problem is how wars work, it's pretty limited. > > > > > > > > > > > > > > > > > > > > Thanks, > > > > > > > > > > > > > > Matt > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 8/25/06, Matt Raible <[EMAIL PROTECTED]> wrote: > > > > > > > > > While the war-overlay feature appears to work pretty well, it doesn't > > > > > > > > > work at all with the jetty6 plugin. Is this a known issue? Are there > > > > > > > > > any plans to fix this, or should I talk to someone on a different > > > > > > > > > (jetty) mailing list? > > > > > > > > > > > > > > > > > > Without this feature, it doesn't seem that AppFuse can be a war > > > > > > > > > library, but rather will have to continue as a starter project w/ a > > > > > > > > > bunch of files in it by default. > > > > > > > > > > > > > > > > > > Thanks, > > > > > > > > > > > > > > > > > > Matt > > > > > > > > > > > > > > > > > > http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > I could give you my word as a Spaniard. > > > > > > > > No good. I've known too many Spaniards. > > > > > > > > -- The Princess Bride > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > I could give you my word as a Spaniard. > > > > > > No good. I've known too many Spaniards. > > > > > > -- The Princess Bride > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > -- > > > > I could give you my word as a Spaniard. > > > > No good. I've known too many Spaniards. > > > > -- The Princess Bride > > > > > > > > > > > > > -- > > I could give you my word as a Spaniard. > > No good. I've known too many Spaniards. > > -- The Princess Bride > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- I could give you my word as a Spaniard. No good. I've known too many Spaniards. -- The Princess Bride
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
