[jira] [Commented] (MWAR-360) Overlay: ignore WAR which is transitively dependent over JAR
[ https://issues.apache.org/jira/browse/MWAR-360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16999105#comment-16999105 ] Elliotte Rusty Harold commented on MWAR-360: If this makes sense, it should be unconditionally, not as a configuration option. > Overlay: ignore WAR which is transitively dependent over JAR > > > Key: MWAR-360 > URL: https://issues.apache.org/jira/browse/MWAR-360 > Project: Maven WAR Plugin > Issue Type: Improvement >Reporter: Michal Domagala >Priority: Minor > > Example: > I have WAR project 'Base' with class A. > I have WAR project 'Level1' which is depends on 'Base'. 'Level1' has class B > extends A. > Then 'Base' must have true > Finally, I have WAR project 'Level2' with class C extends B. For the same > reason 'Level1' must have true > Expected: when Level2 WAR is build, only Level1 WAR is overlayed, because > Level1 contains Base > Actual: Level1 and Base are overlayed together. That wastes time. > {noformat} > [INFO] Copying webapp resources [mwar/Level2/src/main/webapp] > [INFO] Processing overlay [ id mwar:Level1] > [INFO] Processing overlay [ id Base:Base] > [INFO] Webapp assembled in [26 msecs] > {noformat} > Reason: Level1 classes JAR has dependency to Base WAR, but that dependency is > "fake" > {noformat} > [INFO] mwar:Level2:war:0.0.1-SNAPSHOT > [INFO] +- mwar:Level1:war:0.0.1-SNAPSHOT:compile > [INFO] \- mwar:Level1:jar:classes:0.0.1-SNAPSHOT:compile > [INFO]+- Base:Base:war:0.0.1-SNAPSHOT:compile > [INFO]\- Base:Base:jar:classes:0.0.1-SNAPSHOT:compile > {noformat} > Proposed solution: There should be option 'notOverlayTransitiveWar' which > allow exclude WARs like 'Base' from overlaying, because the transitive WAR > may be reached only over JAR and I think there is no reason any JAR really > depends on WAR. > Workaround is manually define ovelays in plugin configuration, but Maven > spirit is Convention over Configuration > h2. example > # git clone https://github.com/michaldo/mwar360.git > # cd mwar360 > # mvn package -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MWAR-360) Overlay: ignore WAR which is transitively dependent over JAR
[ https://issues.apache.org/jira/browse/MWAR-360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15757820#comment-15757820 ] Michal Domagala commented on MWAR-360: -- The current issue has not only performance impact, but it is also logical defect Assume I have 3 WARs, war1, war2, war3. Each WAR applies {{true}}. war1 has a file {{x.html}}. war2 depends on war1 and excludes file {{x.html}} war3 depends on war2 and war2-classes Expected: war3 does not contain {{x.html}}, actual: war3 contains {{x.html}} > Overlay: ignore WAR which is transitively dependent over JAR > > > Key: MWAR-360 > URL: https://issues.apache.org/jira/browse/MWAR-360 > Project: Maven WAR Plugin > Issue Type: Improvement >Reporter: Michal Domagala >Priority: Minor > > Example: > I have WAR project 'Base' with class A. > I have WAR project 'Level1' which is depends on 'Base'. 'Level1' has class B > extends A. > Then 'Base' must have true > Finally, I have WAR project 'Level2' with class C extends B. For the same > reason 'Level1' must have true > Expected: when Level2 WAR is build, only Level1 WAR is overlayed, because > Level1 contains Base > Actual: Level1 and Base are overlayed together. That wastes time. > {noformat} > [INFO] Copying webapp resources [mwar/Level2/src/main/webapp] > [INFO] Processing overlay [ id mwar:Level1] > [INFO] Processing overlay [ id Base:Base] > [INFO] Webapp assembled in [26 msecs] > {noformat} > Reason: Level1 classes JAR has dependency to Base WAR, but that dependency is > "fake" > {noformat} > [INFO] mwar:Level2:war:0.0.1-SNAPSHOT > [INFO] +- mwar:Level1:war:0.0.1-SNAPSHOT:compile > [INFO] \- mwar:Level1:jar:classes:0.0.1-SNAPSHOT:compile > [INFO]+- Base:Base:war:0.0.1-SNAPSHOT:compile > [INFO]\- Base:Base:jar:classes:0.0.1-SNAPSHOT:compile > {noformat} > Proposed solution: There should be option 'notOverlayTransitiveWar' which > allow exclude WARs like 'Base' from overlaying, because the transitive WAR > may be reached only over JAR and I think there is no reason any JAR really > depends on WAR. > Workaround is manually define ovelays in plugin configuration, but Maven > spirit is Convention over Configuration > h2. example > # git clone https://github.com/michaldo/mwar360.git > # cd mwar360 > # mvn package -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MWAR-360) Overlay: ignore WAR which is transitively dependent over JAR
[ https://issues.apache.org/jira/browse/MWAR-360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15158592#comment-15158592 ] Michal Domagala commented on MWAR-360: -- I take a look on code and it seems to me that in org.apache.maven.plugin.war.overlay.OverlayManager.getOverlaysAsArtifacts() (https://github.com/apache/maven-plugins/blob/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/overlay/OverlayManager.java#L244) line {{final Set artifacts = project.getArtifacts();}} should be replaced (conditionally) by {{final Set artifacts = project.getDependencyArtifacts();}} I don't see any usecase why transitive dependent WARs should be taken as overlay, because they are already included in direct dependent WARs > Overlay: ignore WAR which is transitively dependent over JAR > > > Key: MWAR-360 > URL: https://issues.apache.org/jira/browse/MWAR-360 > Project: Maven WAR Plugin > Issue Type: Improvement >Reporter: Michal Domagala >Priority: Minor > > Example: > I have WAR project 'Base' with class A. > I have WAR project 'Level1' which is depends on 'Base'. 'Level1' has class B > extends A. > Then 'Base' must have true > Finally, I have WAR project 'Level2' with class C extends B. For the same > reason 'Level1' must have true > Expected: when Level2 WAR is build, only Level1 WAR is overlayed, because > Level1 contains Base > Actual: Level1 and Base are overlayed together. That wastes time. > {noformat} > [INFO] Copying webapp resources [mwar/Level2/src/main/webapp] > [INFO] Processing overlay [ id mwar:Level1] > [INFO] Processing overlay [ id Base:Base] > [INFO] Webapp assembled in [26 msecs] > {noformat} > Reason: Level1 classes JAR has dependency to Base WAR, but that dependency is > "fake" > {noformat} > [INFO] mwar:Level2:war:0.0.1-SNAPSHOT > [INFO] +- mwar:Level1:war:0.0.1-SNAPSHOT:compile > [INFO] \- mwar:Level1:jar:classes:0.0.1-SNAPSHOT:compile > [INFO]+- Base:Base:war:0.0.1-SNAPSHOT:compile > [INFO]\- Base:Base:jar:classes:0.0.1-SNAPSHOT:compile > {noformat} > Proposed solution: There should be option 'notOverlayTransitiveWar' which > allow exclude WARs like 'Base' from overlaying, because the transitive WAR > may be reached only over JAR and I think there is no reason any JAR really > depends on WAR. > Workaround is manually define ovelays in plugin configuration, but Maven > spirit is Convention over Configuration > h2. example > # git clone https://github.com/michaldo/mwar360.git > # cd mwar360 > # mvn package -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MWAR-360) Overlay: ignore WAR which is transitively dependent over JAR
[ https://issues.apache.org/jira/browse/MWAR-360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15148409#comment-15148409 ] Michal Domagala commented on MWAR-360: -- Hi Karl, I provided a full example. I hope my problem will be clear now > Overlay: ignore WAR which is transitively dependent over JAR > > > Key: MWAR-360 > URL: https://issues.apache.org/jira/browse/MWAR-360 > Project: Maven WAR Plugin > Issue Type: Improvement >Reporter: Michal Domagala >Priority: Minor > > Example: > I have WAR project 'Base' with class A. > I have WAR project 'Level1' which is depends on 'Base'. 'Level1' has class B > extends A. > Then 'Base' must have true > Finally, I have WAR project 'Level2' with class C extends B. For the same > reason 'Level1' must have true > Expected: when Level2 WAR is build, only Level1 WAR is overlayed, because > Level1 contains Base > Actual: Level1 and Base are overlayed together. That wastes time. > {noformat} > [INFO] Copying webapp resources [mwar/Level2/src/main/webapp] > [INFO] Processing overlay [ id mwar:Level1] > [INFO] Processing overlay [ id Base:Base] > [INFO] Webapp assembled in [26 msecs] > {noformat} > Reason: Level1 classes JAR has dependency to Base WAR, but that dependency is > "fake" > {noformat} > [INFO] mwar:Level2:war:0.0.1-SNAPSHOT > [INFO] +- mwar:Level1:war:0.0.1-SNAPSHOT:compile > [INFO] \- mwar:Level1:jar:classes:0.0.1-SNAPSHOT:compile > [INFO]+- Base:Base:war:0.0.1-SNAPSHOT:compile > [INFO]\- Base:Base:jar:classes:0.0.1-SNAPSHOT:compile > {noformat} > Proposed solution: There should be option 'notOverlayTransitiveWar' which > allow exclude WARs like 'Base' from overlaying, because the transitive WAR > may be reached only over JAR and I think there is no reason any JAR really > depends on WAR. > Workaround is manually define ovelays in plugin configuration, but Maven > spirit is Convention over Configuration > h2. example > # git clone https://github.com/michaldo/mwar360.git > # cd mwar360 > # mvn package -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MWAR-360) Overlay: ignore WAR which is transitively dependent over JAR
[ https://issues.apache.org/jira/browse/MWAR-360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15147024#comment-15147024 ] Karl Heinz Marbaise commented on MWAR-360: -- The simplest solution is to use the correctly created {{-classes}} artifact instead of the {{war}} artifact. May be you can show an example projects which shows the current state... > Overlay: ignore WAR which is transitively dependent over JAR > > > Key: MWAR-360 > URL: https://issues.apache.org/jira/browse/MWAR-360 > Project: Maven WAR Plugin > Issue Type: Improvement >Reporter: Michal Domagala >Priority: Minor > > Example: > I have WAR project 'Base' with class A. > I have WAR project 'Level1' which is depends on 'Base'. 'Level1' has class B > extends A. > Then 'Base' must have true > Finally, I have WAR project 'Level2' with class C extends B. For the same > reason 'Level1' must have true > Expected: when Level2 WAR is build, only Level1 WAR is overlayed, because > Level1 contains Base > Actual: Level1 and Base are overlayed together. That wastes time. > {noformat} > [INFO] Copying webapp resources [mwar/Level2/src/main/webapp] > [INFO] Processing overlay [ id mwar:Level1] > [INFO] Processing overlay [ id Base:Base] > [INFO] Webapp assembled in [26 msecs] > {noformat} > Reason: Level1 classes JAR has dependency to Base WAR, but that dependency is > "fake" > {noformat} > [INFO] mwar:Level2:war:0.0.1-SNAPSHOT > [INFO] +- mwar:Level1:war:0.0.1-SNAPSHOT:compile > [INFO] \- mwar:Level1:jar:classes:0.0.1-SNAPSHOT:compile > [INFO]+- Base:Base:war:0.0.1-SNAPSHOT:compile > [INFO]\- Base:Base:jar:classes:0.0.1-SNAPSHOT:compile > {noformat} > Proposed solution: There should be option 'notOverlayTransitiveWar' which > allow exclude WARs like 'Base' from overlaying, because the transitive WAR > may be reached only over JAR and I think there is no reason any JAR really > depends on WAR. > Workaround is manually define ovelays in plugin configuration, but Maven > spirit is Convention over Configuration -- This message was sent by Atlassian JIRA (v6.3.4#6332)