Java Code Examples for org.apache.maven.artifact.versioning.VersionRange#createFromVersion()

The following examples show how to use org.apache.maven.artifact.versioning.VersionRange#createFromVersion() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MavenUtils.java    From mvn-golang with Apache License 2.0 6 votes vote down vote up
/**
 * Parse string containing artifact record
 *
 * @param record string containing record, must not be null
 * @param handler artifact handler for created artifact, must not be null
 * @return new created artifact from the record, must not be null
 * @throws InvalidVersionSpecificationException it will be thrown if version
 * format is wrong
 * @throws IllegalArgumentException it will be thrown if record can't be
 * recognized as artifact record
 */
@Nonnull
public static Artifact parseArtifactRecord(
        @Nonnull final String record,
        @Nonnull final ArtifactHandler handler
) throws InvalidVersionSpecificationException {
  final Matcher matcher = ARTIFACT_RECORD_PATTERN.matcher(record.trim());
  if (matcher.find()) {
    return new DefaultArtifact(
            matcher.group(1),
            matcher.group(2),
            VersionRange.createFromVersion(matcher.group(3)),
            matcher.group(4).isEmpty() ? null : matcher.group(4),
            matcher.group(5).isEmpty() ? null : matcher.group(5),
            matcher.group(6).isEmpty() ? null : matcher.group(6),
            handler);
  }
  throw new IllegalArgumentException("Can't recognize record as artifact: " + record);
}
 
Example 2
Source File: NativeRanlibMojoTest.java    From maven-native with MIT License 6 votes vote down vote up
public void testMojoLookup()
    throws Exception
{
    File pluginXml = new File( getBasedir(), "src/test/resources/linker/plugin-config-ranlib.xml" );
    NativeRanlibMojo mojo = (NativeRanlibMojo) lookupMojo( "ranlib", pluginXml );
    assertNotNull( mojo );

    // simulate artifact
    ArtifactHandler artifactHandler = new DefaultArtifactHandler();

    Artifact artifact = new DefaultArtifact( "test", "test", VersionRange.createFromVersion( "1.0-SNAPSHOT" ),
            "compile", "exe", null, artifactHandler );
    mojo.getProject().setArtifact( artifact );

    mojo.execute();
}
 
Example 3
Source File: NativeInitializeMojoTest.java    From maven-native with MIT License 6 votes vote down vote up
public void testMojoLookup()
    throws Exception
{
    File pluginXml = new File( getBasedir(), "src/test/resources/initialize/plugin-config.xml" );
    NativeInitializeMojo mojo = (NativeInitializeMojo) lookupMojo( "initialize", pluginXml );
    assertNotNull( mojo );

    // simulate artifact
    ArtifactHandler artifactHandler = new DefaultArtifactHandler();
    Artifact artifact = new DefaultArtifact( "test", "test", VersionRange.createFromVersion( "1.0-SNAPSHOT" ),
            "compile", "exe", null, artifactHandler );
    mojo.project.setArtifact( artifact );
    mojo.setPluginContext( new HashMap<>() );

    mojo.execute();

    assertEquals( "someArtifactId", mojo.project.getBuild().getFinalName() );
}
 
Example 4
Source File: UseLatestReleasesMojo.java    From versions-maven-plugin with Apache License 2.0 6 votes vote down vote up
private ArtifactVersion[] filterVersionsWithIncludes( ArtifactVersion[] newer, Artifact artifact )
{
    List<ArtifactVersion> filteredNewer = new ArrayList<>( newer.length );
    for ( int j = 0; j < newer.length; j++ )
    {
        ArtifactVersion artifactVersion = newer[j];
        Artifact artefactWithNewVersion =
            new DefaultArtifact( artifact.getGroupId(), artifact.getArtifactId(),
                                 VersionRange.createFromVersion( artifactVersion.toString() ), artifact.getScope(),
                                 artifact.getType(), null, new DefaultArtifactHandler(), false );
        if ( isIncluded( artefactWithNewVersion ) )
        {
            filteredNewer.add( artifactVersion );
        }
    }
    return filteredNewer.toArray( new ArtifactVersion[filteredNewer.size()] );
}
 
