Components decide how often then are instantiated, so AssemblyArchiver
implementation(s) need to be changed.

You can use instantiationStrategy="per-lookup" to indicate new instance
is created each time component is injected. This is standard plexus/sisu
feature and should work on all Maven versions.

If you need the same component instance injected in multiple places
within the scope of a mojo execution, you can use @MojoExecutionScoped
annotation, which is new in Maven 3.2.

--
Regards,
Igor

On 2014-06-20, 7:20, Karl Heinz Marbaise wrote:
Hi,

currently i'm working on a problem
(http://jira.codehaus.org/browse/MASSEMBLY-684) in the
maven-assembly-plugin which will fail if you use:

mvn -T2C clean package

after diving into that problem i found out that the components which are
being injected are always the same so far so good, but those components
are exactly causing the trouble in relationship with multithreaded build...

So the following component is the root cause:

     @Component
     private AssemblyArchiver assemblyArchiver;

So the question is: Is there a way to create new instances every time
the execute() of the mojo is called? May be manually ? Or does exist
already a solution for this kind of problems...



Mit freundlichem Gruß
Karl-Heinz Marbaise

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to