Java Code Examples for org.apache.ivy.Ivy#newInstance()

The following examples show how to use org.apache.ivy.Ivy#newInstance() . 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: InstallTest.java    From ant-ivy with Apache License 2.0 6 votes vote down vote up
@Test
public void testRegexpMatcher() throws Exception {
    Ivy ivy = Ivy.newInstance();
    ivy.configure(new File("test/repositories/ivysettings.xml"));

    ivy.install(ModuleRevisionId.newInstance("org1", ".*", ".*"), "1", "install",
        new InstallOptions().setMatcherName(PatternMatcher.REGEXP).setOverwrite(true));

    assertTrue(new File("build/test/install/org1/mod1.1/ivy-1.0.xml").exists());
    assertTrue(new File("build/test/install/org1/mod1.1/mod1.1-1.0.jar").exists());

    assertTrue(new File("build/test/install/org1/mod1.1/ivy-1.1.xml").exists());
    assertTrue(new File("build/test/install/org1/mod1.1/mod1.1-1.1.jar").exists());

    assertTrue(new File("build/test/install/org1/mod1.2/ivy-2.0.xml").exists());
    assertTrue(new File("build/test/install/org1/mod1.2/mod1.2-2.0.jar").exists());

    // mod1.3 is split because Ivy thinks there are two versions of the module:
    // this is the normal behaviour in this case
    assertTrue(new File("build/test/install/org1/mod1.3/ivy-B-3.0.xml").exists());
    assertTrue(new File("build/test/install/org1/mod1.3/ivy-A-3.0.xml").exists());
    assertTrue(new File("build/test/install/org1/mod1.3/mod1.3-A-3.0.jar").exists());
    assertTrue(new File("build/test/install/org1/mod1.3/mod1.3-B-3.0.jar").exists());

    assertTrue(new File("build/test/install/org1/mod1.4/ivy-1.0.1.xml").exists());
}
 
Example 2
Source File: InstallTest.java    From ant-ivy with Apache License 2.0 6 votes vote down vote up
@Test
public void testLatestDependenciesNoDefaultResolver() throws Exception {
    Ivy ivy = Ivy.newInstance();
    ivy.configure(new File("test/repositories/ivysettings-nodefaultresolver.xml"));

    ivy.install(ModuleRevisionId.newInstance("org1", "mod1.4", "1.0.1"), "test", "install",
        new InstallOptions());

    assertTrue(new File("build/test/install/org1/mod1.4/ivy-1.0.1.xml").exists());

    assertTrue(new File("build/test/install/org1/mod1.1/ivy-2.0.xml").exists());
    assertTrue(new File("build/test/install/org1/mod1.1/mod1.1-2.0.jar").exists());

    assertTrue(new File("build/test/install/org1/mod1.2/ivy-2.2.xml").exists());
    assertTrue(new File("build/test/install/org1/mod1.2/mod1.2-2.2.jar").exists());
}
 
Example 3
Source File: LibVersionsCheckTask.java    From lucene-solr with Apache License 2.0 6 votes vote down vote up
private void setupIvy() {
  IvySettings ivySettings = new IvySettings();
  try {
    ivySettings.setVariable("common.build.dir", commonBuildDir.getAbsolutePath());
    ivySettings.setVariable("ivy.exclude.types", "source|javadoc");
    ivySettings.setVariable("ivy.resolution-cache.dir", ivyResolutionCacheDir.getAbsolutePath());
    ivySettings.setVariable("ivy.lock-strategy", ivyLockStrategy);
    ivySettings.setVariable("ivysettings.xml", getProject().getProperty("ivysettings.xml")); // nested settings file
    ivySettings.setBaseDir(commonBuildDir);
    ivySettings.setDefaultConflictManager(new NoConflictManager());
    ivy = Ivy.newInstance(ivySettings);
    ivy.configure(topLevelIvySettingsFile);
  } catch (Exception e) {
    throw new BuildException("Exception reading " + topLevelIvySettingsFile.getPath() + ": " + e.toString(), e);
  }
}
 
