mirror of
https://github.com/2006-Scape/Maven.git
synced 2026-07-02 16:49:08 +00:00
Parabot > 2006Scape
This commit is contained in:
@@ -1,6 +1,2 @@
|
||||
# Maven-Repository
|
||||
The Maven repository for Parabot
|
||||
|
||||
### Examples
|
||||
The examples directory contains the examples for scripts and server providers.
|
||||
Both of these examples will be updated once we release a new version of our API/Client
|
||||
# Maven Repository
|
||||
Maven repository for 2006Scape
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
Explanation
|
||||
===================
|
||||
This tutorial explains on how to deploy new updates to the version control of Parabot.
|
||||
|
||||
VC
|
||||
------------
|
||||
The Version Control of Parabot is based on a webhook within this repository.
|
||||
|
||||
When this repository gets updated, it calls the updater on the web API.
|
||||
The web API will then receive all updates and see if there's a new jar update.
|
||||
Once there is a new jar update, the API will than gather all information and download it to its own server.
|
||||
|
||||
When the download is finished, the database will be updated with a hash and update time.
|
||||
This can be used to check hashes and the cache directory.
|
||||
> **Note:**
|
||||
> When Github caches the latest.json, the API can't gather the latest version.
|
||||
> For this reason we build a cron job that checks for new versions every 30 minutes.
|
||||
> In this way we are sure something like no-update never happens.
|
||||
|
||||
The process
|
||||
------------
|
||||
For the updating process, we have a different way of working. If you follow this tutorial you'll be ensured that your changes gets pushed.
|
||||
|
||||
> **There are basically three files that you need to edit:**
|
||||
|
||||
> - ```latest.json``` - This file is being used by the API to see if there's a new version to publish
|
||||
> - ```pom.xml``` - This file is located in the project itself (client/provider) and contains the version that will be published
|
||||
> - ```Configuration.java``` - This file is located in the client and contains a string that should match the current version.
|
||||
|
||||
If any of these do not match each other, ie the version in latest.json does not match the version in Configuration.java, then the client will detect a different version and asks the user to download the latest version. But because there the Configuration.java does not match the latest.json, it will keep repeating this process.
|
||||
|
||||
#### Update the client
|
||||
Updating the client is the most complicated, but also the most important one.
|
||||
|
||||
**When updating the client, make sure the version in either ```latest.json```, ```pom.xml``` and ```Configuration.java``` match each other.**
|
||||
|
||||
To update the version do the following:
|
||||
|
||||
0. Clone the Maven-Repository into the same parent directory as the client/provider directory.
|
||||
1. Take a quick look at the versioning, make sure each version in all files of above match each other
|
||||
2. Start cleaning your Maven directories with ```mvn clean```
|
||||
3. Now go into the pom.xml and make sure the excludes are commented out and the includes are not commented out
|
||||
4. Build the project using ```mvn package```
|
||||
5. Now go into target/classes, in here you'll find the .bat files. Copy **the first line** of **at least** deploy.bat into another file.
|
||||
6. Now go back into the pom.xml and comment out the includes and include the excludes
|
||||
7. You are now allowed to package the project again, you can do this with ```mvn package```
|
||||
8. Once this process is done, you should open your console
|
||||
9. Now ```cd``` into the deploy directory of the project.
|
||||
10. When you are in the deploy directory, you can perform the command copied from step #5 - *(deploy.bat)* - *You are allowed to perform the other commands, but then you should be in the parent directory of deploy.*
|
||||
11. Once this is done, you can push the files from the Maven-Repository to the Git repository.
|
||||
|
||||
#### Update a/the provider
|
||||
Updating a/the provider has almost the same process as updating the client, the only difference is that the versioning doesn't really matter. This is because the provider doesn't contain a check for the actual version, instead it simply cleans the cache when a new update came out.
|
||||
|
||||
**When updating the client, make sure the version in either ```latest.json``` and ```pom.xml``` match each other.**
|
||||
|
||||
0. Clone the Maven-Repository into the same parent directory as the client/provider directory.
|
||||
1. Take a quick look at the versioning, make sure each version in all files (except for ```Configuration.java```) of above match each other
|
||||
2. Start cleaning your Maven directories with ```mvn clean```
|
||||
3. Now go into the pom.xml and make sure the excludes are commented out and the includes are not commented out
|
||||
4. Build the project using ```mvn package```
|
||||
5. Now go into target/classes, in here you'll find the .bat files. Copy **the first line** of **at least** deploy.bat into another file.
|
||||
6. Now go back into the pom.xml and comment out the includes and include the excludes
|
||||
7. You are now allowed to package the project again, you can do this with ```mvn package```
|
||||
8. Once this process is done, you should open your console
|
||||
9. Now ```cd``` into the deploy directory of the project.
|
||||
10. When you are in the deploy directory, you can perform the command copied from step #5 - *(deploy.bat)* - *You are allowed to perform the other commands, but then you should be in the parent directory of deploy.*
|
||||
11. Once this is done, you can push the files from the Maven-Repository to the Git repository.
|
||||
|
||||
You can check the latest update for the client [here](http://bdn.parabot.org/api/v2/bot/information/client) and for the provider [here](http://bdn.parabot.org/api/v2/bot/information/317-api-minified), if this matches a timestamp within the last 30 minutes of your push then you're fine.
|
||||
|
||||
Questions
|
||||
------------
|
||||
If you have any questions regarding this process. Please contact an administrator, whereas preferably this would be [JKetelaar](https://www.parabot.org/community/profile/1-jketelaar/).
|
||||
@@ -1,53 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.parabot</groupId>
|
||||
<artifactId>provider-name</artifactId>
|
||||
<version>2.5</version>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Apache License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<properties>
|
||||
<jdk.version>1.7</jdk.version>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>git-parabot</id>
|
||||
<name>Parabot's Git based repo</name>
|
||||
<url>https://github.com/parabot/Maven-Repository/raw/master/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.parabot</groupId>
|
||||
<artifactId>client</artifactId>
|
||||
<version>2.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${artifactId}-V${version}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>${jdk.version}</source>
|
||||
<target>${jdk.version}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -12,9 +12,9 @@
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>git-parabot</id>
|
||||
<name>Parabot's Git based repo</name>
|
||||
<url>https://github.com/parabot/Maven-Repository/raw/master/</url>
|
||||
<id>2006scape-maven</id>
|
||||
<name>2006Scape's Git based repo</name>
|
||||
<url>https://raw.github.com/2006-Scape/Maven/master</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"explanation":"This JSON file is used for version management, so that we can simply download the latest version. \nThis should be kept up to date too.",
|
||||
"dependencies":{
|
||||
"317-api-minified":{
|
||||
"groupId":"org.parabot",
|
||||
"artifactId":"317-api-minified",
|
||||
"version":"1.14"
|
||||
},
|
||||
"client":{
|
||||
"groupId":"org.parabot",
|
||||
"artifactId":"client",
|
||||
"version":"2.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user