Example 5
Source File: NativeLinkerMojoTest.java    From maven-native with MIT License 5 votes vote down vote up
public void testExecute()
    throws Exception
{
    NativeLinkMojo mojo = getMojo();

    // simulate object files
    List<File> objectList = new ArrayList<>();
    objectList.add( new File( "o1.o" ) );
    objectList.add( new File( "o2.o" ) );
    mojo.saveCompilerOutputFilePaths( objectList );

    // simulate artifact
    ArtifactHandler artifactHandler = new DefaultArtifactHandler();

    Artifact artifact = new DefaultArtifact( "test", "test", VersionRange.createFromVersion( "1.0-SNAPSHOT" ),
            "compile", "exe", null, artifactHandler );
    mojo.getProject().setArtifact( artifact );

    // simulate artifacts
    mojo.getProject().setArtifacts( new HashSet<Artifact>() ); // no extern libs for now

    String linkerFinalName = "some-final-name";
    setVariableValueToObject( mojo, "linkerFinalName", linkerFinalName );

    mojo.execute();

    LinkerConfiguration conf = mojo.getLgetLinkerConfiguration();

    // "target is set in the stub
    assertEquals( new File( "target" ), conf.getOutputDirectory() );
    assertEquals( linkerFinalName, conf.getOutputFileName() );
    assertNull( conf.getOutputFileExtension() );
    // current artifactHandler mocking return null extension name
    assertEquals( new File( "target/some-final-name.null" ), conf.getOutputFile() );

}
 
Example 6
Source File: NativeLinkerMojoTest.java    From maven-native with MIT License 5 votes vote down vote up
public void testExecuteWithFinalNameExtension()
    throws Exception
{
    NativeLinkMojo mojo = getMojo();

    // simulate object files
    List<File> objectList = new ArrayList<>();
    objectList.add( new File( "o1.o" ) );
    objectList.add( new File( "o2.o" ) );
    mojo.saveCompilerOutputFilePaths( objectList );

    // simulate artifact
    ArtifactHandler artifactHandler = new DefaultArtifactHandler();

    Artifact artifact = new DefaultArtifact( "test", "test", VersionRange.createFromVersion( "1.0-SNAPSHOT" ),
            "compile", "exe", null, artifactHandler );
    mojo.getProject().setArtifact( artifact );

    // simulate artifacts
    mojo.getProject().setArtifacts( new HashSet<Artifact>() ); // no extern libs for now

    String linkerFinalName = "some-final-name";
    setVariableValueToObject( mojo, "linkerFinalName", linkerFinalName );
    String linkerFinalNameExt = "some-extension";
    setVariableValueToObject( mojo, "linkerFinalNameExt", linkerFinalNameExt );

    mojo.execute();

    LinkerConfiguration conf = mojo.getLgetLinkerConfiguration();

    // "target is set in the stub
    assertEquals( new File( "target" ), conf.getOutputDirectory() );
    assertEquals( linkerFinalName, conf.getOutputFileName() );
    assertEquals( linkerFinalNameExt, conf.getOutputFileExtension() );
    assertEquals( new File( "target/some-final-name.some-extension" ), conf.getOutputFile() );

}
 
Example 7
Source File: DefaultVersionsHelper.java    From versions-maven-plugin with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public PluginUpdatesDetails lookupPluginUpdates( Plugin plugin, boolean allowSnapshots )
    throws ArtifactMetadataRetrievalException, InvalidVersionSpecificationException
{
    String version = plugin.getVersion();
    version = version == null ? "LATEST" : version;
    getLog().debug( "Checking " + ArtifactUtils.versionlessKey( plugin.getGroupId(), plugin.getArtifactId() )
        + " for updates newer than " + version );

    VersionRange versionRange = VersionRange.createFromVersion( version );

    final boolean includeSnapshots = allowSnapshots;

    final ArtifactVersions pluginArtifactVersions =
        lookupArtifactVersions( createPluginArtifact( plugin.getGroupId(), plugin.getArtifactId(), versionRange ),
                                true );

    Set<Dependency> pluginDependencies = new TreeSet<Dependency>( new DependencyComparator() );
    if ( plugin.getDependencies() != null )
    {
        pluginDependencies.addAll( plugin.getDependencies() );
    }
    Map<Dependency, ArtifactVersions> pluginDependencyDetails =
        lookupDependenciesUpdates( pluginDependencies, false );

    return new PluginUpdatesDetails( pluginArtifactVersions, pluginDependencyDetails, includeSnapshots );
}
 