Example 4
Source File: InstallTest.java    From ant-ivy with Apache License 2.0 6 votes vote down vote up
@Test
public void testMaven() throws Exception {
    Ivy ivy = Ivy.newInstance();
    ivy.configure(new File("test/repositories/ivysettings.xml"));

    @SuppressWarnings("unused")
    ResolveReport rr = ivy.install(ModuleRevisionId.newInstance("org.apache", "test", "1.0"),
        ivy.getSettings().getDefaultResolver().getName(), "install", new InstallOptions());

    assertTrue(new File("build/test/install/org.apache/test/ivy-1.0.xml").exists());
    assertTrue(new File("build/test/install/org.apache/test/test-1.0.jar").exists());

    // the original descriptor is not installed
    assertFalse(new File("build/test/install/org.apache/test/test-1.0.pom").exists());

    ivy.install(ModuleRevisionId.newInstance("org.apache", "test", "1.0"), ivy.getSettings()
            .getDefaultResolver().getName(), "install", new InstallOptions()
            .setInstallOriginalMetadata(true).setOverwrite(true));

    // the original descriptor is installed now, too
    assertTrue(new File("build/test/install/org.apache/test/test-1.0.pom").exists());
}
 
Example 5
Source File: InstallTest.java    From ant-ivy with Apache License 2.0 6 votes vote down vote up
@Test
public void testLatestDependenciesDummyDefaultResolver() throws Exception {
    Ivy ivy = Ivy.newInstance();
    ivy.configure(new File("test/repositories/ivysettings-dummydefaultresolver.xml"));

    ivy.install(ModuleRevisionId.newInstance("org1", "mod1.4", "1.0.1"), "test", "install",
        new InstallOptions());

    assertTrue(new File("build/test/install/org1/mod1.4/ivy-1.0.1.xml").exists());

    assertTrue(new File("build/test/install/org1/mod1.1/ivy-2.0.xml").exists());
    assertTrue(new File("build/test/install/org1/mod1.1/mod1.1-2.0.jar").exists());

    assertTrue(new File("build/test/install/org1/mod1.2/ivy-2.2.xml").exists());
    assertTrue(new File("build/test/install/org1/mod1.2/mod1.2-2.2.jar").exists());
}
 
Example 6
Source File: XmlModuleUpdaterTest.java    From ant-ivy with Apache License 2.0 5 votes vote down vote up
@Test
public void testUpdate() throws Exception {
    /*
     * For updated file to be equals to updated.xml, we have to fix the line separator to the
     * one used in updated.xml, in order for this test to works in all platforms (default line
     * separator used in updater being platform dependent
     */
    XmlModuleDescriptorUpdater.LINE_SEPARATOR = "\n";
    File dest = new File("build/updated-test.xml");
    dest.deleteOnExit();
    Map<ModuleRevisionId, String> resolvedRevisions = new HashMap<>();
    resolvedRevisions.put(
        ModuleRevisionId.newInstance("yourorg", "yourmodule2", "branch1", "2+"), "2.5");
    resolvedRevisions.put(
        ModuleRevisionId.newInstance("yourorg", "yourmodule6", "trunk", "latest.integration"),
        "6.3");

    Map<ModuleRevisionId, String> resolvedBranches = new HashMap<>();
    resolvedBranches.put(ModuleRevisionId.newInstance("yourorg", "yourmodule3", "3.1"),
        "branch1");
    resolvedBranches.put(
        ModuleRevisionId.newInstance("yourorg", "yourmodule2", "branch1", "2+"), null);

    GregorianCalendar cal = new GregorianCalendar();
    cal.set(2005, 2, 22, 14, 32, 54);

    Ivy ivy = Ivy.newInstance();
    ivy.setVariable("myvar", "myconf1");
    XmlModuleDescriptorUpdater.update(
        XmlModuleUpdaterTest.class.getResource("test-update.xml"),
        dest,
        getUpdateOptions(ivy.getSettings(), resolvedRevisions, "release", "mynewrev",
            cal.getTime()).setResolvedBranches(resolvedBranches));

    assertTrue(dest.exists());
    String expected = FileUtil.readEntirely(new BufferedReader(new InputStreamReader(
            XmlModuleUpdaterTest.class.getResourceAsStream("updated.xml"))));
    String updated = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)));
    assertEquals(expected, updated);
}
 
