Package net.feed_the_beast.launcher.json.versions

Examples of net.feed_the_beast.launcher.json.versions.Library$Artifact


    public static Library loadLibrary (String libJsonObject) throws JsonSyntaxException, JsonIOException {
        return GSON.fromJson(libJsonObject, Library.class);
    }

    public static Update getUpdate (String name, String url) throws IOException {
        Library l = new Library();
        l.name = name;
        return GSON.fromJson(IOUtils.toString(new URL(url + l.getPath())), Update.class);
    }
View Full Code Here


        String fgVsn = forgeArtifact.getVersion();
        int vsn_ = Integer.parseInt(fgVsn.substring(StringUtils.lastIndexOf(fgVsn, ".") + 1));
        if (vsn_ >= Settings.getSettings().getMinJava8HackVsn() && vsn_ <= Settings.getSettings().getMaxJava8HackVsn()) {
            Logger.logDebug("adding legacyjavafixer to modpack as it is needed for this forge version to make java 8 function correctly");
            String json = "{\"url\":\"http://ftb.cursecdn.com/FTB2/maven/\",\"name\":\"net.minecraftforge.lex:legacyjavafixer:1.0\",\"checksums\":[\"a11b502bef19f49bfc199722b94da5f3d7b470a8\"]}";
            Library l = JsonFactory.loadLibrary(json);//TODO this should be pulled from the same json file
            try {//TODO we should have a method to grab a single library file to a location
                DownloadUtils.downloadToFile(installBase + "/minecraft/mods/legacyjavafixer-1.0.jar", l.getUrl() + l.getPath());
            } catch (Exception e) {
                Logger.logError("Error grabbing legacy java wrapper library", e);
            }
        }
    }
View Full Code Here

        ConnectorDCB connector = (ConnectorDCB) dcbRoot.getDConfigBean(root.getChildBean(dcbRoot.getXpaths()[0])[0]);
        assertNotNull(connector);
        assertNull(connector.getEnvironment());
        EnvironmentData environment = new EnvironmentData();
        connector.setEnvironment(environment);
        Artifact configId = new Artifact();
        environment.setConfigId(configId);
        assertNull(configId.getArtifactId());
        assertNull(configId.getGroupId());
        assertNull(configId.getType());
        assertNull(configId.getVersion());
        configId.setGroupId("test");
        configId.setArtifactId("product");
        configId.setType("rar");
        configId.setVersion("1.0");
        Artifact parent = new Artifact();
        Artifact dependency = new Artifact();
        environment.setDependencies(new Artifact[]{parent, dependency});
        assertNull(parent.getArtifactId());
        assertNull(parent.getGroupId());
        assertNull(parent.getType());
        assertNull(parent.getVersion());
        assertNull(dependency.getArtifactId());
        assertNull(dependency.getGroupId());
        assertNull(dependency.getType());
        assertNull(dependency.getVersion());
        parent.setGroupId("org.apache.geronimo.configs");
        parent.setArtifactId("j2ee-server");
        parent.setType("car");
        assertNull(parent.getVersion());
        dependency.setGroupId("postgresql");
        dependency.setArtifactId("postgresql-8.0");
        dependency.setType("jar");
        dependency.setVersion("313.jdbc3");
        // todo: Try the /connector/environment/hidden-classes element
        // todo: Try the /connector/environment/non-overridable-classes element
        // Try the /connector/resourceadapter element
        assertNotNull(connector.getResourceAdapter());
        assertEquals(1, connector.getResourceAdapter().length);
