maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marat Abrarov (Jira)" <j...@apache.org>
Subject [jira] [Comment Edited] (MEAR-267) assembly.xml contains incorrect references to modules
Date Fri, 25 Sep 2020 22:05:00 GMT

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

Marat Abrarov edited comment on MEAR-267 at 9/25/20, 10:04 PM:
---------------------------------------------------------------

Hi [~leokom],

Won't workaround in [pull request #1|https://github.com/lrozenblyum/MEAR-267-issue-demo/pull/1]
of lrozenblyum/MEAR-267-issue-demo project work for you? I understand that it's not solution,
e.g. the same EJB JAR may be included into different EARs each having different [outputFileNameMapping|https://maven.apache.org/plugins/maven-ear-plugin/examples/customize-file-name-mapping.html]
and the workaround doesn't work in this case.

It looks like with 3.0 version of Maven EAR Plugin default outputFileNameMapping was changed
to include group ID. I explicitly defined outputFileNameMapping to look like:
{noformat}
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-ear-plugin</artifactId>
    <version>3.0.2</version>
    <configuration>
        ...
        <outputFileNameMapping>@{artifactId}@-@{baseVersion}@@{dashClassifier?}@.@{extension}@</outputFileNameMapping>
    </configuration>
</plugin>
{noformat}
when migrated one of my projects from Maven EAR Plugin 2.10.1 to 3.0.2. May be the same solution
is more applicable to your needs.

Thank you for detecting and describing this bug.


was (Author: abrarovm):
Hi [~leokom],

Won't workaround in [pull request #1|https://github.com/lrozenblyum/MEAR-267-issue-demo/pull/1]
of lrozenblyum/MEAR-267-issue-demo project work for you? I understand that it's not solution,
e.g. the same EJB JAR may be included into different EARs each having different [outputFileNameMapping|https://maven.apache.org/plugins/maven-ear-plugin/examples/customize-file-name-mapping.html]
and the workaround doesn't work in this case.

It looks like with 3.0 version of Maven EAR Plugin default outputFileNameMapping was changed
to include group ID. I explicitly defined outputFileNameMapping to look like:
{code:xml}
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-ear-plugin</artifactId>
    <version>3.0.2</version>
    <configuration>
        ...
        <outputFileNameMapping>@{artifactId}@-@{baseVersion}@@{dashClassifier?}@.@{extension}@</outputFileNameMapping>
    </configuration>
</plugin>
{code}
when migrated one of my projects from Maven EAR Plugin 2.10.1 to 3.0.2. May be the same solution
is more applicable to your needs.

Thank you for detecting and describing this bug.

> assembly.xml contains incorrect references to modules
> -----------------------------------------------------
>
>                 Key: MEAR-267
>                 URL: https://issues.apache.org/jira/browse/MEAR-267
>             Project: Maven Ear Plugin
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: Leonid Rozenblyum
>            Priority: Major
>
> SCENARIO:
> Create a EAR project with maven-ear-plugin 3.0.0
> execute mvn ear:ear
> EXPECTED:
> assembly.xml contains reference to the jar/war equivalent to their physical names inside
> the EAR
> (e.g. if the jar is named tryEar-ejb-1.0-SNAPSHOT.jar then assembly.xml reference would
be:
> {quote}{{<module>}}
> <ejb>tryEar-ejb-1.0-SNAPSHOT.jar</ejb>
>  </module>
> {quote}
> (this worked in 2.10.1)
> ACTUALLY:
>  assembly.xml contains reference
> {quote}<module>
>  <ejb>com.leokom-tryEar-ejb-1.0-SNAPSHOT.jar</ejb>
>  </module>
> {quote}
>  
> Due to this difference - JBoss/WildFly cannot deploy the EAR.
> (it's easy to reproduce: you may create a ear project from some standard ones from maven-archetypes
and change maven-ear-plugin version to 3.0.0).
>  
> UPDATE: Sorry, maybe it's a bug in M2E-WTP plugin of Eclipse. I tried this scenario in
standalone mode without Eclipse - and assembly.xml is consistent with the jar files



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

Mime
View raw message