Example 7
Source File: InstallTest.java    From ant-ivy with Apache License 2.0 5 votes vote down vote up
@Test
public void testSimpleWithoutDefaultResolver() throws Exception {
    Ivy ivy = Ivy.newInstance();
    ivy.configure(new File("test/repositories/ivysettings-nodefaultresolver.xml"));

    ivy.install(ModuleRevisionId.newInstance("org1", "mod1.2", "2.0"), "test", "install",
        new InstallOptions());

    assertTrue(new File("build/test/install/org1/mod1.2/ivy-2.0.xml").exists());
    assertTrue(new File("build/test/install/org1/mod1.2/mod1.2-2.0.jar").exists());
}
 
Example 8
Source File: InstallTest.java    From ant-ivy with Apache License 2.0 5 votes vote down vote up
@Test
public void testSimple() throws Exception {
    Ivy ivy = Ivy.newInstance();
    ivy.configure(new File("test/repositories/ivysettings.xml"));

    ivy.install(ModuleRevisionId.newInstance("org1", "mod1.2", "2.0"), ivy.getSettings()
            .getDefaultResolver().getName(), "install", new InstallOptions());

    assertTrue(new File("build/test/install/org1/mod1.2/ivy-2.0.xml").exists());
    assertTrue(new File("build/test/install/org1/mod1.2/mod1.2-2.0.jar").exists());
}
 
Example 9
Source File: ResolveReportTest.java    From ant-ivy with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    cache = new File("build/cache");
    System.setProperty("ivy.cache.dir", cache.getAbsolutePath());
    createCache();

    deliverDir = new File("build/test/deliver");
    deliverDir.mkdirs();

    workDir = new File("build/test/work");
    workDir.mkdirs();

    ivy = Ivy.newInstance();
    ivy.configure(new File("test/repositories/ivysettings.xml"));
}
 
Example 10
Source File: InstallTest.java    From ant-ivy with Apache License 2.0 5 votes vote down vote up
@Test
public void testNotTransitive() throws Exception {
    Ivy ivy = Ivy.newInstance();
    ivy.configure(new File("test/repositories/ivysettings.xml"));

    ivy.install(ModuleRevisionId.newInstance("org1", "mod1.1", "1.0"), ivy.getSettings()
            .getDefaultResolver().getName(), "install",
        new InstallOptions().setTransitive(false));

    assertTrue(new File("build/test/install/org1/mod1.1/ivy-1.0.xml").exists());
    assertTrue(new File("build/test/install/org1/mod1.1/mod1.1-1.0.jar").exists());

    assertFalse(new File("build/test/install/org1/mod1.2/ivy-2.0.xml").exists());
    assertFalse(new File("build/test/install/org1/mod1.2/mod1.2-2.0.jar").exists());
}
 
Example 11
Source File: SearchTest.java    From ant-ivy with Apache License 2.0 5 votes vote down vote up
@Test
public void testListInMavenRepo2() throws Exception {
    Ivy ivy = Ivy.newInstance();
    ivy.configure(new File("test/repositories/m2/ivysettings.xml").toURI().toURL());
    ((IBiblioResolver) ivy.getSettings().getResolver("m2")).setUseMavenMetadata(false);

    Map<String, Object> otherTokenValues = new HashMap<>();
    otherTokenValues.put(IvyPatternHelper.ORGANISATION_KEY, "org.apache");
    otherTokenValues.put(IvyPatternHelper.MODULE_KEY, "test-metadata");
    String[] revs = ivy.listTokenValues(IvyPatternHelper.REVISION_KEY, otherTokenValues);

    assertEquals(new HashSet<>(Arrays.asList("1.0", "1.1", "1.2")),
            new HashSet<>(Arrays.asList(revs)));
}
 
Example 12
Source File: SearchTest.java    From ant-ivy with Apache License 2.0 5 votes vote down vote up
@Test
public void testListInMavenRepo() throws Exception {
    Ivy ivy = Ivy.newInstance();
    ivy.configure(new File("test/repositories/m2/ivysettings.xml").toURI().toURL());

    Map<String, Object> otherTokenValues = new HashMap<>();
    otherTokenValues.put(IvyPatternHelper.ORGANISATION_KEY, "org.apache");
    otherTokenValues.put(IvyPatternHelper.MODULE_KEY, "test-metadata");
    String[] revs = ivy.listTokenValues(IvyPatternHelper.REVISION_KEY, otherTokenValues);

    assertEquals(new HashSet<>(Arrays.asList("1.0", "1.1")),
            new HashSet<>(Arrays.asList(revs)));
}
 
