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

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

Thread Status:
Not open for further replies.
  1. Offline

    bsymon

    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 (Text):
    1. [INFO] Scanning for projects...
    2. [INFO]                                                                  
    3. [INFO] ------------------------------------------------------------------------
    4. [INFO] Building CraftBukkit 0.0.1-SNAPSHOT
    5. [INFO] ------------------------------------------------------------------------
    6. [WARNING] The POM for org.bukkit:bukkit:jar:0.0.1-SNAPSHOT is missing, no dependency information available
    7. [WARNING] The POM for org.bukkit:minecraft-server:jar:1.6.6 is missing, no dependency information available
    8. [INFO] ------------------------------------------------------------------------
    9. [INFO] BUILD FAILURE
    10. [INFO] ------------------------------------------------------------------------
    11. [INFO] Total time: 0.469s
    12. [INFO] Finished at: Tue Dec 11 18:00:34 CET 2012
    13. [INFO] Final Memory: 5M/109M
    14. [INFO] ------------------------------------------------------------------------
    15. [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]
    16. [ERROR]
    17. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    18. [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    19. [ERROR]
    20. [ERROR] For more information about the errors and possible solutions, please read the following articles:
    21. [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 !
     
  2. Offline

    bsymon

    Ok, I progress a little bit :)

    I understood these two errors :

    Code (Text):
    1. [INFO] ------------------------------------------------------------------------
    2. [WARNING] The POM for org.bukkit:bukkit:jar:0.0.1-SNAPSHOT is missing, no dependency information available
    3. [WARNING] The POM for org.bukkit:minecraft-server:jar:1.6.6 is missing, no dependency information available
    4. [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 (Text):
    1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    2.   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    3.   <modelVersion>4.0.0</modelVersion>
    4.   <groupId>org.bukkit</groupId>
    5.   <artifactId>craftbukkit</artifactId>
    6.   <packaging>jar</packaging>
    7.   <version>0.0.1-SNAPSHOT</version>
    8.   <name>CraftBukkit</name>
    9.   <url>http://www.bukkit.org</url>
    10.   <properties>
    11.     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    12.     <api.version>unknown</api.version>
    13.   </properties>
    14.   <scm>
    15.     <connection>scm:git:git://github.com/Bukkit/CraftBukkit.git</connection>
    16.     <developerConnection>scm:git:ssh://[email protected]/Bukkit/CraftBukkit.git</developerConnection>
    17.     <url>https://github.com/Bukkit/CraftBukkit</url>
    18.   </scm>
    19.   <repositories>
    20.     <repository>
    21.       <id>bukkit-repo</id>
    22.       <url>http://repo.bukkit.org/content/groups/public/</url>
    23.     </repository>
    24.     <repository>
    25.       <id>home-repo</id>
    26.       <url>http://thedudescraft.fr/repo/</url>
    27.     </repository>
    28.   </repositories>
    29.   <pluginRepositories>
    30.     <pluginRepository>
    31.       <id>bukkit-plugins</id>
    32.       <url>http://repo.bukkit.org/content/groups/public/</url>
    33.     </pluginRepository>
    34.   </pluginRepositories>
    35.   <dependencies>
    36.     <dependency>
    37.       <groupId>org.bukkit</groupId>
    38.       <artifactId>bukkit</artifactId>
    39.       <version>0.0.1-SNAPSHOT</version>
    40.       <type>jar</type>
    41.       <scope>compile</scope>
    42.     </dependency>
    43.     <dependency>
    44.       <groupId>org.bukkit</groupId>
    45.       <artifactId>minecraft-server</artifactId>
    46.       <version>1.6.6</version>
    47.       <type>jar</type>
    48.       <scope>compile</scope>
    49.     </dependency>
    50.     <dependency>
    51.       <groupId>net.sf.jopt-simple</groupId>
    52.       <artifactId>jopt-simple</artifactId>
    53.       <version>3.2</version>
    54.       <type>jar</type>
    55.       <scope>compile</scope>
    56.     </dependency>
    57.     <dependency>
    58.       <groupId>jline</groupId>
    59.       <artifactId>jline</artifactId>
    60.       <version>0.9.94</version>
    61.       <type>jar</type>
    62.       <scope>compile</scope>
    63.     </dependency>
    64.     <dependency>
    65.       <groupId>org.xerial</groupId>
    66.       <artifactId>sqlite-jdbc</artifactId>
    67.       <version>3.7.2</version>
    68.       <type>jar</type>
    69.       <scope>compile</scope>
    70.     </dependency>
    71.     <dependency>
    72.       <groupId>mysql</groupId>
    73.       <artifactId>mysql-connector-java</artifactId>
    74.       <version>5.1.14</version>
    75.       <type>jar</type>
    76.       <scope>compile</scope>
    77.     </dependency>
    78.     <dependency>
    79.       <groupId>org.avaje</groupId>
    80.       <artifactId>ebean</artifactId>
    81.       <version>2.7.3</version>
    82.       <type>jar</type>
    83.       <scope>provided</scope>
    84.     </dependency>
    85.   </dependencies>
    86.   <!-- This builds a completely 'ready to start' jar with all dependencies inside -->
    87.   <build>
    88.     <defaultGoal>clean install</defaultGoal>
    89.     <plugins>
    90.       <plugin>
    91.         <groupId>com.lukegb.mojo</groupId>
    92.         <artifactId>gitdescribe-maven-plugin</artifactId>
    93.         <version>1.3</version>
    94.         <configuration>
    95.           <outputPrefix>git-Bukkit-</outputPrefix>
    96.           <outputPostfix></outputPostfix>
    97.         </configuration>
    98.         <executions>
    99.           <execution>
    100.             <phase>compile</phase>
    101.             <goals>
    102.               <goal>gitdescribe</goal>
    103.             </goals>
    104.           </execution>
    105.         </executions>
    106.       </plugin>
    107.       <plugin>
    108.         <groupId>org.apache.maven.plugins</groupId>
    109.         <artifactId>maven-jar-plugin</artifactId>
    110.         <version>2.1</version>
    111.         <configuration>
    112.           <archive>
    113.             <manifestEntries>
    114.               <Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
    115.               <Implementation-Title>CraftBukkit</Implementation-Title>
    116.               <Implementation-Version>${describe}</Implementation-Version>
    117.               <Implementation-Vendor>Bukkit Team</Implementation-Vendor>
    118.               <Specification-Title>Bukkit</Specification-Title>
    119.               <Specification-Version>${api.version}</Specification-Version>
    120.               <Specification-Vendor>Bukkit Team</Specification-Vendor>
    121.               <Sealed>true</Sealed>
    122.             </manifestEntries>
    123.             <manifestSections>
    124.               <manifestSection>
    125.                 <name>net/bukkit/</name>
    126.                 <manifestEntries>
    127.                   <Sealed>true</Sealed>
    128.                 </manifestEntries>
    129.               </manifestSection>
    130.               <manifestSection>
    131.                 <name>com/bukkit/</name>
    132.                 <manifestEntries>
    133.                   <Sealed>true</Sealed>
    134.                 </manifestEntries>
    135.               </manifestSection>
    136.               <manifestSection>
    137.                 <name>org/bukkit/</name>
    138.                 <manifestEntries>
    139.                   <Sealed>true</Sealed>
    140.                 </manifestEntries>
    141.               </manifestSection>
    142.             </manifestSections>
    143.           </archive>
    144.         </configuration>
    145.       </plugin>
    146.       <plugin>
    147.         <groupId>org.apache.maven.plugins</groupId>
    148.         <artifactId>maven-shade-plugin</artifactId>
    149.         <version>1.4</version>
    150.         <executions>
    151.           <execution>
    152.             <phase>package</phase>
    153.             <goals>
    154.               <goal>shade</goal>
    155.             </goals>
    156.             <configuration>
    157.               <artifactSet>
    158.                 <excludes>
    159.                   <exclude>junit:junit</exclude>
    160.                 </excludes>
    161.               </artifactSet>
    162.             </configuration>
    163.           </execution>
    164.         </executions>
    165.       </plugin>
    166.       <plugin>
    167.         <groupId>org.apache.maven.plugins</groupId>
    168.         <artifactId>maven-compiler-plugin</artifactId>
    169.         <version>2.0.2</version>
    170.         <configuration>
    171.           <source>1.5</source>
    172.           <target>1.5</target>
    173.         </configuration>
    174.       </plugin>
    175.     </plugins>
    176.   </build>
    177. </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

    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

Thread Status:
Not open for further replies.

Share This Page