[ 
https://issues.apache.org/jira/browse/MEAR-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17244742#comment-17244742
 ] 

Marat Abrarov edited comment on MEAR-289 at 12/20/20, 7:28 AM:
---------------------------------------------------------------

[~sschmidt] (reporter) and [~elharo] (worked on MEAR-288),

There is a chance that this issue is fixed within MEAR-288. Please retest your 
case with Maven EAR Plugin built from the master branch. I tried to do that and 
found no issue (comparing to the results produced by Maven EAR Plugin 3.1.0).

Here is my test of the given repro-project ([^maven-ear-example.zip]) which 
uses Maven EAR Plugin 3.1.0:
{noformat}
$ mvn clean package
...
$ unzip -vl module-ear/target/module-ear-0-SNAPSHOT.ear
Archive:  module-ear/target/module-ear-0-SNAPSHOT.ear
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
     212  Defl:N      139  34% 2020-12-06 17:04 d29cf45c  META-INF/MANIFEST.MF
       0  Stored        0   0% 2020-12-06 17:04 00000000  META-INF/
       0  Stored        0   0% 2020-12-06 17:04 00000000  lib/
       0  Stored        0   0% 2020-12-06 17:04 00000000  META-INF/maven/
       0  Stored        0   0% 2020-12-06 17:04 00000000  
META-INF/maven/com.example/
       0  Stored        0   0% 2020-12-06 17:04 00000000  
META-INF/maven/com.example/module-ear/
     477  Defl:N      258  46% 2020-12-06 17:03 697502a0  
META-INF/application.xml
    4214  Defl:N     3063  27% 2020-12-06 17:04 987f5ff5  
com.example-module-war-0-SNAPSHOT.war
    1946  Defl:N     1052  46% 2020-12-06 17:04 fbd50bcf  
lib/com.example-module-jar-0-SNAPSHOT.jar
    1687  Defl:N      475  72% 2020-11-12 16:54 9e8c42bb  
META-INF/maven/com.example/module-ear/pom.xml
      64  Defl:N       65  -2% 2020-12-06 17:04 7dde0569  
META-INF/maven/com.example/module-ear/pom.properties
--------          -------  ---                            -------
    8600             5052  41%                            11 files
$ unzip -vl 
module-ear/target/module-ear-0-SNAPSHOT/com.example-module-war-0-SNAPSHOT.war
Archive:  
module-ear/target/module-ear-0-SNAPSHOT/com.example-module-war-0-SNAPSHOT.war
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
     267  Defl:N      170  36% 2020-12-06 17:03 df2d2884  META-INF/MANIFEST.MF
       0  Stored        0   0% 2020-12-06 17:03 00000000  META-INF/
       0  Stored        0   0% 2020-12-06 17:03 00000000  META-INF/maven/
       0  Stored        0   0% 2020-12-06 17:03 00000000  
META-INF/maven/com.example/
       0  Stored        0   0% 2020-12-06 17:03 00000000  
META-INF/maven/com.example/module-war/
       0  Stored        0   0% 2020-12-06 17:03 00000000  WEB-INF/
       0  Stored        0   0% 2020-12-06 17:03 00000000  WEB-INF/classes/
       0  Stored        0   0% 2020-12-06 17:03 00000000  WEB-INF/lib/
      64  Defl:N       65  -2% 2020-12-06 17:03 1310927b  
META-INF/maven/com.example/module-war/pom.properties
    1057  Defl:N      334  68% 2020-11-12 16:54 fef6778d  
META-INF/maven/com.example/module-war/pom.xml
    1946  Defl:N     1052  46% 2020-12-06 17:03 fbd50bcf  
WEB-INF/lib/module-jar-0-SNAPSHOT.jar
    1927  Defl:N     1025  47% 2020-12-06 17:03 935e5609  
