/** * Creates a new child of this trace. * * @param data The data to associate with the child, may be {@code null}. * @return The child trace, never {@code null}. */ public RequestTrace newChild( Object data ) { return new RequestTrace( this, data ); }
/** * Creates a new child of this trace. * * @param data The data to associate with the child, may be {@code null}. * @return The child trace, never {@code null}. */ public RequestTrace newChild( Object data ) { return new RequestTrace( this, data ); }
/** * Creates a child of the specified request trace. This method is basically a convenience that will invoke * {@link RequestTrace#newChild(Object) parent.newChild()} when the specified parent trace is not {@code null} or * otherwise instantiante a new root trace. * * @param parent The parent request trace, may be {@code null}. * @param data The data to associate with the child trace, may be {@code null}. * @return The child trace, never {@code null}. */ public static RequestTrace newChild( RequestTrace parent, Object data ) { if ( parent == null ) { return new RequestTrace( data ); } return parent.newChild( data ); }
/** * Creates a child of the specified request trace. This method is basically a convenience that will invoke * {@link RequestTrace#newChild(Object) parent.newChild()} when the specified parent trace is not {@code null} or * otherwise instantiante a new root trace. * * @param parent The parent request trace, may be {@code null}. * @param data The data to associate with the child trace, may be {@code null}. * @return The child trace, never {@code null}. */ public static RequestTrace newChild( RequestTrace parent, Object data ) { if ( parent == null ) { return new RequestTrace( data ); } return parent.newChild( data ); }
public Model resolveModel(File pom) throws ModelBuildingException { RequestTrace trace = new RequestTrace(pom); ModelBuildingRequest modelRequest = new DefaultModelBuildingRequest(); modelRequest.setValidationLevel(ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL); modelRequest.setProcessPlugins(false); modelRequest.setTwoPhaseBuilding(false); modelRequest.setSystemProperties(toProperties(session.getUserProperties(), session.getSystemProperties())); // // The model cache and default model resolver should be injected // modelRequest.setModelCache(new DefaultModelCache()); modelRequest.setModelResolver(new DefaultModelResolver(session, trace.newChild(modelRequest), "bithub", artifactResolver, remoteRepositoryManager, remoteRepositories)); modelRequest.setPomFile(pom); return modelBuilder.build(modelRequest).getEffectiveModel(); }