Issue pulling source from git

Discussion in 'Plugin Development' started by Sir Savary, Mar 3, 2012.

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

    Sir Savary

    I wanted to update an old plugin recently so I decided to pull the source from github. Everything goes alright, I can clone the repo, but the problems started when I tried to import the project. There is no .project file in the repo, so I used the new project wizard. It makes a new project, but the src folder is blank with absolutely nothing in it. Any help here?
     
  2. Offline

    sorklin

    Eclipse, netbeans, notepad++?
     
  3. Offline

    Sir Savary

  4. Offline

    sorklin

    Ah, I use netbeans, so someone else will have to chime in. But for netbeans, i create a project with existing source, and manually pull in the source directories.
     
  5. Offline

    Sir Savary

    sorklin
    I just need to know how to manually pull in those directories for Eclipse, thanks for the help though.
     
  6. Offline

    Sir Savary

    Bump :/
     
  7. Offline

    Drumm_

    I have just been arguing with this myself, and finally figured it out.
    First I did
    File -> Import -> Git, set it all up, but imported as a general project.I then closed eclipse (Not sure if this is important, but could be)
    Next you go to the directory where you imported your code to. You need to modify the .project file.

    Below is the part of the .project file you need to modify, then, when you open eclipse, it has your full source (In proper packages) and is ready for compiling.
    Code:
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.eclipse.jdt.core.javanature</nature>
    </natures>
    
    Then after that right click your project in the project explorer -> Properties -> Java Build Path -> Libraries -> Add External JARs, and select your bukkit.jar (Not craftbukkit)

    At this point, I also like to change my compiler to 1.6 to add OpenJDK compatibility.
    When I did this it complained about the package line at the top of my opening code for some reason, not entirely sure why. But everything exports just fine.

    EDIT: The complaints stopped after a close + open of eclipse again.
     
Thread Status:
Not open for further replies.

Share This Page