[Github] Want to mod an old release of Craftbukkit (1.6.6)

Discussion in 'Bukkit Discussion' started by bsymon, Dec 11, 2012.

  1. Offline

    bsymon

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Hi ! I will try to be the most accurate possible ... And sorry for the misspellings, I'm french.

    For a project, I need to have a server under Craftbukkit 1.6.6 (build #935), to use an old mod. And to improve the server, I want to add some blocks.

    So I decide to mod Craftbukkit 1.6.6. I have some knowledge of Java ...

    An my Eclipse project, I clone this Git repository : https://github.com/Bukkit/CraftBukkit.git . Then I choose the 1.6.6-R3 tags. I saw on Internet this repo isn't available anymore (http://repo.bukkit.org/artifactory/repo) and we need to change by this one : http://repo.bukkit.org/content/groups/public/ (in pom.xml). I do this also for the plugins repository (http://repo.bukkit.org/artifactory/plugins-release).

    When I try, whith Maven, to "clean install" the project, I get this error :

    Code:
    [INFO] Scanning for projects...
    [INFO]                                                                   
    [INFO] ------------------------------------------------------------------------
    [INFO] Building CraftBukkit 0.0.1-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [WARNING] The POM for org.bukkit:bukkit:jar:0.0.1-SNAPSHOT is missing, no dependency information available
    [WARNING] The POM for org.bukkit:minecraft-server:jar:1.6.6 is missing, no dependency information available
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 0.469s
    [INFO] Finished at: Tue Dec 11 18:00:34 CET 2012
    [INFO] Final Memory: 5M/109M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal on project craftbukkit: Could not resolve dependencies for project org.bukkit:craftbukkit:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: org.bukkit:bukkit:jar:0.0.1-SNAPSHOT, org.bukkit:minecraft-server:jar:1.6.6: Failure to find org.bukkit:bukkit:jar:0.0.1-SNAPSHOT in http://repo.bukkit.org/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of bukkit-repo has elapsed or updates are forced -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

    I don't know why ... I realy need to mod this version of Craftbukkit, else I have to abandon my project :'(

    It's could be great if someone can help me :D Thank a lot !

    This post has been edited 2 times. It was last edited by bsymon Dec 11, 2012.
  2. Offline

    bsymon

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Ok, I progress a little bit :)

    I understood these two errors :

    Code:
    [INFO] ------------------------------------------------------------------------
    [WARNING] The POM for org.bukkit:bukkit:jar:0.0.1-SNAPSHOT is missing, no dependency information available
    [WARNING] The POM for org.bukkit:minecraft-server:jar:1.6.6 is missing, no dependency information available
    [INFO] ------------------------------------------------------------------------
    To resolve them, I set up a repository whith the same architecture than this one : http://repo.bukkit.org/content/groups/public/

    I just replace the file in org/bukkit/bukkit and org/bukkit/minecraft-server, with bukkit-0.0.1-SNAPSHOT.jar for bukkit, and minecraft-server-1.6.6.jar for minecraft-server. I found these files on Internet. For minecraft-server-1.6.6.jar, I use the original minecraft_server.jar by Mojang, of 1.6.6 version. With Minecraft Coder Pack, I "deobfuscated" the class files.

    Then, in pom.xml of the eclipse project, I added the repository I made (http://thedudescraft.fr/repo/) :

    Code:
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>org.bukkit</groupId>
      <artifactId>craftbukkit</artifactId>
      <packaging>jar</packaging>
      <version>0.0.1-SNAPSHOT</version>
      <name>CraftBukkit</name>
      <url>http://www.bukkit.org</url>
      <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <api.version>unknown</api.version>
      </properties>
      <scm>
        <connection>scm:git:git://github.com/Bukkit/CraftBukkit.git</connection>
        <developerConnection>scm:git:ssh://[email protected]/Bukkit/CraftBukkit.git</developerConnection>
        <url>https://github.com/Bukkit/CraftBukkit</url>
      </scm>
      <repositories>
        <repository>
          <id>bukkit-repo</id>
          <url>http://repo.bukkit.org/content/groups/public/</url>
        </repository>
        <repository>
          <id>home-repo</id>
          <url>http://thedudescraft.fr/repo/</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>bukkit-plugins</id>
          <url>http://repo.bukkit.org/content/groups/public/</url>
        </pluginRepository>
      </pluginRepositories>
      <dependencies>
        <dependency>
          <groupId>org.bukkit</groupId>
          <artifactId>bukkit</artifactId>
          <version>0.0.1-SNAPSHOT</version>
          <type>jar</type>
          <scope>compile</scope>
        </dependency>
        <dependency>
          <groupId>org.bukkit</groupId>
          <artifactId>minecraft-server</artifactId>
          <version>1.6.6</version>
          <type>jar</type>
          <scope>compile</scope>
        </dependency>
        <dependency>
          <groupId>net.sf.jopt-simple</groupId>
          <artifactId>jopt-simple</artifactId>
          <version>3.2</version>
          <type>jar</type>
          <scope>compile</scope>
        </dependency>
        <dependency>
          <groupId>jline</groupId>
          <artifactId>jline</artifactId>
          <version>0.9.94</version>
          <type>jar</type>
          <scope>compile</scope>
        </dependency>
        <dependency>
          <groupId>org.xerial</groupId>
          <artifactId>sqlite-jdbc</artifactId>
          <version>3.7.2</version>
          <type>jar</type>
          <scope>compile</scope>
        </dependency>
        <dependency>
          <groupId>mysql</groupId>
          <artifactId>mysql-connector-java</artifactId>
          <version>5.1.14</version>
          <type>jar</type>
          <scope>compile</scope>
        </dependency>
        <dependency>
          <groupId>org.avaje</groupId>
          <artifactId>ebean</artifactId>
          <version>2.7.3</version>
          <type>jar</type>
          <scope>provided</scope>
        </dependency>
      </dependencies>
      <!-- This builds a completely 'ready to start' jar with all dependencies inside -->
      <build>
        <defaultGoal>clean install</defaultGoal>
        <plugins>
          <plugin>
            <groupId>com.lukegb.mojo</groupId>
            <artifactId>gitdescribe-maven-plugin</artifactId>
            <version>1.3</version>
            <configuration>
              <outputPrefix>git-Bukkit-</outputPrefix>
              <outputPostfix></outputPostfix>
            </configuration>
            <executions>
              <execution>
                <phase>compile</phase>
                <goals>
                  <goal>gitdescribe</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>2.1</version>
            <configuration>
              <archive>
                <manifestEntries>
                  <Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
                  <Implementation-Title>CraftBukkit</Implementation-Title>
                  <Implementation-Version>${describe}</Implementation-Version>
                  <Implementation-Vendor>Bukkit Team</Implementation-Vendor>
                  <Specification-Title>Bukkit</Specification-Title>
                  <Specification-Version>${api.version}</Specification-Version>
                  <Specification-Vendor>Bukkit Team</Specification-Vendor>
                  <Sealed>true</Sealed>
                </manifestEntries>
                <manifestSections>
                  <manifestSection>
                    <name>net/bukkit/</name>
                    <manifestEntries>
                      <Sealed>true</Sealed>
                    </manifestEntries>
                  </manifestSection>
                  <manifestSection>
                    <name>com/bukkit/</name>
                    <manifestEntries>
                      <Sealed>true</Sealed>
                    </manifestEntries>
                  </manifestSection>
                  <manifestSection>
                    <name>org/bukkit/</name>
                    <manifestEntries>
                      <Sealed>true</Sealed>
                    </manifestEntries>
                  </manifestSection>
                </manifestSections>
              </archive>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>1.4</version>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>shade</goal>
                </goals>
                <configuration>
                  <artifactSet>
                    <excludes>
                      <exclude>junit:junit</exclude>
                    </excludes>
                  </artifactSet>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.0.2</version>
            <configuration>
              <source>1.5</source>
              <target>1.5</target>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </project>

    Here, everything work well ! Maven retrieve all the dependencies, including, bukkit-0.0.1-SNAPSHOT.jar and minecraft-server-1.6.6.jar.

    But, because isn't finish ... When I "clean install", I have so many errors ! I take a look in the source code off some files, and eclipse can't import certains class. Like in org.bukkit.craftbukkit.CraftServer.java, eclipse try to import org.bukkit.plugin.PluginLoadOrder.

    In Maven Dependencies/bukkit-0.0.1-SNAPSHOT.jar there is no PluginLoadOrder.class. And it's like this for a lot of import ...

    I think I don't have the right files (bukkit-0.0.1-SNAPSHOT.jar and minecraft-server-1.6.6.jar) ...

    I need your help ! :D
  3. Offline

    bsymon

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    So, I progress a little bit again ! :D

    I found this Github : https://github.com/Bukkit/Bukkit

    This allow me to have the right bukkit-0.0.1-SNAPSHOT.jar ! I up to date my "repo" with this file, if you want to try. :) There still missing the right minecraft-server-1.6.6.jar
  4. Offline

    bsymon

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME

Share This Page