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

ASF GitHub Bot commented on MINSTALL-115:
-----------------------------------------

chonton commented on issue #1: MINSTALL-115: installAtEnd fails with multiple 
class realms
URL: 
https://github.com/apache/maven-install-plugin/pull/1#issuecomment-380851533
 
 
   Unfortunately, this technique interferes with surefire/failsafe.  The user 
properties must contain String properties.  I could make the pojos into json 
encoding.  
   
   Or, what other places can a plugin save information across invocations?  It 
appears that plugin context is also tied to the ClassLoader.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> 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
>            Priority: Major
>         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
(v7.6.3#76005)

Reply via email to