Example 8
Source File: GeneratorTest.java    From webstart with MIT License 5 votes vote down vote up
@Override
public void setUp()
    throws Exception
{
    super.setUp();
    DefaultArtifactHandler artifactHandler = new DefaultArtifactHandler( "jar" );
    artifact1 =
        new DefaultArtifact( "groupId", "artifact1", VersionRange.createFromVersion( "1.0" ), "scope", "jar",
                             "classifier", artifactHandler );
    artifact1.setFile( new File( "artifact1-1.0.jar" ) );
    artifact2 =
        new DefaultArtifact( "groupId", "artifact2", VersionRange.createFromVersion( "1.5" ), null, "jar", "",
                             artifactHandler );
    artifact2.setFile( new File( "artifact2-1.5.jar" ) );

    // add a SNAPSHOT artifact, timestamped (from a remote maven repository)
    artifact3 =
            new DefaultArtifact( "groupId", "artifact3", VersionRange.createFromVersion( "1.5-SNAPSHOT" ), null, "jar", "",
                                 artifactHandler );
    artifact3.setVersion("1.5-15012014.121212-1");
    artifact3.setFile( new File( "artifact3-1.5-15012014.121212-1.jar" ) );

    // add a SNAPSHOT artifact, not timestamped (from a local build)
    artifact4 =
            new DefaultArtifact( "groupId", "artifact4", VersionRange.createFromVersion( "1.5-SNAPSHOT" ), null, "jar", "",
                                 artifactHandler );
    artifact4.setFile( new File( "artifact4-1.5-SNAPSHOT.jar" ) );

    artifacts = new ArrayList<>();

    artifacts.add( artifact1 );
    artifacts.add( artifact2 );
    artifacts.add( artifact3 );
    artifacts.add( artifact4 );
}
 
Example 9
Source File: VersionXmlGeneratorTest.java    From webstart with MIT License 5 votes vote down vote up
public void testWithMultiJarResources()
        throws IOException, SAXException, ParserConfigurationException, MojoExecutionException
    {

        Artifact artifact1 =
            new DefaultArtifact( "groupId", "artifactId1", VersionRange.createFromVersion( "1.0" ), "scope", "jar",
                                 "classifier", null );
        artifact1.setFile( new File( "bogus1.txt" ) );

        Artifact artifact2 =
            new DefaultArtifact( "groupId", "artifactId2", VersionRange.createFromVersion( "1.0" ), "scope", "jar",
                                 "classifier", null );
        artifact2.setFile( new File( "bogus2.txt" ) );

        ResolvedJarResource jar1 = new ResolvedJarResource( artifact1 );
        ResolvedJarResource jar2 = new ResolvedJarResource( artifact2 );

//        jar1.setArtifact( artifact1 );
//        jar2.setArtifact( artifact2 );

        List<ResolvedJarResource> jarResources = new ArrayList<>( 2 );
        jarResources.add( jar1 );
        jarResources.add( jar2 );

        new VersionXmlGenerator( "utf-8" ).generate( this.outputDir, jarResources );

        String actualXml = readFileContents( this.expectedFile );

        String expected = "<?xml version=\"1.0\"?><jnlp-versions>" + "  <resource>" + "    <pattern>" + "      <name>bogus1.txt</name>" +
                "      <version-id>1.0</version-id>" + "    </pattern>" +
                "    <file>artifactId1-1.0-classifier.jar</file>" + "  </resource>" + "  <resource>" + "    <pattern>" +
                "      <name>bogus2.txt</name>" + "      <version-id>1.0</version-id>" +
                "    </pattern>" + "    <file>artifactId2-1.0-classifier.jar</file>" + "  </resource>" +
                "</jnlp-versions>";
        Assert.assertEquals( actualXml, expected );
        Diff diff = new Diff( expected, actualXml );
        Assert.assertTrue( diff.toString(), diff.similar() );

    }
 
Example 10
Source File: ArtifactFilterTest.java    From code-hidding-plugin with GNU Lesser General Public License v2.1 4 votes vote down vote up
private DefaultArtifact getArtifact() {
    return new DefaultArtifact("com.mahifx", "libA", VersionRange.createFromVersion("1.0.0"), "compile", "jar", null, new DefaultArtifactHandler());
}
 