View Full Code Here

        ConnectorDCB connector = (ConnectorDCB) dcbRoot.getDConfigBean(root.getChildBean(dcbRoot.getXpaths()[0])[0]);
        assertNotNull(connector);
        assertNull(connector.getEnvironment());
        EnvironmentData environment = new EnvironmentData();
        connector.setEnvironment(environment);
        Artifact configId = new Artifact();
        environment.setConfigId(configId);
        assertNull(configId.getArtifactId());
        assertNull(configId.getGroupId());
        assertNull(configId.getType());
        assertNull(configId.getVersion());
        configId.setGroupId("test");
        configId.setArtifactId("product");
        configId.setType("rar");
        configId.setVersion("1.0");
        Artifact parent = new Artifact();
        Artifact dependency = new Artifact();
        environment.setDependencies(new Artifact[]{parent, dependency});
        assertNull(parent.getArtifactId());
        assertNull(parent.getGroupId());
        assertNull(parent.getType());
        assertNull(parent.getVersion());
        assertNull(dependency.getArtifactId());
        assertNull(dependency.getGroupId());
        assertNull(dependency.getType());
        assertNull(dependency.getVersion());
        parent.setGroupId("geronimo");
        parent.setArtifactId("j2ee-server");
        parent.setType("car");
        assertNull(parent.getVersion());
        dependency.setGroupId("postgresql");
        dependency.setArtifactId("postgresql-8.0");
        dependency.setType("jar");
        dependency.setVersion("313.jdbc3");
        // todo: Try the /connector/environment/hidden-classes element
        // todo: Try the /connector/environment/non-overridable-classes element
        // Try the /connector/resourceadapter element
        assertNotNull(connector.getResourceAdapter());
        assertEquals(1, connector.getResourceAdapter().length);
View Full Code Here

        ConnectorDCB connector = (ConnectorDCB) dcbRoot.getDConfigBean(root.getChildBean(dcbRoot.getXpaths()[0])[0]);
        assertNotNull(connector);
        assertNull(connector.getEnvironment());
        EnvironmentData environment = new EnvironmentData();
        connector.setEnvironment(environment);
        Artifact configId = new Artifact();
        environment.setConfigId(configId);
        assertNull(configId.getArtifactId());
        assertNull(configId.getGroupId());
        assertNull(configId.getType());
        assertNull(configId.getVersion());
        configId.setGroupId("test");
        configId.setArtifactId("product");
        configId.setType("rar");
        configId.setVersion("1.0");
        Artifact parent = new Artifact();
        Artifact dependency = new Artifact();
        environment.setDependencies(new Artifact[]{parent, dependency});
        assertNull(parent.getArtifactId());
        assertNull(parent.getGroupId());
        assertNull(parent.getType());
        assertNull(parent.getVersion());
        assertNull(dependency.getArtifactId());
        assertNull(dependency.getGroupId());
        assertNull(dependency.getType());
        assertNull(dependency.getVersion());
        parent.setGroupId("org.apache.geronimo.configs");
        parent.setArtifactId("j2ee-server");
        parent.setType("car");
        assertNull(parent.getVersion());
        dependency.setGroupId("postgresql");
        dependency.setArtifactId("postgresql-8.0");
        dependency.setType("jar");
        dependency.setVersion("313.jdbc3");
        // todo: Try the /connector/environment/hidden-classes element
        // todo: Try the /connector/environment/non-overridable-classes element
        // Try the /connector/resourceadapter element
        assertNotNull(connector.getResourceAdapter());
        assertEquals(1, connector.getResourceAdapter().length);
View Full Code Here

        ConnectorDCB connector = (ConnectorDCB) dcbRoot.getDConfigBean(root.getChildBean(dcbRoot.getXpaths()[0])[0]);
        assertNotNull(connector);
        assertNull(connector.getEnvironment());
        EnvironmentData environment = new EnvironmentData();
        connector.setEnvironment(environment);
        Artifact configId = new Artifact();
        environment.setConfigId(configId);
        assertNull(configId.getArtifactId());
        assertNull(configId.getGroupId());
        assertNull(configId.getType());
        assertNull(configId.getVersion());
        configId.setGroupId("test");
        configId.setArtifactId("product");
        configId.setType("rar");
        configId.setVersion("1.0");
        Artifact parent = new Artifact();
        Artifact dependency = new Artifact();
        environment.setDependencies(new Artifact[]{parent, dependency});
        assertNull(parent.getArtifactId());
        assertNull(parent.getGroupId());
        assertNull(parent.getType());
        assertNull(parent.getVersion());
        assertNull(dependency.getArtifactId());
        assertNull(dependency.getGroupId());
        assertNull(dependency.getType());
        assertNull(dependency.getVersion());
        parent.setGroupId("org.apache.geronimo.configs");
        parent.setArtifactId("j2ee-server");
        parent.setType("car");
        assertNull(parent.getVersion());
        dependency.setGroupId("postgresql");
        dependency.setArtifactId("postgresql-8.0");
        dependency.setType("jar");
        dependency.setVersion("313.jdbc3");
        // todo: Try the /connector/environment/hidden-classes element
        // todo: Try the /connector/environment/non-overridable-classes element
        // Try the /connector/resourceadapter element
        assertNotNull(connector.getResourceAdapter());
        assertEquals(1, connector.getResourceAdapter().length);