WEB-INF/lib/module-jar2-0-SNAPSHOT.jar
--------          -------  ---                            -------
    5261             2646  50%                            12 files
{noformat}
And here is the same test with Maven EAR Plugin 3.2.0-SNAPSHOT built from the 
master branch:
{noformat}
$ mvn clean package -Dmaven-ear-plugin.version=3.2.0-SNAPSHOT
...
$ unzip -vl module-ear/target/module-ear-0-SNAPSHOT.ear
Archive:  module-ear/target/module-ear-0-SNAPSHOT.ear
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
     221  Defl:N      143  35% 2020-12-06 17:05 8528f16f  META-INF/MANIFEST.MF
       0  Stored        0   0% 2020-12-06 17:05 00000000  META-INF/
       0  Stored        0   0% 2020-12-06 17:05 00000000  lib/
       0  Stored        0   0% 2020-12-06 17:05 00000000  META-INF/maven/
       0  Stored        0   0% 2020-12-06 17:05 00000000  
META-INF/maven/com.example/
       0  Stored        0   0% 2020-12-06 17:05 00000000  
META-INF/maven/com.example/module-ear/
     477  Defl:N      258  46% 2020-12-06 17:05 697502a0  
META-INF/application.xml
    3012  Defl:N     2055  32% 2020-12-06 17:05 f3062fe2  
com.example-module-war-0-SNAPSHOT.war
    1946  Defl:N     1062  45% 2020-12-06 17:05 6e22962d  
lib/com.example-module-jar-0-SNAPSHOT.jar
    1687  Defl:N      475  72% 2020-11-12 16:54 9e8c42bb  
META-INF/maven/com.example/module-ear/pom.xml
      64  Defl:N       65  -2% 2020-12-06 17:05 7dde0569  
META-INF/maven/com.example/module-ear/pom.properties
--------          -------  ---                            -------
    7407             4058  45%                            11 files
$ unzip -vl 
module-ear/target/module-ear-0-SNAPSHOT/com.example-module-war-0-SNAPSHOT.war
Archive:  
module-ear/target/module-ear-0-SNAPSHOT/com.example-module-war-0-SNAPSHOT.war
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
     267  Defl:N      170  36% 2020-12-06 17:05 df2d2884  META-INF/MANIFEST.MF
       0  Stored        0   0% 2020-12-06 17:05 00000000  META-INF/
       0  Stored        0   0% 2020-12-06 17:05 00000000  META-INF/maven/
       0  Stored        0   0% 2020-12-06 17:05 00000000  
META-INF/maven/com.example/
       0  Stored        0   0% 2020-12-06 17:05 00000000  
META-INF/maven/com.example/module-war/
       0  Stored        0   0% 2020-12-06 17:05 00000000  WEB-INF/
       0  Stored        0   0% 2020-12-06 17:05 00000000  WEB-INF/classes/
       0  Stored        0   0% 2020-12-06 17:05 00000000  WEB-INF/lib/
      64  Defl:N       65  -2% 2020-12-06 17:05 1310927b  
META-INF/maven/com.example/module-war/pom.properties
    1057  Defl:N      334  68% 2020-11-12 16:54 fef6778d  
META-INF/maven/com.example/module-war/pom.xml
    1927  Defl:N     1025  47% 2020-12-06 17:05 be968dbf  
WEB-INF/lib/module-jar2-0-SNAPSHOT.jar
--------          -------  ---                            -------
    3315             1594  52%                            11 files
{noformat}

