jira-importer commented on issue #302: URL: https://github.com/apache/maven-ear-plugin/issues/302#issuecomment-2955276383
**[Benjamin Bentmann](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=bentmann)** commented Quote from javadoc of `StandardFileNameMapping`: > It returns the name of the file in the local repository. > This does not always hold when calling `Artifact.getFile().getName()`. During a reactor build, the artifact is resolved from the project's output directory and the filename here is controlled by the `finalName` of the build section or the config of the packaging plugin. In contrast, the filename in the local/remote repo is entirely controlled by the repo layout (which doesn't consider `finalName`). Milos' example is using non-default finalName's, thereby making the conceptual difference visible. The attached patch demos a potential solution by calculating the filename in the plugin itself, based on the artifact coordinates. The code basically mimics the calculation from `DefaultRepositoryLayout` with the difference of using `getBaseVersion()` instead of `getVersion()`. The patch is incomplete. Apart from tests, it doesn't update the other affected `FullFileNameMapping`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