Example 11
Source File: PluginsRenderer.java    From maven-confluence-plugin with Apache License 2.0 4 votes vote down vote up
/**
 * @param isPlugins <code>true</code> to use <code>plugins</code> variable, <code>false</code> to use
 * <code>reports</code> variable.
 */
private void renderSectionPlugins( boolean isPlugins )
{
    List<Artifact> list = ( isPlugins ? plugins : reports );
    String[] tableHeader = getPluginTableHeader();

    startSection( ( isPlugins ? getReportString( "report.plugins.title" )
                             : getReportString( "report.plugins.report.title" ) ) );

    if ( list == null || list.isEmpty() )
    {

        paragraph(  ( isPlugins ? getReportString( "report.plugins.nolist" )
                                : getReportString( "report.plugins.report.nolist" ) ) );

        endSection();

        return;
    }

    Collections.sort( list, getArtifactComparator() );

    startTable();
    tableHeader( tableHeader );

    for ( Iterator<Artifact> iterator = list.iterator(); iterator.hasNext(); )
    {
        Artifact artifact = (Artifact) iterator.next();

        VersionRange versionRange;
        if ( StringUtils.isEmpty( artifact.getVersion() ) )
        {
            versionRange = VersionRange.createFromVersion( Artifact.RELEASE_VERSION );
        }
        else
        {
            versionRange = VersionRange.createFromVersion( artifact.getVersion() );
        }

        Artifact pluginArtifact = artifactFactory.createParentArtifact( artifact.getGroupId(), artifact
            .getArtifactId(), versionRange.toString() );
        List<?> artifactRepositories = project.getPluginArtifactRepositories();
        if ( artifactRepositories == null )
        {
            artifactRepositories = new ArrayList<>();
        }
        try
        {
            MavenProject pluginProject = mavenProjectBuilder.buildFromRepository( pluginArtifact,
                                                                                  artifactRepositories,
                                                                                  localRepository );
            tableRow( getPluginRow( pluginProject.getGroupId(), pluginProject.getArtifactId(), pluginProject
                                    .getVersion(), pluginProject.getUrl() ) );
        }
        catch ( ProjectBuildingException e )
        {
            log.info( "Could not build project for: " + artifact.getArtifactId() + ":" + e.getMessage(), e );
            tableRow( getPluginRow( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(),
                                    null ) );
        }

    }
    endTable();

    endSection();
}
 
Example 12
Source File: ArtifactBuilder.java    From extra-enforcer-rules with Apache License 2.0 4 votes vote down vote up
public ArtifactBuilder withVersion( String version )
{
    versionRange = VersionRange.createFromVersion( version );
    return this;
}
 
Example 13
Source File: PomHelper.java    From versions-maven-plugin with Apache License 2.0 4 votes vote down vote up
/**
 * Takes a list of {@link org.apache.maven.model.Plugin} instances and adds associations to properties used to
 * define versions of the plugin artifact or any of the plugin dependencies specified in the pom.
 *
 * @param helper Our helper.
 * @param expressionEvaluator Our expression evaluator.
 * @param result The map of {@link org.codehaus.mojo.versions.api.PropertyVersionsBuilder} keyed by property name.
 * @param plugins The list of {@link org.apache.maven.model.Plugin}.
 * @throws ExpressionEvaluationException if an expression cannot be evaluated.
 */
private static void addPluginAssociations( VersionsHelper helper, ExpressionEvaluator expressionEvaluator,
                                           Map<String, PropertyVersionsBuilder> result, List<Plugin> plugins )
    throws ExpressionEvaluationException
{
    if ( plugins == null )
    {
        return;
    }
    for ( Plugin plugin : plugins )
    {
        String version = plugin.getVersion();
        if ( version != null && version.contains( "${" ) && version.indexOf( '}' ) != -1 )
        {
            version = StringUtils.deleteWhitespace( version );
            for ( PropertyVersionsBuilder property : result.values() )
            {
                // any of these could be defined by a property
                final String propertyRef = "${" + property.getName() + "}";
                if ( version.contains( propertyRef ) )
                {
                    String groupId = plugin.getGroupId();
                    if ( groupId == null || groupId.trim().length() == 0 )
                    {
                        // group Id has a special default
                        groupId = APACHE_MAVEN_PLUGINS_GROUPID;
                    }
                    else
                    {
                        groupId = (String) expressionEvaluator.evaluate( groupId );
                    }
                    String artifactId = plugin.getArtifactId();
                    if ( artifactId == null || artifactId.trim().length() == 0 )
                    {
                        // malformed pom
                        continue;
                    }
                    else
                    {
                        artifactId = (String) expressionEvaluator.evaluate( artifactId );
                    }
                    // might as well capture the current value
                    VersionRange versionRange =
                        VersionRange.createFromVersion( (String) expressionEvaluator.evaluate( plugin.getVersion() ) );
                    property.addAssociation( helper.createPluginArtifact( groupId, artifactId, versionRange ),
                                             true );
                    if ( !propertyRef.equals( version ) )
                    {
                        addBounds( property, version, propertyRef, versionRange.toString() );
                    }
                }
            }
        }
        addDependencyAssocations( helper, expressionEvaluator, result, plugin.getDependencies(), true );
    }
}
 
