maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Horwitz (JIRA)" <j...@codehaus.org>
Subject [jira] Updated: (MWAR-73) war overlay mechanism does not work for classes
Date Sun, 03 Dec 2006 11:36:41 GMT
     [ http://jira.codehaus.org/browse/MWAR-73?page=all ]

Michael Horwitz updated MWAR-73:
--------------------------------

    Attachment: warpath.patch.tar.gz

I am attaching a patch for the wr plugin to include the functionality from the Warpath plugin
developed for the AppFuse project to solve this issue. We have been using the warpath plugin
on the AppFuse project for a while now, and it seems stable. All documentation on the warpath
feature is included within the patch as .apt files.

To summarise:

1) All classes from WEB-INF/lib are extracted to a jar for inclusion as a system scope dependency
on the project. As a result the classes are available during compile, but are not included
in the final war.
2) A new artifact type, warpath, is defined by the plugin which allows users to selectively
decide which war dependencies to include on the classpath and which not. This prevents changes
to the behaviour of the plugin which may affect existing projects which depend on war overlay.
3) Projects are correctly set up for Idea and Eclipse.

Outstanding issues:
1) This will not work if the war sources have been included as a jar file (archiveClasses
flag is set). This should be trivial to fix.
2) It does not solve the war overlay ordering problem.

> war overlay mechanism does not work for classes
> -----------------------------------------------
>
>                 Key: MWAR-73
>                 URL: http://jira.codehaus.org/browse/MWAR-73
>             Project: Maven 2.x War Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.0, 2.1, 2.0.1, 2.0.2
>         Environment: all OS, all JDK, currently using jdk1.4.2_10 and jdk1.5.0_06 under
linux fedora core 5/x86_64 and sunOS5.10/Sparc64
>            Reporter: mark struberg
>         Attachments: maven-war-plugin-patch.tar.gz, warpath.patch.tar.gz
>
>
> PROBLEM DESCRIPTION:
> When building a WAR (e.g. war2.war) which depends on another WAR (e.g. war1.war), the
web-resources from the dependant war are beeing used as base for overlaying. 
> This mechanism doesn't currently work for the classes within the dependant war, altough
it is specified by the plugin documentation 
> See the SampleActionDependency.class in http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html

> APPLIED PATCH:
> I have written two simple war examples war1 and war2 and extended the maven-war-plugin
by an own WarClasspathMojo which is bound to the phase generate-resources to fix this issue.
> Since i found no way to add non-artifact parts to the classpath, i simply unpack all
dependant war files (reusing the functions already there in AbstractWarMojo) and add a resource-path
to the $explodedWarDir/WEB-INF/classes for each of them. The 
> The implementation fits all my needs, but if you provide me with a hint how it may be
improved, then let me know.
> KNOWN ISSUES:
> This mechanism currently doesn't work if you have specified to generate an archive for
the dependant war's classes.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message