You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Boaz Lev (JIRA)" <ji...@apache.org> on 2015/09/09 23:26:45 UTC

[jira] [Commented] (MINSTALL-116) Attached artifacts installed with default name, only one is actually installed

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

Boaz Lev commented on MINSTALL-116:
-----------------------------------

I agree that in case an artifact should be downloaded in the future, then it must have a predictable name, as described. But in fact, once I use the assembly plugin with more than one assembly instruction, in order to group couple of resources in separated zip files, for example - those are not tend to be downloaded rather be used as part of the release (e.g. be unzipped at different production machines).
Currently, only one zip file is uploaded! How one should handle this situation, other than writing my own version of maven-install-plugin, that does install ALL zip files in their finalName?

> Attached artifacts installed with default name, only one is actually installed
> ------------------------------------------------------------------------------
>
>                 Key: MINSTALL-116
>                 URL: https://issues.apache.org/jira/browse/MINSTALL-116
>             Project: Maven Install Plugin
>          Issue Type: Bug
>          Components: install:install
>    Affects Versions: 2.5.2
>            Reporter: Boaz Lev
>            Assignee: Robert Scholte
>
> InstallMojo.execute() calls (for every attached artifact) to 
> installer.install( attached.getFile(), attached, localRepository );
> The source file name is based on finalName, but destination file name is based on the localRepository.pathOf(File) method, which in the org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout implementation returns a result based on artifactId, version etc.
> In short, this means that if the artifactId is "X" and the version is "0.0.1-SNAPSHOT" then an artifact with a name "a.zip" will be installed as "X-0.0.1-SNAPSHOT.zip"
> Since all attached artifacts are installed with the default name, in case there are more than on attached artifacts - only the last is actually installed, all others are getting lost in the process.
> I would expect that any attached artifact would be installed using it's finalName, exactly as it is on the target folder.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)