Class ModelBuilderThreadSafetyWorkaround

java.lang.Object
org.codehaus.mojo.flatten.ModelBuilderThreadSafetyWorkaround

@Named public class ModelBuilderThreadSafetyWorkaround extends Object
Works around thread safety issues when modifying the global singleton DefaultModelBuilder with custom ProfileInjector and ProfileSelector. Instead of modifying the global DefaultModelBuilder, this class creates a new DefaultModelBuilder and equips it with the currently active components like ModelProcessor, ModelValidator etc. which might have been modified/provided by other Maven extensions.
Since:
1.2.3
Author:
Falko Modler
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.maven.model.building.ModelBuildingResult
    build(org.apache.maven.model.building.ModelBuildingRequest buildingRequest, org.apache.maven.model.profile.ProfileInjector customInjector, org.apache.maven.model.profile.ProfileSelector customSelector)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ModelBuilderThreadSafetyWorkaround

      public ModelBuilderThreadSafetyWorkaround()
  • Method Details

    • build

      public org.apache.maven.model.building.ModelBuildingResult build(org.apache.maven.model.building.ModelBuildingRequest buildingRequest, org.apache.maven.model.profile.ProfileInjector customInjector, org.apache.maven.model.profile.ProfileSelector customSelector) throws org.apache.maven.model.building.ModelBuildingException
      Throws:
      org.apache.maven.model.building.ModelBuildingException