You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Daniel Dabah (JIRA)" <ji...@apache.org> on 2016/07/04 07:34:11 UTC

[jira] [Commented] (MDEPLOY-179) deployAtEnd bypassed in case of pluginRepository definition

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

Daniel Dabah commented on MDEPLOY-179:
--------------------------------------

How about a solution that stores {{readyProjectsCounter}} in the {{session}} field? (Specifically, using {{session.topLevelProject.get/setContextValue}}).
The {{session}} is always the same instance, regardless of what {{ClassRealm}} is active.
We've tested this solution in our build system and it works well. 
The only catch is that this requires declaring the {{session}} field which isn't currently declared in the plugin. However, this shouldn't actually require any change on the part of the user and so should be backward compatible.
Are there any consequences of being dependent upon {{session}} that I'm not aware of?

> deployAtEnd bypassed in case of pluginRepository definition
> -----------------------------------------------------------
>
>                 Key: MDEPLOY-179
>                 URL: https://issues.apache.org/jira/browse/MDEPLOY-179
>             Project: Maven Deploy Plugin
>          Issue Type: Bug
>          Components: deploy:deploy
>    Affects Versions: 2.8.1, 2.8.2
>         Environment: Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 05:51:28-0800) 
> Java version: 1.7.0_45, vendor: Oracle Corporation 
> Default locale: en_US, platform encoding: Cp1252 
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
>            Reporter: Ryan Parrish
>            Assignee: Robert Scholte
>            Priority: Minor
>
> h2. Summary
> If there is a pluginRepository defined in the POM, and the deployAtEnd configuration is true, the actual repo deployment at the end of the build is skipped.
> Expectation is that the repo deployment at the end of the build would work regardless of pluginRepository configuration.
> h2. Steps
> # In the [trunk/2.9-SNAPSHOT|http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-deploy-plugin] project, run {{mvn deploy}} the deploy-at-end-pass integration test.  The deploy happens successfully at the end of the build.
> # Add a pluginRepository definition to deploy-at-end-pass/pom.xml, such as
>   {code}
>  <pluginRepositories>
> 	<pluginRepository>
>       <id>central</id>
>       <name>Maven Plugin Repository</name>
>       <url>http://repo1.maven.org/maven2</url>
>       <layout>default</layout>
>     </pluginRepository>
>   </pluginRepositories>
>   {code}
> #  Re-run the {{mvn deploy}}.  Observe that the deploy to repo is not performed.
> h2. Workaround
> Define the pluginRepositories in settings.xml, not in the current POM lineage.  The deployAtEnd works as expected in this case.



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