New development environment writeup?

  • Hey guys - I'd love to take a look at contributing a bit, but it looks like things have changed a lot.

    I was previously (2-3 years ago) able to get a dev environment up and running, local server, etc. but I'm having a hard time getting things going this time around.

    I've got the source pulled from bitbucket QA branch, TOC files extracted into the clientdata folder, submodules from git, Gradle installed..

    There doesn't seem to be any mention of a database anymore on any of the wiki pages I can find, but I did get the nge backup from the master branch and restore it into postgres - nge:nge, full privileges, etc.

    JDK 9

    Loading the project into Eclipse, it finds the holocore project and pswgcommon, but there are tons and tons of errors. Packages that look like they can't be imported, not able to find where they might be or how to get them installed into the project (mainly looks like maven packages? which I thought weren't used anymore because the project moved over to Gradle - me.joshlarson.jlcommon based packages mostly). I *do* have maven installed though. so even if they were maven packages, shouldn't they be able to be imported?

    Sorry for the long post, just finally getting some time from my normal projects and would love to help move this one along if possible.

    If anyone has any time to give me a quick rundown of what else might be needed when setting up the environment that's missing from the wiki, I'd really appreciate it.



  • Hello! So the database system used now is mongodb, so you'll have to set that up (instructions below). From there, I suggest using IntelliJ, and doing an "import project" from the build.gradle file in holocore. After extracting the clientdata into your holocore directory, it should boot right up.

    For setting up MongoDB: (installing MongoDB Compass helps a lot, but this is also achievable via the command line)

    • Create the database "nge"
    • Create the collection "users" within "nge"
    • Insert this document into the users collection: {username:"myusername", password:"mypassword", accessLevel:"dev", banned:false, characters: []}
    • Don't worry, passwords aren't stored in plaintext on the live server. Can check for how that works

    Also, since Oracle isn't allowing downloads of Java 9 anymore, we're using Java 10. To manage all the different Java versions, I just download JDKs into some directory and update my JAVA_HOME when I'm ready to switch to the next version.


  • It's getting closer - only 2 errors now on build:

    Error:(3, 41) java: package com.projectswg.utility.clientdata does not exist

    Error:(8, 27) java: package Converters does not exist

    Mongodb installed, document added, imported into IntelliJ with the build.gradle file

    I replaced my clientdata folder in /holocore with yours

    Looks like there's a jar that I'm missing maybe that needs to be added to the build path? I've gotta run right now, so I'll do some more digging later - Thanks for all the help Obique

  • I've tried just using the build menu to build the entire project, also tried building the holocore_utility module - they both come up with that same error. Also tried rebuilding the holocore module from the context menu right clicking on the project itself

  • Ah, yea it isn't being imported as a gradle project. Try following these steps: (assuming you are using this screenshot as a starting point)

    • Go to C:\dev\holocore via cmd prompt, and execute "gradle wrapper"
      • This should create the necessary gradle files for IntelliJ
    • Remaining steps are in IntelliJ
    • File -> Close Project
      • This will close the current window and probably bring up a list of projects
    • Import Project
      • If a smaller window pops up from the previous step, there should be a button for this
      • If not, click File -> Open... (does the same thing)
    • Navigate to C:\dev\holocore in the file selection window that pops up from the previous step
    • Double click on build.gradle file
    • Click Open as Project
    • In the gradle import window that pops up next:
      • Select "Use auto-import"
      • Select "Use default gradle wrapper (recommended)"
        • This was created in the first step: "gradle wrapper"
      • Click Ok
    • Click 'Yes' to overwrite the project file

    Then you should be up and ready to go. This process is often required when things break.


  • Same result unfortunately.

    Project imports just fine, no errors -> Build project, the errors show up.

    Root cause looks like

    1. import com.projectswg.utility.clientdata.Converters;

    can't find clientdata in that directory - looking in my /src/utility/java/com.projectswg.utility directory, I'm not seeing a clientdata folder or class.

    Attaching SS for reference.

    I don't want to waste a bunch of your time, so if you've got other things to worry about, feel free to give me the boot

    • Helpful

    For anyone coming across this - we did end up solving it. The gitignore file wasn't specific enough on which clientdata directory it was ignoring, so it was ignoring the one we needed as well as the one in the root of the project.

    Future commits should have this fixed