-
Notifications
You must be signed in to change notification settings - Fork 90
Compiling AreaShop
Thijs Wiefferink edited this page Feb 21, 2017
·
7 revisions
AreaShop is a Maven project with a couple of modules (these modules are to support multiple versions of the dependencies).
- Startup Intellij IDEA
- Go to
File > New > Project from Version Control > Git
. - Enter
https://github.com/NLthijs48/AreaShop.git
into theGit Repository URL
field. - Select the directory you want to put the project in.
- Click the
Clone
button - Click the
Add as Maven Project
link in the notification you get in the bottom right corner (if you missed it:View > Tool Windows > Event Log
) - Create a build configuration to build the jar file:
- Click the downwards arrow in the top right corner next to the grayed out play icon, then click
Edit Configurations
- Click the green plus button and select the
Maven
entry. - Enter a name, something like
Build jar
. - Change the work directory to the directory of the project itself.
- In the
Command line
field enterinstall
. -
Optional: in the general tab deselect the
Use project settings
checkbox and enter1C
into theThreads
field. This will make the build use as much threads as cpu cores your machine has and speeds up the compilation. - Click the
OK
button. - Now click the green play button in the top right corner.
- If you get an error like
Project SDK is not specified
fix this by clicking theConfigure
link it shows and select your Java SDK (you might need to click thenew
button and select the JDK you have installed, on Windows this would be located atC:/Program Files/Java/jdk<version>
orC:/Program Files (x86)/Java/jdk<version>
)
- It is now building AreaShop, which will (especially the first time) take a while.
- If it shows a
BUILD SUCCESS
in the end it has worked, and the jar of AreaShop can be found in theAreaShop/target/
folder of your project. If you encounter problems, try googling them first and if that does not work create an issue.
- Navigate to the directory you want the project in:
cd path/to/directory
. - Clone the repository:
git clone https://github.com/NLthijs48/AreaShop.git
. - Go to the cloned repository:
cd AreaShop
. - Make sure maven is installed (the
mvn
command is required), see this guide. - Run a Maven build:
mvn install
(ormvn package
if you don't want it in your local repository). - The result can be found in
AreaShop/target/
.
There are a couple extra options you can use with the Maven build (add these options after the install
command):
-
Source: generate a jar file that has the sources of the project, add
-Dsources
-
Javadoc: generate javadocs to the given directory, add
-Djavadocs=path/to/target/folder
-
Build number: add a suffix to the build number (used by the Jenkins build server), add
-Dbuild.number=abc
-
Copy jar file: copy the resulting jar file to the given location (automatic installation on your test server), add
-DcopyResult=path/to/plugins/folder
If you have any questions about how to use or modify AreaShop then feel free to message me. You can create a ticket or message me through Spigot or BukkitDev.