Example 13
Source File: DefaultIvyContextManager.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private Ivy getIvy() {
    lock.lock();
    try {
        if (!cached.isEmpty()) {
            return cached.removeFirst();
        }
        if (!messageAdapterAttached) {
            Message.setDefaultLogger(new IvyLoggingAdaper());
            messageAdapterAttached = true;
        }
    } finally {
        lock.unlock();
    }
    return Ivy.newInstance(new IvySettings());
}
 
Example 14
Source File: DefaultIvyContextManager.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private Ivy getIvy() {
    lock.lock();
    try {
        if (!cached.isEmpty()) {
            return cached.removeFirst();
        }
        if (!messageAdapterAttached) {
            Message.setDefaultLogger(new IvyLoggingAdaper());
            messageAdapterAttached = true;
        }
    } finally {
        lock.unlock();
    }
    return Ivy.newInstance(new IvySettings());
}
 
Example 15
Source File: DefaultIvyContextManager.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private Ivy getIvy() {
    lock.lock();
    try {
        if (!cached.isEmpty()) {
            return cached.removeFirst();
        }
        if (!messageAdapterAttached) {
            Message.setDefaultLogger(new IvyLoggingAdaper());
            messageAdapterAttached = true;
        }
    } finally {
        lock.unlock();
    }
    return Ivy.newInstance(new IvySettings());
}
 
Example 16
Source File: PublishEventsTest.java    From ant-ivy with Apache License 2.0 4 votes vote down vote up
@Before
public void setUp() throws Exception {
    // reset test case state.
    resetCounters();

    // this ivy settings should configure an InstrumentedResolver, PrePublishTrigger, and
    // PostPublishTrigger
    // (see inner classes below).
    ivy = Ivy.newInstance();
    ivy.configure(PublishEventsTest.class.getResource("ivysettings-publisheventstest.xml"));
    ivy.pushContext();
    publishEngine = ivy.getPublishEngine();

    // setup dummy ivy and data files to test publishing. since we're testing the engine and not
    // the resolver,
    // we don't really care whether the file actually gets published. we just want to make sure
    // that the engine calls the correct methods in the correct order, and fires required
    // events.
    ivyFile = new File("test/java/org/apache/ivy/core/publish/ivy-1.0-dev.xml");
    assertTrue("path to ivy file not found in test environment", ivyFile.exists());
    // the contents of the data file don't matter.
    dataFile = File.createTempFile("ivydata", ".jar");
    dataFile.deleteOnExit();

    publishModule = XmlModuleDescriptorParser.getInstance().parseDescriptor(ivy.getSettings(),
        ivyFile.toURI().toURL(), false);
    // always use the same source data file, no pattern substitution is required.
    publishSources = Collections.singleton(dataFile.getAbsolutePath());
    // always use the same ivy file, no pattern substitution is required.
    publishOptions = new PublishOptions();
    publishOptions.setSrcIvyPattern(ivyFile.getAbsolutePath());

    // set up our expectations for the test. these variables will
    // be checked by the resolver and triggers during publication.
    dataArtifact = publishModule.getAllArtifacts()[0];
    assertEquals("sanity check", "foo", dataArtifact.getName());
    ivyArtifact = MDArtifact.newIvyArtifact(publishModule);

    expectedPublications = new HashMap<>();
    expectedPublications.put(dataArtifact.getId(), new PublishTestCase(dataArtifact, dataFile,
            true));
    expectedPublications.put(ivyArtifact.getId(), new PublishTestCase(ivyArtifact, ivyFile,
            true));
    assertEquals("hashCode sanity check:  two artifacts expected during publish", 2,
        expectedPublications.size());

    // push the TestCase instance onto the context stack, so that our
    // triggers and resolver instances can interact with it it.
    IvyContext.getContext().push(PublishEventsTest.class.getName(), this);
}
 
