Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.15.2][Resolved] Embedded Jar not Extracted


Papa_Prime
 Share

Recommended Posts

Hello, this is how I embed the jar using my buildscript

buildscript {
    repositories {
        maven { url = 'https://files.minecraftforge.net/maven' }
        maven {
            url = "https://repo.spongepowered.org/maven"
        }
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
        classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
    }
}

import net.minecraftforge.gradle.common.task.SignJar
import groovy.json.JsonSlurper
import groovy.json.JsonOutput

plugins {
    id 'org.spongepowered.plugin' version '0.6'
    id 'com.github.johnrengelman.shadow' version '1.2.4'
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

version = '1.0'
group = 'net.papaprime.papacore'
archivesBaseName = 'papacore'

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'

repositories {
    jcenter()
    maven {
        name = "spongepowered"
        url = "https://repo.spongepowered.org/maven"
    }
}

configurations {
    inJar
}
configurations.compile.extendsFrom(configurations.inJar)


minecraft {

    mappings channel: 'snapshot', version: '20200514-1.15.1'

    runs {
        client {
            workingDirectory project.file('run')

            // Recommended logging data for a userdev environment
            property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

            // Recommended logging level for the console
            property 'forge.logging.console.level', 'debug'

            mods {
                papacore {
                    source sourceSets.main
                }
            }
        }

        server {
            workingDirectory project.file('run')

            property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

            property 'forge.logging.console.level', 'debug'

            mods {
                papacore {
                    source sourceSets.main
                }
            }
        }

        data {
            workingDirectory project.file('run')

            property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

            property 'forge.logging.console.level', 'debug'

            args '--mod', 'papacore', '--all', '--output', file('src/generated/resources/')

            mods {
                papacore {
                    source sourceSets.main
                }
            }
        }
    }
}

dependencies {
    minecraft 'net.minecraftforge:forge:1.15.2-31.2.8'
    // For more info...
    // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
    // http://www.gradle.org/docs/current/userguide/dependency_management.html

    inJar("org.spongepowered:mixin:0.8")
}

jar {
    manifest {
        attributes([
                "TweakClass": "org.spongepowered.asm.launch.MixinTweaker",
                "TweakOrder": 0,
                "MixinConfigs": "mixins.papacore.json",
            "Specification-Title": "papacore",
            "Specification-Vendor": "papacoresareus",
            "Specification-Version": "1", // We are version 1 of ourselves
            "Implementation-Title": project.name,
            "Implementation-Version": "${version}",
            "Implementation-Vendor" :"papacoresareus",
            "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
            "ContainedDeps": "mixin-0.8.jar"
        ])
    }
    from(configurations.inJar) {
        into 'META-INF/libraries'
    }
}

task signJar(type: SignJar, dependsOn: jar) {

    // findProperty allows us to reference the property without it existing.
    // Using project.propName would cause the script to fail validation if
    // the property did not exist.
    keyStore = project.findProperty('keyStore')
    alias = project.findProperty('keyStoreAlias')
    storePass = project.findProperty('keyStorePass')
    keyPass = project.findProperty('keyStoreKeyPass')
    inputFile = jar.archivePath
    outputFile = jar.archivePath
}

build.dependsOn signJar

jar.finalizedBy('reobfJar')

publishing {
    publications {
        mavenJava(MavenPublication) {
            artifact jar
        }
    }
    repositories {
        maven {
            url "file:///${project.projectDir}/mcmodsrepo"
        }

    }
}

The packaging seems fine, no errors are thrown and the files are successfully signed. But when I load it outside of the dev environment it crashes with this at the start suggesting that the library was not in fact extracted:

java.lang.NoClassDefFoundError: org/spongepowered/asm/launch/MixinBootstrap
[09Jun2020 19:22:42.125] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at net.papaprime.papacore.asm.TransformationService.initialize(TransformationService.java:31)
[09Jun2020 19:22:42.126] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at cpw.mods.modlauncher.TransformationServiceDecorator.onInitialize(TransformationServiceDecorator.java:68)
[09Jun2020 19:22:42.126] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at cpw.mods.modlauncher.TransformationServicesHandler.lambda$initialiseTransformationServices$7(TransformationServicesHandler.java:107)
[09Jun2020 19:22:42.126] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at cpw.mods.modlauncher.TransformationServicesHandler$$Lambda$85/182531396.accept(Unknown Source)
[09Jun2020 19:22:42.126] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at java.util.HashMap$Values.forEach(HashMap.java:972)
[09Jun2020 19:22:42.127] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at cpw.mods.modlauncher.TransformationServicesHandler.initialiseTransformationServices(TransformationServicesHandler.java:107)
[09Jun2020 19:22:42.127] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at cpw.mods.modlauncher.TransformationServicesHandler.initializeTransformationServices(TransformationServicesHandler.java:59)
[09Jun2020 19:22:42.128] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at cpw.mods.modlauncher.Launcher.run(Launcher.java:75)
[09Jun2020 19:22:42.128] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: 	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
[09Jun2020 19:22:42.131] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: Caused by: java.lang.ClassNotFoundException: org.spongepowered.asm.launch.MixinBootstrap
[09Jun2020 19:22:42.132] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: 	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[09Jun2020 19:22:42.132] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[09Jun2020 19:22:42.132] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[09Jun2020 19:22:42.132] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: 	... 9 more

I have searched for the issue with dependency extraction but I was not successful. Any help would be appreciated

Edited by Papa_Prime
Link to comment
Share on other sites

Fair, I will begin working on the addition to forge then.

Edit: This will need far more changes to be convenient. I understand why nobody has added this as a feature of forge yet. Will try to find another way to mess with UseActions

Edited by Papa_Prime
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • I tried to make an entity, but when I summon my entity, Minecraft crashes: https://gist.github.com/ArianKG/27288da1b8d670817711372a9e715d96 Source code: https://github.com/ArianKG/KGForge
    • en un servidor que he intentado crear me da este error es de la 1.12.2       ---- Minecraft Crash Report ---- WARNING: coremods are present:   Do not report to Forge! (If you haven't disabled the FoamFix coremod, try disabling it in the config! Note that this bit of text will still appear.) (foamfix-0.10.7-1.12.2.jar)   llibrary (llibrary-core-1.0.11-1.12.2.jar)   iceandfire (iceandfire-1.8.3.jar)   AppleCore (AppleCore-mc1.12.2-3.2.0.jar)   CreativePatchingLoader (CreativeCore_v1.9.68_mc1.12.2.jar)   MalisisCorePlugin (malisiscore-1.12.2-6.5.1.jar)   McLib core mod (mclib-1.0.3-1.12.2.jar)   LoadingPlugin (Bloodmoon-MC1.12.2-1.5.3.jar) Contact their authors BEFORE contacting forge // Uh... Did I do that? Time: 20/10/21 14:03 Description: Exception in server tick loop net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Decocraft (props) Caused by: java.lang.OutOfMemoryError: Java heap space     at java.awt.image.DataBufferByte.<init>(Unknown Source)     at java.awt.image.ComponentSampleModel.createDataBuffer(Unknown Source)     at java.awt.image.Raster.createWritableRaster(Unknown Source)     at javax.imageio.ImageTypeSpecifier.createBufferedImage(Unknown Source)     at javax.imageio.ImageReader.getDestination(Unknown Source)     at com.sun.imageio.plugins.png.PNGImageReader.readImage(Unknown Source)     at com.sun.imageio.plugins.png.PNGImageReader.read(Unknown Source)     at com.mia.craftstudio.utils.ImageIOCS.read(ImageIOCS.java:26)     at com.mia.craftstudio.CSModel.<init>(CSModel.java:379)     at com.mia.craftstudio.CSPack.readPackFile(CSPack.java:197)     at com.mia.craftstudio.CSProject.loadPacks(CSProject.java:252)     at com.mia.craftstudio.minecraft.forge.CSLibMod.getCSProjectAndLoad(CSLibMod.java:91)     at com.mia.props.Props.loadModels(Props.java:209)     at com.mia.props.Props.preInit(Props.java:166)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:637)     at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)     at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details:     Minecraft Version: 1.12.2     Operating System: Windows 10 (x86) version 10.0     Java Version: 1.8.0_251, Oracle Corporation     Java VM Version: Java HotSpot(TM) Client VM (mixed mode, sharing), Oracle Corporation     Memory: 3977648 bytes (3 MB) / 259522560 bytes (247 MB) up to 259522560 bytes (247 MB)     JVM Flags: 0 total;      IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     FML: MCP 9.42 Powered by Forge 14.23.5.2855 43 mods loaded, 42 mods active     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored     | State | ID                  | Version               | Source                                  | Signature                                |     |:----- |:------------------- |:--------------------- |:--------------------------------------- |:---------------------------------------- |     | LCH   | minecraft           | 1.12.2                | minecraft.jar                           | None                                     |     | LCH   | mcp                 | 9.42                  | minecraft.jar                           | None                                     |     | LCH   | FML                 | 8.0.99.99             | forge-1.12.2-14.23.5.2855.jar           | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LCH   | forge               | 14.23.5.2855          | forge-1.12.2-14.23.5.2855.jar           | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LCH   | creativecoredummy   | 1.0.0                 | minecraft.jar                           | None                                     |     | LCH   | foamfixcore         | 7.7.4                 | minecraft.jar                           | None                                     |     | LCH   | securitycraft       | v1.8.12.1             | [1.12.2]+SecurityCraft+v1.8.12.1.jar    | None                                     |     | LCH   | damageindicatorsmod | 1.0                   | [1.12.2]DamageIndicatorsMod-3.5.1.jar   | None                                     |     | LCH   | applecore           | 3.2.0                 | AppleCore-mc1.12.2-3.2.0.jar            | None                                     |     | LCH   | jei                 | 4.15.0.268            | jei_1.12.2-4.15.0.268.jar               | None                                     |     | LCH   | appleskin           | 1.0.9                 | AppleSkin-mc1.12-1.0.9.jar              | None                                     |     | LCH   | astralsorcery       | 1.6.1                 | astralsorcery-1.12-1.6.1.jar            | None                                     |     | LCH   | baubles             | 1.5.2                 | Baubles-1.12-1.5.2.jar                  | None                                     |     | LCH   | bloodmoon           | 1.5.3                 | Bloodmoon-MC1.12.2-1.5.3.jar            | d72e0dd57935b3e9476212aea0c0df352dd76291 |     | LCH   | chesttransporter    | 2.8.8                 | Chest-Transporter-Mod-1.12.2.jar        | None                                     |     | LCH   | playerrevive        | 1.0                   | PlayerRevive_v1.2.28_mc1.12.2.jar       | None                                     |     | LCH   | creativecore        | 1.9.9                 | CreativeCore_v1.9.68_mc1.12.2.jar       | None                                     |     | LCE   | props               | 2.6.3                 | Decocraft-2.6.3_1.12.2.jar              | None                                     |     | LC    | dynamictrees        | 1.12.2-0.9.5          | DynamicTrees-1.12.2-0.9.5.jar           | None                                     |     | LC    | harvestcraft        | 1.12.2zb              | Pam's+HarvestCraft+1.12.2zf.jar         | None                                     |     | LC    | dynamictreesphc     | 1.12.2-1.4.2          | DynamicTreesPHC-1.12.2-1.4.2.jar        | None                                     |     | LC    | mclib               | 1.0.3                 | mclib-1.0.3-1.12.2.jar                  | None                                     |     | LC    | emoticons           | 0.3                   | emoticons-0.3-1.12.2-dist.jar           | None                                     |     | LC    | fencejumper         | 1.0.5                 | fencejumper-1.12-1.0.5.jar              | None                                     |     | LC    | ferdinandsflowers   | 1.10.4.1              | Ferdinand's+Flowers-1.12.x-1.10.4.1.jar | None                                     |     | LC    | foamfix             | 0.10.7-1.12.2         | foamfix-0.10.7-1.12.2.jar               | None                                     |     | LC    | waila               | 1.8.26                | Hwyla-1.8.26-B41_1.12.2.jar             | None                                     |     | LC    | llibrary            | 1.7.19                | llibrary-1.7.19-1.12.2.jar              | b9f30a813bee3b9dd5652c460310cfcd54f6b7ec |     | LC    | iceandfire          | 1.8.3                 | iceandfire-1.8.3.jar                    | None                                     |     | LC    | ichunutil           | 7.2.2                 | iChunUtil-1.12.2-7.2.2.jar              | 4db5c2bd1b556f252a5b8b54b256d381b2a0a6b8 |     | LC    | infernalmobs        | 1.7.6                 | InfernalMobs-1.12.2.jar                 | None                                     |     | LC    | journeymap          | 1.12.2-5.5.4          | journeymap-1.12.2-5.5.4.jar             | None                                     |     | LC    | laggoggles          | FAT-1.12.2-4.8        | LagGoggles-FAT-1.12.2-4.8.jar           | None                                     |     | LC    | libraryex           | 1.0.12                | LibraryEx-1.12.2-1.0.12.jar             | None                                     |     | LC    | magma_monsters      | 0.3.0                 | MagmaMonsters-0.3.0.jar                 | None                                     |     | LC    | malisiscore         | 1.12.2-6.5.1-SNAPSHOT | malisiscore-1.12.2-6.5.1.jar            | None                                     |     | LC    | malisisdoors        | 1.12.2-7.3.0          | malisisdoors-1.12.2-7.3.0.jar           | None                                     |     | LC    | netherex            | 2.0.15                | NetherEx-1.12.2-2.0.15.jar              | None                                     |     | LC    | playerskins         | 1.0.4                 | playerskin-1.12.2-1.0.5.jar             | None                                     |     | LC    | radixcore           | 1.12.x-2.2.1          | RadixCore-1.12.x-2.2.1-universal.jar    | None                                     |     | LC    | cactusmod           | 1.2.1                 | The-Cactus-Mod-1.12.2.jar               | None                                     |     | LC    | tombstone           | 3.5.9                 | tombstone-3.5.9-1.12.2.jar              | None                                     |     | UD    | mclib_core          | 1.0.3                 | minecraft.jar                           | None                                     |     Loaded coremods (and transformers):  Do not report to Forge! (If you haven't disabled the FoamFix coremod, try disabling it in the config! Note that this bit of text will still appear.) (foamfix-0.10.7-1.12.2.jar)   pl.asie.foamfix.coremod.FoamFixTransformer llibrary (llibrary-core-1.0.11-1.12.2.jar)   net.ilexiconn.llibrary.server.core.plugin.LLibraryTransformer   net.ilexiconn.llibrary.server.core.patcher.LLibraryRuntimePatcher iceandfire (iceandfire-1.8.3.jar)   com.github.alexthe666.iceandfire.patcher.IceAndFireRuntimePatcher AppleCore (AppleCore-mc1.12.2-3.2.0.jar)   squeek.applecore.asm.TransformerModuleHandler CreativePatchingLoader (CreativeCore_v1.9.68_mc1.12.2.jar)    MalisisCorePlugin (malisiscore-1.12.2-6.5.1.jar)    McLib core mod (mclib-1.0.3-1.12.2.jar)   mchorse.mclib.core.McLibCMClassTransformer LoadingPlugin (Bloodmoon-MC1.12.2-1.5.3.jar)   lumien.bloodmoon.asm.ClassTransformer     Profiler Position: N/A (disabled)     Is Modded: Definitely; Server brand changed to 'fml,forge'     Type: Dedicated Server (map_server.txt)
    • https://gist.github.com/twixsbar/62ebb07f0c4877c7c62023fda1b8961f tell me if this works
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.