You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Piotr Paczynski (JIRA)" <ji...@apache.org> on 2018/04/11 11:55:00 UTC

[jira] [Updated] (MDEPLOY-234) Nothing is deployed if deployAtEnd=true and extension is added in submodule

     [ https://issues.apache.org/jira/browse/MDEPLOY-234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Piotr Paczynski updated MDEPLOY-234:
------------------------------------
    Description: 
It seems that when *deploytEnd=true* and one of the submodules in the reactor adds an *extension*, then nothing gets deployed. The last module to build says "Deploying ... at end".

 

I'm attaching a minimal project that is affected by the issue. To reproduce, unpack it and issue the following command in the main dir (I've used Maven 3.5.3).
{noformat}
mvn deploy -DaltDeploymentRepository=test::default::file:target/repo
{noformat}
Outcome: Nothing is deployed. The *target/repo* is not created. See output attached.

Expected result: Deployment of both modules is performed during submodule's deploy phase.

 

I've debugged it and think I understand the problem:

1. When the parent module is built, the DeployMojo class is loaded and the
{noformat}
private static final AtomicInteger readyProjectsCounter
{noformat}
field is initialized to 0.

2. Then it's bumped to 1 when deploy of "parent" is executed.

3. Then, the second module is built (submodule) and, because it contributes an extension, DepoyMojo class is re-loaded (by Guice?) and the
{noformat}
private static final AtomicInteger readyProjectsCounter{noformat}
field is reinitialized to 0.

4. Then it's bumped to 1 when deploy of "submodule" is executed, but since *1 < 2* the deploy is not performed at all.

 

Not sure how to fix it, anyone?

  was:
It seems that when *deploytEnd=true* and one of the submodules in the reactor adds an *extension*, then nothing gets deployed. The last module to built says "Deploying ... at end".

 

I'm attaching a minimal project that is affected by the issue. To reproduce, unpack it and issue the following command in the main dir (I've used Maven 3.5.3).
{noformat}
mvn deploy -DaltDeploymentRepository=test::default::file:target/repo
{noformat}
Outcome: Nothing is deployed. The *target/repo* is not created. See output attached.

Expected result: Deployment of both modules is performed during submodule's deploy phase.

 

I debugged it and think I understand the problem:

1. When the parent module is built, the DeployMojo class is loaded and the
{noformat}
private static final AtomicInteger readyProjectsCounter
{noformat}
is initialized to 0.

2. Then it's bumped to 1 when deploy of "parent" is executed.

3. Then, the second module is built (submodule) and, because it contributes an extension, DepoyMojo class is re-loaded (by Guice?) and the
{noformat}
private static final AtomicInteger readyProjectsCounter field{noformat}
is reinitialized to 0.

4. Then it's bumped to 1 when deploy of "submodule" is executed, but since *1 < 2* the deploy is not performed at all.

 

Not sure how to fix it, anyone?


> Nothing is deployed if deployAtEnd=true  and extension is added in submodule
> ----------------------------------------------------------------------------
>
>                 Key: MDEPLOY-234
>                 URL: https://issues.apache.org/jira/browse/MDEPLOY-234
>             Project: Maven Deploy Plugin
>          Issue Type: Bug
>          Components: deploy:deploy
>    Affects Versions: 2.8.2
>         Environment: Maven 3.5.3
>            Reporter: Piotr Paczynski
>            Priority: Major
>         Attachments: project.zip, result.txt
>
>
> It seems that when *deploytEnd=true* and one of the submodules in the reactor adds an *extension*, then nothing gets deployed. The last module to build says "Deploying ... at end".
>  
> I'm attaching a minimal project that is affected by the issue. To reproduce, unpack it and issue the following command in the main dir (I've used Maven 3.5.3).
> {noformat}
> mvn deploy -DaltDeploymentRepository=test::default::file:target/repo
> {noformat}
> Outcome: Nothing is deployed. The *target/repo* is not created. See output attached.
> Expected result: Deployment of both modules is performed during submodule's deploy phase.
>  
> I've debugged it and think I understand the problem:
> 1. When the parent module is built, the DeployMojo class is loaded and the
> {noformat}
> private static final AtomicInteger readyProjectsCounter
> {noformat}
> field is initialized to 0.
> 2. Then it's bumped to 1 when deploy of "parent" is executed.
> 3. Then, the second module is built (submodule) and, because it contributes an extension, DepoyMojo class is re-loaded (by Guice?) and the
> {noformat}
> private static final AtomicInteger readyProjectsCounter{noformat}
> field is reinitialized to 0.
> 4. Then it's bumped to 1 when deploy of "submodule" is executed, but since *1 < 2* the deploy is not performed at all.
>  
> Not sure how to fix it, anyone?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)