Example 17
Source File: TestClassWithDependencyRunner.java    From apm-agent-java with Apache License 2.0 4 votes vote down vote up
private static List<URL> resolveArtifacts(List<String> dependencies) throws Exception {
    //creates clear ivy settings
    IvySettings ivySettings = new IvySettings();
    //url resolver for configuration of maven repo
    URLResolver resolver = new URLResolver();
    resolver.setM2compatible(true);
    resolver.setName("central");
    //you can specify the url resolution pattern strategy
    resolver.addArtifactPattern(
        "https://repo1.maven.org/maven2/"
            + "[organisation]/[module]/[revision]/[artifact](-[revision]).[ext]");
    //adding maven repo resolver
    ivySettings.addResolver(resolver);
    //set to the default resolver
    ivySettings.setDefaultResolver(resolver.getName());
    //creates an Ivy instance with settings
    Ivy ivy = Ivy.newInstance(ivySettings);

    File ivyfile = File.createTempFile("ivy", ".xml");
    ivyfile.deleteOnExit();

    DefaultModuleDescriptor md =
        DefaultModuleDescriptor.newDefaultInstance(ModuleRevisionId.newInstance("foo", "foo" + "-caller", "working"));
    for (String dependency : dependencies) {
        String[] split = dependency.split(":");

        DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(md,
            ModuleRevisionId.newInstance(split[0], split[1], split[2]), false, false, true);
        md.addDependency(dd);
    }

    //creates an ivy configuration file
    XmlModuleDescriptorWriter.write(md, ivyfile);

    String[] confs = new String[]{"default"};
    ResolveOptions resolveOptions = new ResolveOptions().setConfs(confs);

    //init resolve report
    ResolveReport report = ivy.resolve(ivyfile.toURL(), resolveOptions);

    List<URL> resolvedDependencies = new ArrayList<>();
    ArtifactDownloadReport[] allArtifactsReports = report.getAllArtifactsReports();
    for (ArtifactDownloadReport allArtifactsReport : allArtifactsReports) {
        resolvedDependencies.add(allArtifactsReport.getLocalFile().toURI().toURL());
    }
    assertThat(resolvedDependencies).hasSizeGreaterThanOrEqualTo(dependencies.size());
    return resolvedDependencies;
}
 
Example 18
Source File: IvyConfigurationProvider.java    From walkmod-core with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * Ivy configuration initialization
 *
 * @throws ParseException
 *             If an error occurs when loading ivy settings file
 *             (ivysettings.xml)
 * @throws IOException
 *             If an error occurs when reading ivy settings file
 *             (ivysettings.xml)
 * @throws ConfigurationException
 *             If ivy settings file (ivysettings.xml) is not found in
 *             classpath
 */
public void initIvy() throws ParseException, IOException, ConfigurationException {

	if (ivy == null) {
		// creates clear ivy settings
		IvySettings ivySettings = new IvySettings();
		File settingsFile = new File(IVY_SETTINGS_FILE);
		if (settingsFile.exists()) {
			ivySettings.load(settingsFile);
		} else {
			URL settingsURL = ClassLoader.getSystemResource(IVY_SETTINGS_FILE);
			if (settingsURL == null) {
				// file not found in System classloader, we try the current one
				settingsURL = this.getClass().getClassLoader().getResource(IVY_SETTINGS_FILE);
				// extra validation to avoid uncontrolled NullPointerException
				// when invoking toURI()
				if (settingsURL == null)
					throw new ConfigurationException("Ivy settings file (" + IVY_SETTINGS_FILE
							+ ") could not be found in classpath");
			}
			ivySettings.load(settingsURL);
		}
		// creates an Ivy instance with settings
		ivy = Ivy.newInstance(ivySettings);
	}

	ivyfile = File.createTempFile("ivy", ".xml");
	ivyfile.deleteOnExit();

	applyVerbose();

	String[] confs = new String[] { "default" };
	resolveOptions = new ResolveOptions().setConfs(confs);
	if (isOffLine) {
		resolveOptions = resolveOptions.setUseCacheOnly(true);
	} else {
		Map<String, Object> params = configuration.getParameters();
		if (params != null) {
			Object value = params.get("offline");
			if (value != null) {
				String offlineOpt = value.toString();
				if (offlineOpt != null) {
					boolean offline = Boolean.parseBoolean(offlineOpt);
					if (offline) {
						resolveOptions = resolveOptions.setUseCacheOnly(true);
					}
				}
			}
		}
	}
}
 
