Cannot Build Granite source

I’m probably going to sound like a real noob here, but I followed all of the instructions for compiling Granite so i could test a hello world style plugin.

I downloaded all of the extra parts such as the Sponge API etc and this solved some problems however there’s one error I keep getting whether it’s windows or Linux (Ubuntu Server, Latest)

The error is:

 Could not GET 'https://libraries.minecraft.net//minecraft_merged_bin/1.8/minecraft_merged_bin-1.8.pom'. Received status code 403 from server: Forbidden

I’ve looked through the source and run a command to try to locate this line in order to fiddle as the double // appears odd imho however I cannot find this line in any of the source and therefore am at a dead end.

Again, this probably makes me sound like a noob and I am only just looking into gradle, coming from maven so my knowledge with it’s system is limited as well.

any help appreciated.

@AzureusNation

2 Likes

I also get that error when I do setupdevworkspace. You may want to try these:

  • setupdecompworkspace build
  • setupciworkspace build

kinda looks like an HTTP error. on minecraft’s side. 403 means we aren’t allowed to access it the way we’re trying to. using the different setup commands won’t fix it; its unrelated.

This has been submitted as an issue and we believe that minecraft/mojang are changing some Maven settings and domain names. Although Forge builds do work, please just make sure that you are following each step carefully as the steps do work. if your I doubt do the step twice, it will not hurt the build.

This error is not related to Minecraft/Mojang at all. It means only one thing: You didn’t setup your workspace before building Granite. Running gradle setupDecompWorkspace build does not work, instead you need to run gradle setupDecompWorkspace first and gradle build after that.

This behaviour is equal to Sponge’s. There is no difference for the steps to build Sponge or Granite and the same will also happen on Sponge if the workspace isn’t set up properly.

As for the 403 returned by the server, it simply returns 403 for every file it can’t find. So if Gradle tries to fetch a dependency from every defined source (which is impossible because it doesn’t exist), and one of them doesn’t return 404 (for not found) as expected then it will think this is the cause of the problem (which is not related at all in this case).

5 Likes

Ok, I’m no longer getting that error and have run these commands now:

gradle setupdecompworkspace
gradle setupciworkspace
gradle build

however now there’s another error which I have encountered before however no matter whatever I do it doesn’t fix.

the error is:

warning: Supported source version 'RELEASE_6' from annotation processor 'org.spongepowered.tools.obfuscation.TargetObfuscationProcessor' less than -source '1.8'

Note: Loading SRGs from C:\Users\User\.gradle\caches\minecraft\net\minecrell\vanilla\1.8-8.0.49.1047\srgs\mcp-srg.srg
Note: Writing output SRGs to C:\Users\User\Desktop\Granite-master\build\tmp\mixins\mixins.srg
warning: Supported source version 'RELEASE_6' from annotation processor 'org.spongepowered.tools.obfuscation.InjectionObfuscationProcessor' less than -source '1.8'
Note: Writing refmap to C:\Users\User\Desktop\Granite-master\build\tmp\mixins\mi
xins.granite.refmap.json
C:\Users\User\Desktop\Granite-master\build\sources\java\org\spongepowered\granite\wrapper\BlockWrapper.java:33: error: cannot find symbol
import org.spongepowered.api.block.BlockLoc;
                                  ^
  symbol:   class BlockLoc
  location: package org.spongepowered.api.block
C:\Users\User\Desktop\Granite-master\build\sources\java\org\spongepowered\granite\wrapper\BlockWrapper.java:48: error: cannot find symbol
public class BlockWrapper implements BlockLoc {
                                     ^
  symbol: class BlockLoc
C:\Users\User\Desktop\Granite-master\build\sources\java\org\spongepowered\granit e\wrapper\BlockWrapper.java:110: error: cannot find symbol
    public BlockLoc getRelative(Direction direction) {
           ^
  symbol:   class BlockLoc
  location: class BlockWrapper
3 errors
2 warnings
:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

BUILD FAILED

Total time: 36.163 secs

I have seen this error before and for me, it has either been the wrong compiler level or an actual code error however I have tried compiling on java 1.6, 1.7 and java 1.8 with the code as is and it refuses to compile.

The API compiles fully now and is in the libs folder under SpongeAPI with binaries, sources and Javadoc however in the root folder’s build there is no libs folder.

You need to initialize the SpongeAPI submodule properly. To do that, run git submodule update --init --recursive in your Git shell. Currently you’re trying to build Granite with a newer SpongeAPI version than it is built for.

2 Likes

Ok, it’s working,

just incase I, or anyone else needs, here’s the commands I ran on a fresh clone of the repository to get it working.

git submodule update --init --recursive
gradle setupdecompworkspace
gradle setupciworkspace
gradle build

There was an error at the end of the build however the jar was produced

2 Likes