-
Notifications
You must be signed in to change notification settings - Fork 8
Tutorial
Eclipse has some problems with crossencoding files between windows and linux. It is important that if you wish to contribute, you set your Text file encoding to UTF8. You can do this by going to Window -> Preferences -> General -> Workspace. In there you find the Text file encoding dropdown box in the bottom left.
Simple note, always use UTF8
To compile this project, it requires you to use Maven2. A short intro for installing Maven2 you find here
After importing the Maven project, you need to run OnlineGuru.java in order to generate any conf files which the bot needs. These conf files will contain the passwords, API keys and other stuff the plugins need. A list of required conf settings (rev 45) can be found here; Config files
- Please report any bugs you find, or create a patch and contact an administrator of the project to have it applied.*
In order to reflect updates into the prod environment, we have to clone/pull updates from git master branch, build the maven project and finally run the bot with log4j. An example update and startup can be found here: Update prod.
-
"Download IntelliJ IDEA":http://www.jetbrains.com/idea/download/index.html and install.
-
Close your current project if any (toolbar: File->Close Project)
-
You should see a Welcome page, in the Quick Start section click "Check out from Version Control" and choose Git (alternatively, toolbar: Version Control->Check out from Version Control->Git)
-
- Git Repository URL : '[email protected]:dotKom/onlineguru.git' (Note: you can test your access by clicking the 'Test'-button)
-
- Origin Name : Sets the repository's remote 'origin' name to this, you can just leave it empty
-
- Parent Directory : Choose the parent directory of where you want the project to live
-
- Directory Name : The target directory name you are checking out to
the above options should be equivalent to git clone / --origin e.g. git clone [email protected]:onlineguru.git /home/kalvatn/dev/workspaces/dotkom/onlineguru (in this case '/home/kalvatn/dev/workspaces/dotkom' is the and 'onlineguru' the
if 'Test' asks you for a password, it means that there is something wrong with your ssh-key setup see SSH_Keys
-
After cloning you will be asked how if you want to create a new project, click Yes
-
- Do NOT choose to 'create Java project from existing sources', choose to 'Import project from external model'
-
- Choose Maven
-
- You can safely skip through the options by pressing 'Next' all the way if you don't explicitly want to change anything, until you get to the last page, in which case you probably want to change the odd default project name where they choose to append 'System' at the end of the name, I just typed 'onlineguru'
if you haven't used IDEA before or haven't previously configured a JDK you will be asked for this as you step through the options
- Now IDEA and Maven will do some work to resolve and download any dependencies for the project, this could take some time
- After the initial indexing is complete, open onlineguru/pom.xml find and error if any and set your cursor there, then click the red lightbulb that pops up in the left margin (hotkey: alt+enter) and 'Update Maven indices'
- Maven will now work for a while again, after it is complete you should be able to right click on onlineguru/src/main/java/no.ntnu.online.onlineguru/OnlineGuru.java and run it (hotkeys: alt+shift+F10 to bring up run configurations menu)
- Onlineguru will fail as you haven't created and configured your Config files, but it will generate a settings skeleton at onlineguru/settings/settings.conf
- CONGRATULATIONS!