@Override protected boolean _handle(DependencyResolutionRequest request) { Xpp3Dom root = new Xpp3Dom("DependencyResolutionRequest"); root.setAttribute("class", request.getClass().getName()); root.addChild(newElement("project", request.getMavenProject())); reporter.print(root); return true; }
public DependencyResolutionResult resolve( DependencyResolutionRequest request ) throws DependencyResolutionException { return new DependencyResolutionResult() { public List<Dependency> getUnresolvedDependencies() { return Collections.emptyList(); } public List<Dependency> getResolvedDependencies() { return Collections.emptyList(); } public List<Exception> getResolutionErrors( Dependency dependency ) { return Collections.emptyList(); } public DependencyNode getDependencyGraph() { return new DefaultDependencyNode( (Dependency) null ); } public List<Dependency> getDependencies() { return Collections.emptyList(); } public List<Exception> getCollectionErrors() { return Collections.emptyList(); } }; }
public DependencyResolutionResult resolve( DependencyResolutionRequest request ) throws DependencyResolutionException { synchronized ( SynchronizedProjectDependenciesResolver.class ) { return super.resolve( request ); } }
@Override public void onEvent( Object event ) throws Exception { try { if ( event instanceof ExecutionEvent ) { executionEventHandler( (ExecutionEvent) event ); } else if ( event instanceof org.eclipse.aether.RepositoryEvent ) { repositoryEventHandler( (RepositoryEvent) event ); } else if ( event instanceof MavenExecutionRequest ) { executionRequestEventHandler( (MavenExecutionRequest) event ); } else if ( event instanceof MavenExecutionResult ) { executionResultEventHandler( (MavenExecutionResult) event ); } else if ( event instanceof DependencyResolutionRequest ) { dependencyResolutionRequest( (DependencyResolutionRequest) event ); } else if ( event instanceof DependencyResolutionResult ) { dependencyResolutionResult( (DependencyResolutionResult) event ); } // The following event type is available since Maven 3.3.1+ // else if ( event instanceof DefaultSettingsBuildingRequest) { // DefaultSettingsBuildingRequest r = null; // r.getGlobalSettingsFile(); // r.getGlobalSettingsSource(); // r.getSystemProperties(); // r.getUserSettingsFile(); // r.getUserSettingsSource(); // // r.setGlobalSettingsFile( globalSettingsFile ); // r.setGlobalSettingsSource( globalSettingsSource ); // r.setSystemProperties( systemProperties ); // r.setUserProperties( userProperties ); // r.setUserSettingsFile( userSettingsFile ); // r.setUserSettingsSource( userSettingsSource ); // } // The following event type is available since Maven 3.3.1+ // else if (event instanceof DefaultSettingsBuildingRequest) { // // DefaultSettingsBuildingRequest r = null; // r.getGlobalSettingsSource().getLocation() // } // The following event type is available since Maven 3.3.1+ // else if (event instanceof DefaultToolchainsBuildingRequest) { // DefaultToolchainsBuildingRequest r = null; // r.getGlobalToolchainsSource(). // } // The following event type is available since Maven 3.3.1+ // else if (event instanceof DefaultToolchainsBuildingResult) { // DefaultToolchainsBuildingResult r = null; // r.getEffectiveToolchains(); // r.getProblems(); // } else { // TODO: What kind of event we haven't considered? LOGGER.debug( "MBTP: Event {}", event.getClass().getCanonicalName() ); } } catch ( Exception e ) { LOGGER.error( "MBTP: Exception", e ); } }
private void dependencyResolutionRequest( DependencyResolutionRequest event ) { LOGGER.debug( "MBTP: dependencyResolutionRequest()" ); }