Daniele Gaffuri created JBASMP-77:
-------------------------------------
Summary: ConcurrentModificationException in deploy-artifact
Key: JBASMP-77
URL:
https://issues.jboss.org/browse/JBASMP-77
Project: JBoss AS Maven Plugins
Issue Type: Bug
Components: deploy
Affects Versions: 7.7.Final
Reporter: Daniele Gaffuri
Assignee: James Perkins
In the same situation of JBASMP-57 deploy-artifact throws the following exception:
{code}
[ERROR] Failed to execute goal
org.jboss.as.plugins:jboss-as-maven-plugin:7.7.SCE:deploy-artifact (deploy) on project
sideup-integration: Could not execute goal deploy-artifact on null. Reason: null:
ConcurrentModificationException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
org.jboss.as.plugins:jboss-as-maven-plugin:7.7.SCE:deploy-artifact (deploy) on project
sideup-integration: Could not execute goal deploy-artifact on null. Reason: null
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Could not execute goal
deploy-artifact on null. Reason: null
at
org.jboss.as.plugin.deployment.AbstractDeployment.doExecute(AbstractDeployment.java:159)
at
org.jboss.as.plugin.deployment.AbstractDeployment.execute(AbstractDeployment.java:112)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.util.ConcurrentModificationException
at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:394)
at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:405)
at java.util.AbstractCollection.addAll(AbstractCollection.java:341)
at org.jboss.as.plugin.deployment.DeployArtifact.validate(DeployArtifact.java:84)
at
org.jboss.as.plugin.deployment.AbstractDeployment.doExecute(AbstractDeployment.java:136)
... 22 more
{code}
This is probably due to changes in related commit [37bc2c1], causing both deploy and
undeploy validate methods to add the set of dependencies to itself:
{code}
final Set<Artifact> dependencies = project.getDependencyArtifacts();
// Allows provided dependencies to be seen
dependencies.addAll(project.getDependencyArtifacts());
{code}
{code}
final Set<Artifact> dependencies = project.getDependencyArtifacts();
dependencies.addAll(this.project.getDependencyArtifacts());
{code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)