You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by cs...@apache.org on 2023/02/02 08:12:34 UTC
[maven-deploy-plugin] branch master updated: [MDEPLOY-206] Deploy improvements (#38)
This is an automated email from the ASF dual-hosted git repository.
cstamas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-deploy-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 2ff9a2e [MDEPLOY-206] Deploy improvements (#38)
2ff9a2e is described below
commit 2ff9a2eac94d2ca25e48af975ac47375d6fdb323
Author: Tamas Cservenak <ta...@cservenak.net>
AuthorDate: Thu Feb 2 09:12:29 2023 +0100
[MDEPLOY-206] Deploy improvements (#38)
Changes:
* remove deployInParallel, deploy plugin when deployAtEnd always creates one deploy request and passes it to resolver
* remove misleading log "deferring deploy" when the module is actually last and is not deferred by deploys all
* Remove obsolete IT
---
https://issues.apache.org/jira/browse/MDEPLOY-206
---
.../verify.groovy | 3 +-
src/it/deploy-at-end-parallel/invoker.properties | 18 ----
src/it/deploy-at-end-parallel/module1/pom.xml | 25 -----
src/it/deploy-at-end-parallel/module2/pom.xml | 25 -----
src/it/deploy-at-end-parallel/module3/pom.xml | 25 -----
src/it/deploy-at-end-parallel/module4/pom.xml | 25 -----
src/it/deploy-at-end-parallel/pom.xml | 103 ---------------------
src/it/deploy-at-end-parallel/setup.groovy | 26 ------
src/it/deploy-at-end-parallel/verify.groovy | 37 --------
src/it/deploy-at-end-pass/verify.groovy | 3 +-
.../apache/maven/plugins/deploy/DeployMojo.java | 85 ++---------------
11 files changed, 14 insertions(+), 361 deletions(-)
diff --git a/src/it/MDEPLOY-224_deploy-at-end-only-modules/verify.groovy b/src/it/MDEPLOY-224_deploy-at-end-only-modules/verify.groovy
index ee4e5e7..063f2ae 100644
--- a/src/it/MDEPLOY-224_deploy-at-end-only-modules/verify.groovy
+++ b/src/it/MDEPLOY-224_deploy-at-end-only-modules/verify.groovy
@@ -25,4 +25,5 @@ def buildLog = new File ( basedir, "build.log").text
assert ! buildLog.contains('[INFO] Deferring deploy for org.apache.maven.its.mdeploy-224:parent:1.0 at end')
assert buildLog.contains('[INFO] Deferring deploy for org.apache.maven.its.mdeploy-224:module1:1.0 at end')
-assert buildLog.contains('[INFO] Deferring deploy for org.apache.maven.its.mdeploy-224:module2:1.0 at end')
+// Last module does not emit this misleading message, as it IS "the end", not deferring anymore
+// assert buildLog.contains('[INFO] Deferring deploy for org.apache.maven.its.mdeploy-224:module2:1.0 at end')
diff --git a/src/it/deploy-at-end-parallel/invoker.properties b/src/it/deploy-at-end-parallel/invoker.properties
deleted file mode 100644
index 4a11915..0000000
--- a/src/it/deploy-at-end-parallel/invoker.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-invoker.mavenOpts = -Dorg.slf4j.simpleLogger.showThreadName=true
\ No newline at end of file
diff --git a/src/it/deploy-at-end-parallel/module1/pom.xml b/src/it/deploy-at-end-parallel/module1/pom.xml
deleted file mode 100644
index 4466ec7..0000000
--- a/src/it/deploy-at-end-parallel/module1/pom.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
- license agreements. See the NOTICE file distributed with this work for additional
- information regarding copyright ownership. The ASF licenses this file to
- you under the Apache License, Version 2.0 (the "License"); you may not use
- this file except in compliance with the License. You may obtain a copy of
- the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
- by applicable law or agreed to in writing, software distributed under the
- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
- OF ANY KIND, either express or implied. See the License for the specific
- language governing permissions and limitations under the License. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.maven.its.deploy.dae.parallel</groupId>
- <artifactId>dae</artifactId>
- <version>1.0</version>
- </parent>
- <artifactId>module1</artifactId>
-
-</project>
diff --git a/src/it/deploy-at-end-parallel/module2/pom.xml b/src/it/deploy-at-end-parallel/module2/pom.xml
deleted file mode 100644
index d38b671..0000000
--- a/src/it/deploy-at-end-parallel/module2/pom.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
- license agreements. See the NOTICE file distributed with this work for additional
- information regarding copyright ownership. The ASF licenses this file to
- you under the Apache License, Version 2.0 (the "License"); you may not use
- this file except in compliance with the License. You may obtain a copy of
- the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
- by applicable law or agreed to in writing, software distributed under the
- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
- OF ANY KIND, either express or implied. See the License for the specific
- language governing permissions and limitations under the License. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.maven.its.deploy.dae.parallel</groupId>
- <artifactId>dae</artifactId>
- <version>1.0</version>
- </parent>
- <artifactId>module2</artifactId>
-
-</project>
diff --git a/src/it/deploy-at-end-parallel/module3/pom.xml b/src/it/deploy-at-end-parallel/module3/pom.xml
deleted file mode 100644
index be6d343..0000000
--- a/src/it/deploy-at-end-parallel/module3/pom.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
- license agreements. See the NOTICE file distributed with this work for additional
- information regarding copyright ownership. The ASF licenses this file to
- you under the Apache License, Version 2.0 (the "License"); you may not use
- this file except in compliance with the License. You may obtain a copy of
- the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
- by applicable law or agreed to in writing, software distributed under the
- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
- OF ANY KIND, either express or implied. See the License for the specific
- language governing permissions and limitations under the License. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.maven.its.deploy.dae.parallel</groupId>
- <artifactId>dae</artifactId>
- <version>1.0</version>
- </parent>
- <artifactId>module3</artifactId>
-
-</project>
diff --git a/src/it/deploy-at-end-parallel/module4/pom.xml b/src/it/deploy-at-end-parallel/module4/pom.xml
deleted file mode 100644
index a3d8382..0000000
--- a/src/it/deploy-at-end-parallel/module4/pom.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
- license agreements. See the NOTICE file distributed with this work for additional
- information regarding copyright ownership. The ASF licenses this file to
- you under the Apache License, Version 2.0 (the "License"); you may not use
- this file except in compliance with the License. You may obtain a copy of
- the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
- by applicable law or agreed to in writing, software distributed under the
- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
- OF ANY KIND, either express or implied. See the License for the specific
- language governing permissions and limitations under the License. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.maven.its.deploy.dae.parallel</groupId>
- <artifactId>dae</artifactId>
- <version>1.0</version>
- </parent>
- <artifactId>module4</artifactId>
-
-</project>
diff --git a/src/it/deploy-at-end-parallel/pom.xml b/src/it/deploy-at-end-parallel/pom.xml
deleted file mode 100644
index 3e78351..0000000
--- a/src/it/deploy-at-end-parallel/pom.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.apache.maven.its.deploy.dae.parallel</groupId>
- <artifactId>dae</artifactId>
- <version>1.0</version>
- <packaging>pom</packaging>
-
- <description>
- Tests deployment at end with parallel.
- </description>
-
- <properties>
- <maven.test.skip>true</maven.test.skip>
- </properties>
-
- <distributionManagement>
- <repository>
- <id>it</id>
- <url>file:///@remoteRepo@/deploy-at-end-parallel</url>
- </repository>
- </distributionManagement>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>@mavenCompilerPluginVersion@</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <version>@project.version@</version>
- <configuration>
- <deployAtEnd>true</deployAtEnd>
- <parallelThreads>4</parallelThreads>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-install-plugin</artifactId>
- <version>@mavenInstallPluginVersion@</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>@mavenJarPluginVersion@</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>@mavenResourcesPluginVersion@</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <version>@mavenSourcePluginVersion@</version>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>@mavenSurefirePluginVersion@</version>
- </plugin>
- </plugins>
- </build>
-
- <modules>
- <module>module1</module>
- <module>module2</module>
- <module>module3</module>
- <module>module4</module>
- </modules>
-</project>
diff --git a/src/it/deploy-at-end-parallel/setup.groovy b/src/it/deploy-at-end-parallel/setup.groovy
deleted file mode 100644
index 3fd3619..0000000
--- a/src/it/deploy-at-end-parallel/setup.groovy
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-def mockrepo = new File( remoteRepo, "deploy-at-end-parallel")
-mockrepo.deleteDir()
-
-assert !mockrepo.exists()
-
-mockrepo.mkdirs()
\ No newline at end of file
diff --git a/src/it/deploy-at-end-parallel/verify.groovy b/src/it/deploy-at-end-parallel/verify.groovy
deleted file mode 100644
index 845a695..0000000
--- a/src/it/deploy-at-end-parallel/verify.groovy
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-assert new File( remoteRepo, "deploy-at-end-parallel/org/apache/maven/its/deploy/dae/parallel/dae/1.0/dae-1.0.pom" ).exists()
-assert new File( remoteRepo, "deploy-at-end-parallel/org/apache/maven/its/deploy/dae/parallel/module1/1.0/module1-1.0.pom" ).exists()
-assert new File( remoteRepo, "deploy-at-end-parallel/org/apache/maven/its/deploy/dae/parallel/module1/1.0/module1-1.0.jar" ).exists()
-assert new File( remoteRepo, "deploy-at-end-parallel/org/apache/maven/its/deploy/dae/parallel/module2/1.0/module2-1.0.pom" ).exists()
-assert new File( remoteRepo, "deploy-at-end-parallel/org/apache/maven/its/deploy/dae/parallel/module2/1.0/module2-1.0.jar" ).exists()
-assert new File( remoteRepo, "deploy-at-end-parallel/org/apache/maven/its/deploy/dae/parallel/module3/1.0/module3-1.0.pom" ).exists()
-assert new File( remoteRepo, "deploy-at-end-parallel/org/apache/maven/its/deploy/dae/parallel/module3/1.0/module3-1.0.jar" ).exists()
-assert new File( remoteRepo, "deploy-at-end-parallel/org/apache/maven/its/deploy/dae/parallel/module4/1.0/module4-1.0.pom" ).exists()
-assert new File( remoteRepo, "deploy-at-end-parallel/org/apache/maven/its/deploy/dae/parallel/module4/1.0/module4-1.0.jar" ).exists()
-
-File buildLog = new File( basedir, 'build.log' )
-assert buildLog.exists()
-assert buildLog.text.contains( "[INFO] Deferring deploy for org.apache.maven.its.deploy.dae.parallel:dae:1.0 at end" )
-assert buildLog.text.contains( "[INFO] Deferring deploy for org.apache.maven.its.deploy.dae.parallel:module1:1.0 at end" )
-assert buildLog.text.contains( "[INFO] Deferring deploy for org.apache.maven.its.deploy.dae.parallel:module2:1.0 at end" )
-assert buildLog.text.contains( "[INFO] Deferring deploy for org.apache.maven.its.deploy.dae.parallel:module3:1.0 at end" )
-assert buildLog.text.contains( "[INFO] Deferring deploy for org.apache.maven.its.deploy.dae.parallel:module4:1.0 at end" )
-
diff --git a/src/it/deploy-at-end-pass/verify.groovy b/src/it/deploy-at-end-pass/verify.groovy
index 6aedbb5..8db4490 100644
--- a/src/it/deploy-at-end-pass/verify.groovy
+++ b/src/it/deploy-at-end-pass/verify.groovy
@@ -27,5 +27,6 @@ File buildLog = new File( basedir, 'build.log' )
assert buildLog.exists()
assert buildLog.text.contains( "[INFO] Deferring deploy for org.apache.maven.its.deploy.dae.pass:dae:1.0 at end" )
assert buildLog.text.contains( "[INFO] Deferring deploy for org.apache.maven.its.deploy.dae.pass:module1:1.0 at end" )
-assert buildLog.text.contains( "[INFO] Deferring deploy for org.apache.maven.its.deploy.dae.pass:module3:1.0 at end" )
+// Last module does not emit this misleading message, as it IS "the end", not deferring anymore
+//assert buildLog.text.contains( "[INFO] Deferring deploy for org.apache.maven.its.deploy.dae.pass:module3:1.0 at end" )
diff --git a/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java b/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
index 98d5ee9..4e317ac 100644
--- a/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
+++ b/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
@@ -23,10 +23,6 @@ import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.atomic.AtomicBoolean;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -75,14 +71,6 @@ public class DeployMojo extends AbstractDeployMojo {
@Parameter(defaultValue = "false", property = "deployAtEnd")
private boolean deployAtEnd;
- /**
- * The number of parallel threads which will be used for deployment with the {@code deployAtEnd} feature.
- *
- * @since 3.1.0
- */
- @Parameter(property = "maven.deploy.parallelThreads", defaultValue = "1")
- private int parallelThreads;
-
/**
* Specifies an alternative repository to which the project artifacts should be deployed (other than those specified
* in <distributionManagement>). <br/>
@@ -179,11 +167,12 @@ public class DeployMojo extends AbstractDeployMojo {
}
public void execute() throws MojoExecutionException, MojoFailureException {
+ State state;
if (Boolean.parseBoolean(skip)
|| ("releases".equals(skip) && !ArtifactUtils.isSnapshot(project.getVersion()))
|| ("snapshots".equals(skip) && ArtifactUtils.isSnapshot(project.getVersion()))) {
getLog().info("Skipping artifact deployment");
- putState(State.SKIPPED);
+ state = State.SKIPPED;
} else {
failIfOffline();
warnIfAffectedPackagingAndMaven(project.getPackaging());
@@ -200,25 +189,24 @@ public class DeployMojo extends AbstractDeployMojo {
request.setRepository(deploymentRepository);
processProject(project, request);
deploy(request);
- putState(State.DEPLOYED);
+ state = State.DEPLOYED;
} else {
putPluginContextValue(DEPLOY_ALT_SNAPSHOT_DEPLOYMENT_REPOSITORY, altSnapshotDeploymentRepository);
putPluginContextValue(DEPLOY_ALT_RELEASE_DEPLOYMENT_REPOSITORY, altReleaseDeploymentRepository);
putPluginContextValue(DEPLOY_ALT_DEPLOYMENT_REPOSITORY, altDeploymentRepository);
- putState(State.TO_BE_DEPLOYED);
- getLog().info("Deferring deploy for " + project.getGroupId() + ":" + project.getArtifactId() + ":"
- + project.getVersion() + " at end");
+ state = State.TO_BE_DEPLOYED;
}
}
+ putState(state);
+
List<MavenProject> allProjectsUsingPlugin = getAllProjectsUsingPlugin();
if (allProjectsMarked(allProjectsUsingPlugin)) {
- if (parallelThreads <= 1) {
- deployAllAtOnce(allProjectsUsingPlugin);
- } else {
- deployInParallel(allProjectsUsingPlugin);
- }
+ deployAllAtOnce(allProjectsUsingPlugin);
+ } else if (state == State.TO_BE_DEPLOYED) {
+ getLog().info("Deferring deploy for " + project.getGroupId() + ":" + project.getArtifactId() + ":"
+ + project.getVersion() + " at end");
}
}
@@ -252,59 +240,6 @@ public class DeployMojo extends AbstractDeployMojo {
}
}
- private void deployInParallel(List<MavenProject> allProjectsUsingPlugin) throws MojoExecutionException {
-
- List<Callable<Void>> requestTasks = new ArrayList<>();
- AtomicBoolean hasError = new AtomicBoolean(false);
-
- for (MavenProject reactorProject : allProjectsUsingPlugin) {
- Map<String, Object> pluginContext = session.getPluginContext(pluginDescriptor, reactorProject);
- State state = getState(pluginContext);
- if (state == State.TO_BE_DEPLOYED) {
-
- RemoteRepository deploymentRepository = getDeploymentRepository(
- reactorProject,
- getPluginContextValue(pluginContext, DEPLOY_ALT_SNAPSHOT_DEPLOYMENT_REPOSITORY),
- getPluginContextValue(pluginContext, DEPLOY_ALT_RELEASE_DEPLOYMENT_REPOSITORY),
- getPluginContextValue(pluginContext, DEPLOY_ALT_DEPLOYMENT_REPOSITORY));
-
- DeployRequest request = new DeployRequest();
- request.setRepository(deploymentRepository);
-
- processProject(reactorProject, request);
-
- requestTasks.add(() -> {
- try {
- if (!hasError.get()) {
- deploy(request);
- }
- } catch (MojoExecutionException e) {
- hasError.set(true);
- getLog().error(e.getMessage(), e);
- }
- return null;
- });
- }
- }
-
- if (!requestTasks.isEmpty()) {
- ExecutorService executorService = Executors.newFixedThreadPool(parallelThreads);
-
- try {
- executorService.invokeAll(requestTasks);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- throw new MojoExecutionException(e.getMessage(), e);
- }
-
- executorService.shutdown();
-
- if (hasError.get()) {
- throw new MojoExecutionException("Deployment errors");
- }
- }
- }
-
private boolean allProjectsMarked(List<MavenProject> allProjectsUsingPlugin) {
for (MavenProject reactorProject : allProjectsUsingPlugin) {
if (!hasState(reactorProject)) {