View Full Code Here

        ConnectorDCB connector = (ConnectorDCB) dcbRoot.getDConfigBean(root.getChildBean(dcbRoot.getXpaths()[0])[0]);
        assertNotNull(connector);
        assertNull(connector.getEnvironment());
        EnvironmentData environment = new EnvironmentData();
        connector.setEnvironment(environment);
        Artifact configId = new Artifact();
        environment.setConfigId(configId);
        assertNull(configId.getArtifactId());
        assertNull(configId.getGroupId());
        assertNull(configId.getType());
        assertNull(configId.getVersion());
        configId.setGroupId("test");
        configId.setArtifactId("product");
        configId.setType("rar");
        configId.setVersion("1.0");
        Artifact parent = new Artifact();
        Artifact dependency = new Artifact();
        environment.setDependencies(new Artifact[]{parent, dependency});
        assertNull(parent.getArtifactId());
        assertNull(parent.getGroupId());
        assertNull(parent.getType());
        assertNull(parent.getVersion());
        assertNull(dependency.getArtifactId());
        assertNull(dependency.getGroupId());
        assertNull(dependency.getType());
        assertNull(dependency.getVersion());
        parent.setGroupId("org.apache.geronimo.configs");
        parent.setArtifactId("j2ee-server");
        parent.setType("car");
        assertNull(parent.getVersion());
        dependency.setGroupId("postgresql");
        dependency.setArtifactId("postgresql-8.0");
        dependency.setType("jar");
        dependency.setVersion("313.jdbc3");
        // todo: Try the /connector/environment/hidden-classes element
        // todo: Try the /connector/environment/non-overridable-classes element
        // Try the /connector/resourceadapter element
        assertNotNull(connector.getResourceAdapter());
        assertEquals(1, connector.getResourceAdapter().length);
View Full Code Here

        ConnectorDCB connector = (ConnectorDCB) dcbRoot.getDConfigBean(root.getChildBean(dcbRoot.getXpaths()[0])[0]);
        assertNotNull(connector);
        assertNull(connector.getEnvironment());
        EnvironmentData environment = new EnvironmentData();
        connector.setEnvironment(environment);
        Artifact configId = new Artifact();
        environment.setConfigId(configId);
        assertNull(configId.getArtifactId());
        assertNull(configId.getGroupId());
        assertNull(configId.getType());
        assertNull(configId.getVersion());
        configId.setGroupId("test");
        configId.setArtifactId("product");
        configId.setType("rar");
        configId.setVersion("1.0");
        Artifact parent = new Artifact();
        Artifact dependency = new Artifact();
        environment.setDependencies(new Artifact[]{parent, dependency});
        assertNull(parent.getArtifactId());
        assertNull(parent.getGroupId());
        assertNull(parent.getType());
        assertNull(parent.getVersion());
        assertNull(dependency.getArtifactId());
        assertNull(dependency.getGroupId());
        assertNull(dependency.getType());
        assertNull(dependency.getVersion());
        parent.setGroupId("geronimo");
        parent.setArtifactId("j2ee-server");
        parent.setType("car");
        assertNull(parent.getVersion());
        dependency.setGroupId("postgresql");
        dependency.setArtifactId("postgresql-8.0");
        dependency.setType("jar");
        dependency.setVersion("313.jdbc3");
        // todo: Try the /connector/environment/hidden-classes element
        // todo: Try the /connector/environment/non-overridable-classes element
        // Try the /connector/resourceadapter element
        assertNotNull(connector.getResourceAdapter());
        assertEquals(1, connector.getResourceAdapter().length);