Example 14
Source File: PomHelper.java    From versions-maven-plugin with Apache License 2.0 4 votes vote down vote up
private static void addReportPluginAssociations( VersionsHelper helper, ExpressionEvaluator expressionEvaluator,
                                                 Map<String, PropertyVersionsBuilder> result,
                                                 List<ReportPlugin> reportPlugins )
    throws ExpressionEvaluationException
{
    if ( reportPlugins == null )
    {
        return;
    }
    for ( ReportPlugin plugin : reportPlugins )
    {
        String version = plugin.getVersion();
        if ( version != null && version.contains( "${" ) && version.indexOf( '}' ) != -1 )
        {
            version = StringUtils.deleteWhitespace( version );
            for ( PropertyVersionsBuilder property : result.values() )
            {
                final String propertyRef = "${" + property.getName() + "}";
                if ( version.contains( propertyRef ) )
                {
                    // any of these could be defined by a property
                    String groupId = plugin.getGroupId();
                    if ( groupId == null || groupId.trim().length() == 0 )
                    {
                        // group Id has a special default
                        groupId = APACHE_MAVEN_PLUGINS_GROUPID;
                    }
                    else
                    {
                        groupId = (String) expressionEvaluator.evaluate( groupId );
                    }
                    String artifactId = plugin.getArtifactId();
                    if ( artifactId == null || artifactId.trim().length() == 0 )
                    {
                        // malformed pom
                        continue;
                    }
                    else
                    {
                        artifactId = (String) expressionEvaluator.evaluate( artifactId );
                    }
                    // might as well capture the current value
                    VersionRange versionRange =
                        VersionRange.createFromVersion( (String) expressionEvaluator.evaluate( plugin.getVersion() ) );
                    property.addAssociation( helper.createPluginArtifact( groupId, artifactId, versionRange ),
                                             true );
                    if ( !propertyRef.equals( version ) )
                    {
                        addBounds( property, version, propertyRef, versionRange.toString() );
                    }
                }
            }
        }
    }
}
 
Example 15
Source File: PomHelper.java    From versions-maven-plugin with Apache License 2.0 4 votes vote down vote up
private static void addDependencyAssocations( VersionsHelper helper, ExpressionEvaluator expressionEvaluator,
                                              Map<String, PropertyVersionsBuilder> result,
                                              List<Dependency> dependencies, boolean usePluginRepositories )
    throws ExpressionEvaluationException
{
    if ( dependencies == null )
    {
        return;
    }
    for ( Dependency dependency : dependencies )
    {
        String version = dependency.getVersion();
        if ( version != null && version.contains( "${" ) && version.indexOf( '}' ) != -1 )
        {
            version = StringUtils.deleteWhitespace( version );
            for ( PropertyVersionsBuilder property : result.values() )
            {
                final String propertyRef = "${" + property.getName() + "}";
                if ( version.contains( propertyRef ) )
                {
                    // Any of these could be defined by a property
                    String groupId = dependency.getGroupId();
                    if ( groupId == null || groupId.trim().length() == 0 )
                    {
                        // malformed pom
                        continue;
                    }
                    else
                    {
                        groupId = (String) expressionEvaluator.evaluate( groupId );
                    }
                    String artifactId = dependency.getArtifactId();
                    if ( artifactId == null || artifactId.trim().length() == 0 )
                    {
                        // malformed pom
                        continue;
                    }
                    else
                    {
                        artifactId = (String) expressionEvaluator.evaluate( artifactId );
                    }
                    // might as well capture the current value
                    VersionRange versionRange =
                        VersionRange.createFromVersion( (String) expressionEvaluator.evaluate( dependency.getVersion() ) );
                    property.addAssociation( helper.createDependencyArtifact( groupId, artifactId, versionRange,
                                                                              dependency.getType(),
                                                                              dependency.getClassifier(),
                                                                              dependency.getScope(),
                                                                              dependency.isOptional() ),
                                             usePluginRepositories );
                    if ( !propertyRef.equals( version ) )
                    {
                        addBounds( property, version, propertyRef, versionRange.toString() );
                    }
                }
            }
        }
    }
}
 
