[
https://issues.apache.org/jira/browse/MINSTALL-115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14694977#comment-14694977
]
Philip Pearson commented on MINSTALL-115:
-----------------------------------------
There is a similar change required in {{maven-deploy-plugin}} - I have created
a fork which includes both sets as changes (as separate commits) -
https://github.com/prgp/maven-plugins/tree/prgp-MINSTALL-115
\\
\\
* {{maven-install-plugin}} changes are in [commit
3574e045a2af1146a98ed51af119a2a045204519 |
https://github.com/prgp/maven-plugins/commit/3574e045a2af1146a98ed51af119a2a045204519]
* {{maven-deploy-plugin}} changes are in [commit
e5b4c279de2e8e0de0dd7638144f4f93cfcac66e|
https://github.com/prgp/maven-plugins/commit/e5b4c279de2e8e0de0dd7638144f4f93cfcac66e]
These commits should cope with the edge care where any of the modules (except
the last) are not using {{installAtEnd}} (/{{deployAtEnd}}) set to true or
older versions. However, it currently does not handle last modules that are
using an older {{maven-install-plugin}} (/{{maven-deploy-plugin}}) versions - I
suppose the {{isLastProject()}} method could be altered so that it scans
backwards through the reactor projects to find the first version that can
support {{installAtEnd}} (/{{deployAtEnd}}) correctly and use that as the
'last' project ...
> Setting installAtEnd causes no installs to occur when a multimodule project
> has multiple class realms
> -----------------------------------------------------------------------------------------------------
>
> Key: MINSTALL-115
> URL: https://issues.apache.org/jira/browse/MINSTALL-115
> Project: Maven Install Plugin
> Issue Type: Bug
> Components: install:install
> Affects Versions: 2.5.2
> Reporter: Philip Pearson
> Attachments: InstallConfiguration.java, mojo.patch
>
>
> When the {{installAtEnd}} configuration parameter is set to {{true}} on a
> multimodule project with multiple class realms then because a different class
> loaders creates instances of the {{InstallMojo}} class there will be muliple
> instances of {{readyProjectsCounter}} and {{installRequests}}.
> However, because the end is determined by {{projectsReady =
> readyProjectsCounter.incrementAndGet() == reactorProjects.size()}} it will
> never complete as {{readyProjectsCounter}} will never equal the size
> {{reactorProjects}} if even one project is executed in another class realm.
> {{maven-deploy-plugin}} partially solved this in MDEPLOY-193 by using
> {{project.equals(reactorProjects.get(reactorProjects.size() - 1))}} instead.
> However, the installation is a little more complex than the deploy as we need
> to read the used the {{createChecksum}} and {{updateReleaseInfo}}
> configuration parameters from each installed project - we can't store them
> ahead of time because of the issue with the class realms, so we need to read
> the plugin configurations before we can call
> {{installProject(instalRequest)}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)