View Full Code Here

        ConnectorDCB connector = (ConnectorDCB) dcbRoot.getDConfigBean(root.getChildBean(dcbRoot.getXpaths()[0])[0]);
        assertNotNull(connector);
        assertNull(connector.getEnvironment());
        EnvironmentData environment = new EnvironmentData();
        connector.setEnvironment(environment);
        Artifact configId = new Artifact();
        environment.setConfigId(configId);
        assertNull(configId.getArtifactId());
        assertNull(configId.getGroupId());
        assertNull(configId.getType());
        assertNull(configId.getVersion());
        configId.setGroupId("test");
        configId.setArtifactId("product");
        configId.setType("rar");
        configId.setVersion("1.0");
        Artifact parent = new Artifact();
        Artifact dependency = new Artifact();
        environment.setDependencies(new Artifact[]{parent, dependency});
        assertNull(parent.getArtifactId());
        assertNull(parent.getGroupId());
        assertNull(parent.getType());
        assertNull(parent.getVersion());
        assertNull(dependency.getArtifactId());
        assertNull(dependency.getGroupId());
        assertNull(dependency.getType());
        assertNull(dependency.getVersion());
        parent.setGroupId("org.apache.geronimo.configs");
        parent.setArtifactId("j2ee-server");
        parent.setType("car");
        assertNull(parent.getVersion());
        dependency.setGroupId("postgresql");
        dependency.setArtifactId("postgresql-8.0");
        dependency.setType("jar");
        dependency.setVersion("313.jdbc3");
        // todo: Try the /connector/environment/hidden-classes element
        // todo: Try the /connector/environment/non-overridable-classes element
        // Try the /connector/resourceadapter element
        assertNotNull(connector.getResourceAdapter());
        assertEquals(1, connector.getResourceAdapter().length);
View Full Code Here

        ConnectorDCB connector = (ConnectorDCB) dcbRoot.getDConfigBean(root.getChildBean(dcbRoot.getXpaths()[0])[0]);
        assertNotNull(connector);
        assertNull(connector.getEnvironment());
        EnvironmentData environment = new EnvironmentData();
        connector.setEnvironment(environment);
        Artifact configId = new Artifact();
        environment.setConfigId(configId);
        assertNull(configId.getArtifactId());
        assertNull(configId.getGroupId());
        assertNull(configId.getType());
        assertNull(configId.getVersion());
        configId.setGroupId("test");
        configId.setArtifactId("product");
        configId.setType("rar");
        configId.setVersion("1.0");
        Artifact parent = new Artifact();
        Artifact dependency = new Artifact();
        environment.setDependencies(new Artifact[]{parent, dependency});
        assertNull(parent.getArtifactId());
        assertNull(parent.getGroupId());
        assertNull(parent.getType());
        assertNull(parent.getVersion());
        assertNull(dependency.getArtifactId());
        assertNull(dependency.getGroupId());
        assertNull(dependency.getType());
        assertNull(dependency.getVersion());
        parent.setGroupId("org.apache.geronimo.configs");
        parent.setArtifactId("j2ee-server");
        parent.setType("car");
        assertNull(parent.getVersion());
        dependency.setGroupId("postgresql");
        dependency.setArtifactId("postgresql-8.0");
        dependency.setType("jar");
        dependency.setVersion("313.jdbc3");
        // todo: Try the /connector/environment/hidden-classes element
        // todo: Try the /connector/environment/non-overridable-classes element
        // Try the /connector/resourceadapter element
        assertNotNull(connector.getResourceAdapter());
        assertEquals(1, connector.getResourceAdapter().length);
View Full Code Here

TOP

Related Classes of net.feed_the_beast.launcher.json.versions.Library$Artifact

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.