Example 19
Source File: IvyAntSettings.java    From ant-ivy with Apache License 2.0 4 votes vote down vote up
void createIvyEngine(final ProjectComponent task) {
    Project project = task.getProject();
    Property prop = new Property() {
        public void execute() throws BuildException {
            addProperties(getDefaultProperties(task));
        }
    };
    prop.setProject(project);
    prop.init();
    prop.execute();

    IvyAntVariableContainer ivyAntVariableContainer = new IvyAntVariableContainer(project);
    IvySettings settings = new IvySettings(ivyAntVariableContainer);
    settings.setBaseDir(project.getBaseDir());

    if (file == null && url == null) {
        defineDefaultSettingFile(ivyAntVariableContainer, task);
    }

    if (antWorkspaceResolver != null) {
        settings.addConfigured(antWorkspaceResolver.getResolver());
    }

    Ivy ivy = Ivy.newInstance(settings);
    try {
        ivy.pushContext();
        AntMessageLogger.register(task, ivy);

        Message.showInfo();
        configureURLHandler();
        if (file != null) {
            if (!file.exists()) {
                throw new BuildException("settings file does not exist: " + file);
            }
            ivy.configure(file);
        } else {
            if (url == null) {
                throw new AssertionError(
                        "ivy setting should have either a file, either an url,"
                                + " and if not defineDefaultSettingFile must set it.");
            }
            ivy.configure(url);
        }
        ivyAntVariableContainer.updateProject(id);
        ivyEngine = ivy;
    } catch (ParseException | IOException e) {
        throw new BuildException("impossible to configure ivy:settings with given "
                + (file != null ? "file: " + file : "url: " + url) + " : " + e, e);
    } finally {
        ivy.popContext();
    }
}
 
Example 20
Source File: IvyConfigurationProvider.java    From walkmod-core with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * Ivy configuration initialization
 *
 * @throws ParseException
 *             If an error occurs when loading ivy settings file
 *             (ivysettings.xml)
 * @throws IOException
 *             If an error occurs when reading ivy settings file
 *             (ivysettings.xml)
 * @throws ConfigurationException
 *             If ivy settings file (ivysettings.xml) is not found in
 *             classpath
 */
public void initIvy() throws ParseException, IOException, ConfigurationException {

	if (ivy == null) {
		// creates clear ivy settings
		IvySettings ivySettings = new IvySettings();
		File settingsFile = new File(IVY_SETTINGS_FILE);
		if (settingsFile.exists()) {
			ivySettings.load(settingsFile);
		} else {
			URL settingsURL = ClassLoader.getSystemResource(IVY_SETTINGS_FILE);
			if (settingsURL == null) {
				// file not found in System classloader, we try the current one
				settingsURL = this.getClass().getClassLoader().getResource(IVY_SETTINGS_FILE);
				// extra validation to avoid uncontrolled NullPointerException
				// when invoking toURI()
				if (settingsURL == null)
					throw new ConfigurationException("Ivy settings file (" + IVY_SETTINGS_FILE
							+ ") could not be found in classpath");
			}
			ivySettings.load(settingsURL);
		}
		// creates an Ivy instance with settings
		ivy = Ivy.newInstance(ivySettings);
	}

	ivyfile = File.createTempFile("ivy", ".xml");
	ivyfile.deleteOnExit();

	applyVerbose();

	String[] confs = new String[] { "default" };
	resolveOptions = new ResolveOptions().setConfs(confs);
	if (isOffLine) {
		resolveOptions = resolveOptions.setUseCacheOnly(true);
	} else {
		Map<String, Object> params = configuration.getParameters();
		if (params != null) {
			Object value = params.get("offline");
			if (value != null) {
				String offlineOpt = value.toString();
				if (offlineOpt != null) {
					boolean offline = Boolean.parseBoolean(offlineOpt);
					if (offline) {
						resolveOptions = resolveOptions.setUseCacheOnly(true);
					}
				}
			}
		}
	}
}