Global Sync Context for Maven Resolver

Note: This component has been deprecated and superseded in 1.7.0 with the name mapper static.

The Global Sync Context Factory is Java global lock factory for Maven Resolver to provide a concurrent-safe access from a single Maven instance to the same local Maven repository.

For further details about the factory read the Javadoc.

Open Issues/Notes

  • It only works when dependency injection is used and not the bundled AetherModule or ServiceLocator (Maven uses dependency injection).
  • Usage from plugins has not been tested yet.
  • The furnace-maven-plugin does not work this implementation because it uses ServiceLocator instead of dependency injection.

Installation/Testing

Debugging

  • Add/modify the following entries in ${maven.conf}/logging/simplelogger.properties:
    org.slf4j.simpleLogger.showDateTime=true
    org.slf4j.simpleLogger.showThreadName=true
    org.slf4j.simpleLogger.showShortLogName=true
    org.slf4j.simpleLogger.log.org.eclipse.aether.synccontext=trace
    
  • Now start a multithreaded Maven build on your project and you should see at least these lines:
    4626 [main] [TRACE] GlobalSyncContextFactory$GlobalSyncContext - Acquiring global...
    35318 [main] [TRACE] GlobalSyncContextFactory$GlobalSyncContext - Releasing global...