Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
maven-embedder-3.8.6.jar - Maven Embedder Module
maven-embedder-3.8.6.jar is the JAR file for Apache Maven 3.8.6 Embedder module. Apache Maven is a software project management and comprehension tool.
JAR File Size and Download Location:
File: 99649 06-06-2022 16:16 lib/maven-embedder-3.8.6.jar Download: Apache Maven Website
✍: FYIcenter.com
⏎ org/apache/maven/cli/internal/BootstrapCoreExtensionManager.java
package org.apache.maven.cli.internal; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Set; import javax.inject.Inject; import javax.inject.Named; import org.apache.maven.RepositoryUtils; import org.apache.maven.cli.internal.extension.model.CoreExtension; import org.apache.maven.execution.MavenExecutionRequest; import org.apache.maven.extension.internal.CoreExtensionEntry; import org.apache.maven.internal.aether.DefaultRepositorySystemSessionFactory; import org.apache.maven.model.Plugin; import org.apache.maven.plugin.PluginResolutionException; import org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver; import org.codehaus.plexus.DefaultPlexusContainer; import org.codehaus.plexus.PlexusContainer; import org.codehaus.plexus.classworlds.ClassWorld; import org.codehaus.plexus.classworlds.realm.ClassRealm; import org.codehaus.plexus.interpolation.InterpolationException; import org.codehaus.plexus.interpolation.Interpolator; import org.codehaus.plexus.interpolation.MapBasedValueSource; import org.codehaus.plexus.interpolation.StringSearchInterpolator; import org.codehaus.plexus.logging.Logger; import org.eclipse.aether.RepositorySystemSession; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.graph.DependencyFilter; import org.eclipse.aether.graph.DependencyNode; import org.eclipse.aether.repository.RemoteRepository; import org.eclipse.aether.util.filter.ExclusionsDependencyFilter; import org.eclipse.aether.util.graph.visitor.PreorderNodeListGenerator; /** * BootstrapCoreExtensionManager */ @Named public class BootstrapCoreExtensionManager { private final Logger log; private final DefaultPluginDependenciesResolver pluginDependenciesResolver; private final DefaultRepositorySystemSessionFactory repositorySystemSessionFactory; private final ClassWorld classWorld; private final ClassRealm parentRealm; @Inject public BootstrapCoreExtensionManager( Logger log, DefaultPluginDependenciesResolver pluginDependenciesResolver, DefaultRepositorySystemSessionFactory repositorySystemSessionFactory, PlexusContainer container ) { this.log = log; this.pluginDependenciesResolver = pluginDependenciesResolver; this.repositorySystemSessionFactory = repositorySystemSessionFactory; this.classWorld = ( (DefaultPlexusContainer) container ).getClassWorld(); this.parentRealm = container.getContainerRealm(); } public List<CoreExtensionEntry> loadCoreExtensions( MavenExecutionRequest request, Set<String> providedArtifacts, List<CoreExtension> extensions ) throws Exception { RepositorySystemSession repoSession = repositorySystemSessionFactory.newRepositorySession( request ); List<RemoteRepository> repositories = RepositoryUtils.toRepos( request.getPluginArtifactRepositories() ); Interpolator interpolator = createInterpolator( request ); return resolveCoreExtensions( repoSession, repositories, providedArtifacts, extensions, interpolator ); } private List<CoreExtensionEntry> resolveCoreExtensions( RepositorySystemSession repoSession, List<RemoteRepository> repositories, Set<String> providedArtifacts, List<CoreExtension> configuration, Interpolator interpolator ) throws Exception { List<CoreExtensionEntry> extensions = new ArrayList<>(); DependencyFilter dependencyFilter = new ExclusionsDependencyFilter( providedArtifacts ); for ( CoreExtension extension : configuration ) { List<Artifact> artifacts = resolveExtension( extension, repoSession, repositories, dependencyFilter, interpolator ); if ( !artifacts.isEmpty() ) { extensions.add( createExtension( extension, artifacts ) ); } } return Collections.unmodifiableList( extensions ); } private CoreExtensionEntry createExtension( CoreExtension extension, List<Artifact> artifacts ) throws Exception { String realmId = "coreExtension>" + extension.getGroupId() + ":" + extension.getArtifactId() + ":" + extension.getVersion(); ClassRealm realm = classWorld.newRealm( realmId, null ); log.debug( "Populating class realm " + realm.getId() ); realm.setParentRealm( parentRealm ); for ( Artifact artifact : artifacts ) { File file = artifact.getFile(); log.debug( " Included " + file ); realm.addURL( file.toURI().toURL() ); } return CoreExtensionEntry.discoverFrom( realm, Collections.singleton( artifacts.get( 0 ).getFile() ) ); } private List<Artifact> resolveExtension( CoreExtension extension, RepositorySystemSession repoSession, List<RemoteRepository> repositories, DependencyFilter dependencyFilter, Interpolator interpolator ) throws ExtensionResolutionException { try { /* TODO: Enhance the PluginDependenciesResolver to provide a * resolveCoreExtension method which uses a CoreExtension * object instead of a Plugin as this makes no sense. */ Plugin plugin = new Plugin(); plugin.setGroupId( interpolator.interpolate( extension.getGroupId() ) ); plugin.setArtifactId( interpolator.interpolate( extension.getArtifactId() ) ); plugin.setVersion( interpolator.interpolate( extension.getVersion() ) ); DependencyNode root = pluginDependenciesResolver .resolveCoreExtension( plugin, dependencyFilter, repositories, repoSession ); PreorderNodeListGenerator nlg = new PreorderNodeListGenerator(); root.accept( nlg ); List<Artifact> artifacts = nlg.getArtifacts( false ); return artifacts; } catch ( PluginResolutionException e ) { throw new ExtensionResolutionException( extension, e.getCause() ); } catch ( InterpolationException e ) { throw new ExtensionResolutionException( extension, e ); } } private static Interpolator createInterpolator( MavenExecutionRequest request ) { StringSearchInterpolator interpolator = new StringSearchInterpolator(); interpolator.addValueSource( new MapBasedValueSource( request.getUserProperties() ) ); interpolator.addValueSource( new MapBasedValueSource( request.getSystemProperties() ) ); return interpolator; } }
⏎ org/apache/maven/cli/internal/BootstrapCoreExtensionManager.java
Or download all of them as a single archive file:
File name: maven-embedder-3.8.6-src.zip File size: 57444 bytes Release date: 2022-06-06 Download
⇒ maven-model-3.8.6.jar - Maven Model Module
⇐ maven-compat-3.8.6.jar - Maven Compact Module
2020-10-26, 15180👍, 0💬
Popular Posts:
Where to find answers to frequently asked questions on Download and Installing of Older Versions? He...
Apache Log4j 1.2 Bridge allows applications coded to use Log4j 1.2 API to use Log4j 2 instead. Bytec...
JDK 11 java.xml.crypto.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) Crypto modu...
What Is poi-ooxml-5.2.3.jar? poi-ooxml-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which...
JDK 11 java.desktop.jmod is the JMOD file for JDK 11 Desktop module. JDK 11 Desktop module compiled ...