When testing with new Maven EAR Plugin, please check {{Class-Path}} entry of 
module-ear/target/module-ear-0-SNAPSHOT.ear/com.example-module-war-0-SNAPSHOT.war/META-INF/MANIFEST.MF
 - if you find that the entry has correct value or not (refer to [that 
comment|https://issues.apache.org/jira/browse/MEAR-182?focusedCommentId=17244796&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17244796]
 in MEAR-182).


was (Author: abrarovm):
[~sschmidt],

There is a chance that this issue is fixed within MEAR-288. Please retest your 
case with Maven EAR Plugin built from the master branch. I tried to do that and 
found no issue (comparing to the results produced by Maven EAR Plugin 3.1.0).

Here is my test of the given repro-project ([^maven-ear-example.zip]) which 
uses Maven EAR Plugin 3.1.0:
{noformat}
$ mvn clean package
...
$ unzip -vl module-ear/target/module-ear-0-SNAPSHOT.ear
Archive:  module-ear/target/module-ear-0-SNAPSHOT.ear
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
     212  Defl:N      139  34% 2020-12-06 17:04 d29cf45c  META-INF/MANIFEST.MF
       0  Stored        0   0% 2020-12-06 17:04 00000000  META-INF/
       0  Stored        0   0% 2020-12-06 17:04 00000000  lib/
       0  Stored        0   0% 2020-12-06 17:04 00000000  META-INF/maven/
       0  Stored        0   0% 2020-12-06 17:04 00000000  
META-INF/maven/com.example/
       0  Stored        0   0% 2020-12-06 17:04 00000000  
META-INF/maven/com.example/module-ear/
     477  Defl:N      258  46% 2020-12-06 17:03 697502a0  
META-INF/application.xml
    4214  Defl:N     3063  27% 2020-12-06 17:04 987f5ff5  
com.example-module-war-0-SNAPSHOT.war
    1946  Defl:N     1052  46% 2020-12-06 17:04 fbd50bcf  
lib/com.example-module-jar-0-SNAPSHOT.jar
    1687  Defl:N      475  72% 2020-11-12 16:54 9e8c42bb  
META-INF/maven/com.example/module-ear/pom.xml
      64  Defl:N       65  -2% 2020-12-06 17:04 7dde0569  
META-INF/maven/com.example/module-ear/pom.properties
--------          -------  ---                            -------
    8600             5052  41%                            11 files
$ unzip -vl 
module-ear/target/module-ear-0-SNAPSHOT/com.example-module-war-0-SNAPSHOT.war
Archive:  
module-ear/target/module-ear-0-SNAPSHOT/com.example-module-war-0-SNAPSHOT.war
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
     267  Defl:N      170  36% 2020-12-06 17:03 df2d2884  META-INF/MANIFEST.MF
       0  Stored        0   0% 2020-12-06 17:03 00000000  META-INF/
       0  Stored        0   0% 2020-12-06 17:03 00000000  META-INF/maven/
       0  Stored        0   0% 2020-12-06 17:03 00000000  
META-INF/maven/com.example/
       0  Stored        0   0% 2020-12-06 17:03 00000000  
META-INF/maven/com.example/module-war/
       0  Stored        0   0% 2020-12-06 17:03 00000000  WEB-INF/
       0  Stored        0   0% 2020-12-06 17:03 00000000  WEB-INF/classes/
       0  Stored        0   0% 2020-12-06 17:03 00000000  WEB-INF/lib/
      64  Defl:N       65  -2% 2020-12-06 17:03 1310927b  
META-INF/maven/com.example/module-war/pom.properties
    1057  Defl:N      334  68% 2020-11-12 16:54 fef6778d  
META-INF/maven/com.example/module-war/pom.xml
    1946  Defl:N     1052  46% 2020-12-06 17:03 fbd50bcf  
WEB-INF/lib/module-jar-0-SNAPSHOT.jar
    1927  Defl:N     1025  47% 2020-12-06 17:03 935e5609  
WEB-INF/lib/module-jar2-0-SNAPSHOT.jar
--------          -------  ---                            -------
    5261             2646  50%                            12 files
{noformat}
And here is the same test with Maven EAR Plugin 3.2.0-SNAPSHOT built from the 
master branch:
{noformat}
$ mvn clean package -Dmaven-ear-plugin.version=3.2.0-SNAPSHOT
...
$ unzip -vl module-ear/target/module-ear-0-SNAPSHOT.ear
Archive:  module-ear/target/module-ear-0-SNAPSHOT.ear
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
     221  Defl:N      143  35% 2020-12-06 17:05 8528f16f  META-INF/MANIFEST.MF
       0  Stored        0   0% 2020-12-06 17:05 00000000  META-INF/
       0  Stored        0   0% 2020-12-06 17:05 00000000  lib/
       0  Stored        0   0% 2020-12-06 17:05 00000000  META-INF/maven/
       0  Stored        0   0% 2020-12-06 17:05 00000000  
META-INF/maven/com.example/
       0  Stored        0   0% 2020-12-06 17:05 00000000  
META-INF/maven/com.example/module-ear/
     477  Defl:N      258  46% 2020-12-06 17:05 697502a0  
META-INF/application.xml
    3012  Defl:N     2055  32% 2020-12-06 17:05 f3062fe2  
com.example-module-war-0-SNAPSHOT.war
    1946  Defl:N     1062  45% 2020-12-06 17:05 6e22962d  
lib/com.example-module-jar-0-SNAPSHOT.jar
    1687  Defl:N      475  72% 2020-11-12 16:54 9e8c42bb  
META-INF/maven/com.example/module-ear/pom.xml
      64  Defl:N       65  -2% 2020-12-06 17:05 7dde0569  
META-INF/maven/com.example/module-ear/pom.properties
--------          -------  ---                            -------
    7407             4058  45%                            11 files
$ unzip -vl 
module-ear/target/module-ear-0-SNAPSHOT/com.example-module-war-0-SNAPSHOT.war
Archive:  
module-ear/target/module-ear-0-SNAPSHOT/com.example-module-war-0-SNAPSHOT.war
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
     267  Defl:N      170  36% 2020-12-06 17:05 df2d2884  META-INF/MANIFEST.MF
       0  Stored        0   0% 2020-12-06 17:05 00000000  META-INF/
       0  Stored        0   0% 2020-12-06 17:05 00000000  META-INF/maven/
       0  Stored        0   0% 2020-12-06 17:05 00000000  
META-INF/maven/com.example/
       0  Stored        0   0% 2020-12-06 17:05 00000000  
META-INF/maven/com.example/module-war/
       0  Stored        0   0% 2020-12-06 17:05 00000000  WEB-INF/
       0  Stored        0   0% 2020-12-06 17:05 00000000  WEB-INF/classes/
       0  Stored        0   0% 2020-12-06 17:05 00000000  WEB-INF/lib/
      64  Defl:N       65  -2% 2020-12-06 17:05 1310927b  
META-INF/maven/com.example/module-war/pom.properties
    1057  Defl:N      334  68% 2020-11-12 16:54 fef6778d  
META-INF/maven/com.example/module-war/pom.xml
    1927  Defl:N     1025  47% 2020-12-06 17:05 be968dbf  
WEB-INF/lib/module-jar2-0-SNAPSHOT.jar
--------          -------  ---                            -------
    3315             1594  52%                            11 files
{noformat}

When testing with new Maven EAR Plugin, please check {{Class-Path}} entry of 
module-ear/target/module-ear-0-SNAPSHOT.ear/com.example-module-war-0-SNAPSHOT.war/META-INF/MANIFEST.MF
 - if you find that the entry has correct value or not (refer to [that 
comment|https://issues.apache.org/jira/browse/MEAR-182?focusedCommentId=17244796&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17244796]
 in MEAR-182).

> skinnyWars issue with finalName for Jar module
> ----------------------------------------------
>
>                 Key: MEAR-289
>                 URL: https://issues.apache.org/jira/browse/MEAR-289
>             Project: Maven EAR Plugin
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Stefan Schmidt
>            Priority: Major
>         Attachments: maven-ear-example.zip
>
>
> When a finalName is given for a Jar module in a War it is not found by 
> filename @\{artifactId}@-@\{version}@.@\{extension}@ for deletion in 
> maven-ear-plugin.
> Example as attached:
>  * module-jar
>  * module-jar2 (with finalName)
>  * module-war (has jar and jar2 as dependency)
>  * module-ear (has jar as dependency)
> #> ./mvnw clean install
> The module-ear-0-SNAPSHOT.ear contains the 
> com.example-module-war-0-SNAPSHOT.war. In this war both jar's are in folder 
> WEB-INF/lib module-jar-0-SNAPSHOT.jar and module-jar2-0-SNAPSHOT.jar.
> On debugging maven-ear-plugin 3.1.0 it is checking only the finalName.jar and 
> the name com.example-module-jar-0-SNAPSHOT.jar.
> Debugging -> EarMojo.java line 816 to 838
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to