Example 16
Source File: PluginBundleManager.java    From BIMserver with GNU Affero General Public License v3.0 4 votes vote down vote up
public PluginBundle loadFromPluginDir(PluginBundleVersionIdentifier pluginBundleVersionIdentifier, SPluginBundleVersion pluginBundleVersion, List<SPluginInformation> plugins, boolean strictDependencyChecking) throws Exception {
	Path target = pluginsDir.resolve(pluginBundleVersionIdentifier.getFileName());
	if (!Files.exists(target)) {
		throw new PluginException(target.toString() + " not found");
	}

	SPluginBundle sPluginBundle = new SPluginBundle();

	MavenXpp3Reader mavenreader = new MavenXpp3Reader();

	Model model = null;
	try (JarFile jarFile = new JarFile(target.toFile())) {
		ZipEntry entry = jarFile.getEntry("META-INF/maven/" + pluginBundleVersion.getGroupId() + "/" + pluginBundleVersion.getArtifactId() + "/pom.xml");
		try (InputStream inputStream = jarFile.getInputStream(entry)) {
			model = mavenreader.read(inputStream);
		}
	}
	sPluginBundle.setOrganization(model.getOrganization().getName());
	sPluginBundle.setName(model.getName());

	DelegatingClassLoader delegatingClassLoader = new DelegatingClassLoader(getClass().getClassLoader());

	loadDependencies(model.getVersion(), strictDependencyChecking, model, delegatingClassLoader);
	
	for (org.apache.maven.model.Dependency dependency : model.getDependencies()) {
		if (dependency.getGroupId().equals("org.opensourcebim") && (dependency.getArtifactId().equals("shared") || dependency.getArtifactId().equals("pluginbase") || dependency.getArtifactId().equals("ifcplugins"))) {
			// TODO Skip, we should also check the version though
		} else {
			PluginBundleIdentifier pluginBundleIdentifier = new PluginBundleIdentifier(dependency.getGroupId(), dependency.getArtifactId());
			if (pluginBundleIdentifierToPluginBundle.containsKey(pluginBundleIdentifier)) {
				if (strictDependencyChecking) {
					VersionRange versionRange = VersionRange.createFromVersion(dependency.getVersion());
					String version = pluginBundleIdentifierToPluginBundle.get(pluginBundleIdentifier).getPluginBundleVersion().getVersion();
					ArtifactVersion artifactVersion = new DefaultArtifactVersion(version);
					if (versionRange.containsVersion(artifactVersion)) {
						// OK
					} else {
						throw new Exception("Required dependency " + pluginBundleIdentifier + " is installed, but it's version (" + version + ") does not comply to the required version (" + dependency.getVersion() + ")");
					}
				} else {
					LOGGER.info("Skipping strict dependency checking for dependency " + dependency.getArtifactId());
				}
			} else {
				if (dependency.getGroupId().equals("org.opensourcebim") && (dependency.getArtifactId().equals("shared") || dependency.getArtifactId().equals("pluginbase"))) {
				} else {
					MavenPluginLocation mavenPluginLocation = mavenPluginRepository.getPluginLocation(dependency.getGroupId(), dependency.getArtifactId());

					try {
						Path depJarFile = mavenPluginLocation.getVersionJar(dependency.getVersion());

						FileJarClassLoader jarClassLoader = new FileJarClassLoader(pluginManager, delegatingClassLoader, depJarFile);
						jarClassLoaders.add(jarClassLoader);
						delegatingClassLoader.add(jarClassLoader);
					} catch (Exception e) {

					}
				}
			}
		}
	}
	return loadPlugin(pluginBundleVersionIdentifier, target, sPluginBundle, pluginBundleVersion, plugins, delegatingClassLoader);
}