jira-importer commented on issue #248: URL: https://github.com/apache/maven-jar-plugin/issues/248#issuecomment-2956687229
**[tomas darbois](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=darboistom)** commented I've taken a look at the origin of the problem : maven jar plugin is using maven Archiver which is using the function getManifest( MavenProject project, ManifestConfiguration config, Map entries ) in order to create the manifest. In case he is using the repository to resolve the dependency : Inside this program, mavenArchiver get the list of file.getpath from the repository so it's something like GroupId/Version/ArtifactId-Version.type and he resolve the name by a getname on the path = artifactid-version.type So he will never look inside the artifact and check if the finalname is not the same as the repositoryname. Perhaps it's an error to use fullname that doesn't look like artifactid-version.type in case he doesn't need the repository he is using also the file name of the artifact but this one is created following finalname information (finalname.type) and is in memory. But the main problem to retrieve finalname information is that we don't have anywhere this information, we have to resolve it by analysing the artifactId-version.pom that can be found in the repository, and searching from himself and his parents what is the finalname of the artifact. We will probably need to have maven providing us a easier way to get the final name such as adding it in the pom.properties. A possible solution is to do the same work than help:effective-pom : Load the pom associated with the artifact, parse it (the same way effective pom is doing it) and just recover the final name. Perhaps some tools in maven-model would be usefull in that case instead of parsing everything :p -- 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]
