Fixes MNG-5663 - a regression introduced in 3.2.2 by MNG-5639 that prevents nested import POMs from resolving their dependencies.

The cuplrit was the resetRepositories method in tandem with the repository
list instances being shared between ModelResolvers.

- The copy constructor for the ModelResolvers now creates new lists.
- The resetRepositories method has been removed. Instead there is a
'replace' parameter on the addRepository method that allows the
desired parameter replacement of MNG-5639 to take place.

Signed-off-by: Jason van Zyl <jason@tesla.io>
MNG-5670 guard against ConcurrentModificationException iterating over System properties

Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
MNG-5670 guard against ConcurrentModificationException iterating over System properties

Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
MNG-5677 hooks to allow fine-grained cache management

Also fixed broken cache #flush() and missing #dispose() in
couple of places.

Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
default to ssl for central
[maven-release-plugin] prepare release maven-3.2.3
[maven-release-plugin] prepare for next development iteration
fix a lot of checkstyle violations for future m-checkstyle-p 2.13, as
proof of concept for misc violations suppressions strategies
test code formatting
MNG-5683: Expand session scope so that @SessionScoped components can be injected into lifecycle participants.
sisu 0.3.0M1, sisu-guice 3.2.3

Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
enabled JSR330-only components in all unit tests

Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
aether 1.0

Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
cleanup: release artifact resolver resources more eagerly

Set resolver executor thread context classloader to null by
default. This allows collection of class realms that triggered
thread creation (one of plugin realms, typically).

Use Disposable#dispose to shutdown resolver executor server,
remove now redundant #finilaze() implementation.

Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
MNG-5676: Fix Maven crashing on IBM JDKs

ClassWorlds patch submitted by BJ Hargrave
fixed on 492acde3697f68efe78d0316278502d549782593
[MNG-5687] Parallel Builds can build in wrong order

Fixed JDK8 IT failure for MavenITmng3004ReactorFailureBehaviorMultithreadedTest#testitFailFastSingleThread

It turns out the execution order of the modules in the build can be incorrect, in some cases severely incorrect.
For parallel builds this can have all sorts of interesting side effects such as classpath
appearing to be intermittently incorrect, missing jars/resources and similar.

The -am options and -amd options may simply fail with the incorrect build order
because expected dependencies have not been built and actual dependencies may not have been built.

The underlying problem was that ProjectDependencyGraph#getDownstreamProjects and getUpstreamProjects
did not actually obey the reactor build order as defined by ProjectDependencyGraph#getSortedProjects,
even though the javadoc claims they should.

This has only worked by accident on earlier JDK's and might not have worked at all (basically
depends on Set iteration order being equal to insertion order). JDK8 has slightly different
iteration order, which caused the IT failure.

This problem may be the root cause of MNG-4996 and any other issue where the modules build
in incorrect order.

The bug affects:

parallel builds
command line -am (--also-make) option
command line -amd (also-make-dependents) option

On all java versions, although visibility might be somewhat different on different jdks.

Added simple unit test that catches the problem.
MNG-5695 fixed inconsistent/incomplete custom guice scope bindings

MojoExecution scope was only available for maven plugins and could not
be used for components defined in maven core or maven code extensions.

Session scope was only available for maven core and core extensions
but did not work for components from maven plugins.

Made both custom scopes available available in all realms.

Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
[MNG-5696] Remove dependency on Easymock

This closes #25
use latest plexus-utils bugfix
Account the the jsoup license URL which appears to have changed.

The JSoup license URL was recorded as http://jsoup.com/license but the
site appears to now be http://jsoup.org/ and so the URL is now
http://jsoup.org/license