Add stub api class.

This commit is contained in:
md_5 2013-01-10 17:56:09 +11:00
parent 0354ce3588
commit 162f75423d
5 changed files with 101 additions and 64 deletions

26
.gitignore vendored
View File

@ -1,31 +1,31 @@
# Eclipse stuff
/.classpath
/.project
/.settings
.classpath/
.project/
.settings/
# netbeans
/nbproject
nbproject/
nbactions.xml
nb-configuration.xml
# we use maven!
/build.xml
build.xml
# maven
/target
/dependency-reduced-pom.xml
target/
dependency-reduced-pom.xml
# vim
.*.sw[a-p]
# various other potential build files
/build
/bin
/dist
/manifest.mf
build/
bin/
dist/
manifest.mf
# Mac filesystem dust
/.DS_Store
.DS_Store/
# intellij
*.iml
@ -34,5 +34,5 @@ nb-configuration.xml
.idea/
# other files
/*log*
*.log*
*.yml

28
api/pom.xml Normal file
View File

@ -0,0 +1,28 @@
<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>
<parent>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>BungeeCord-API</name>
<description>API implemented by the Elastic Portal Suite</description>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>13.0.1</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,16 @@
package net.md_5.bungee.api;
import com.google.common.base.Preconditions;
import lombok.Getter;
public abstract class ProxyServer {
@Getter
private static ProxyServer instance;
public static void setInstance(ProxyServer instance) {
Preconditions.checkNotNull(instance, "Instance null");
Preconditions.checkArgument(instance == null, "Instance already set");
ProxyServer.instance = instance;
}
}

43
pom.xml
View File

@ -1,6 +1,5 @@
<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">
<?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>
<parent>
@ -15,7 +14,7 @@
<packaging>pom</packaging>
<name>BungeeCord</name>
<description>Proxy component of the Elastic Portal Suite</description>
<description>Parent project for all BungeeCord modules.</description>
<url>https://github.com/ElasticPortalSuite/BungeeCord</url>
<inceptionYear>2012</inceptionYear>
<organization>
@ -38,6 +37,7 @@
<modules>
<module>proxy</module>
<module>api</module>
</modules>
<scm>
@ -57,7 +57,6 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<build.number>unknown</build.number>
<main.class>net.md_5.bungee.BungeeCord</main.class>
</properties>
<dependencies>
@ -70,7 +69,6 @@
</dependencies>
<build>
<finalName>${project.name}</finalName>
<plugins>
<plugin>
<groupId>com.lukegb.mojo</groupId>
@ -98,39 +96,6 @@
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<version>2.0.6</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>proguard</goal>
</goals>
</execution>
</executions>
<configuration>
<addMavenDescriptor>true</addMavenDescriptor>
<includeDependency>false</includeDependency>
<libs>
<lib>${java.home}/lib/rt.jar</lib>
<lib>${java.home}/lib/jce.jar</lib>
</libs>
<obfuscate>false</obfuscate>
<options>
<option>-dontoptimize</option>
<option>-keep class net.md_5.bungee.** { *; }</option>
</options>
</configuration>
<dependencies>
<dependency>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-base</artifactId>
<version>4.8</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>

View File

@ -15,7 +15,7 @@
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>BungeeCord</name>
<name>BungeeCord-Proxy</name>
<description>Proxy component of the Elastic Portal Suite</description>
<dependencies>
@ -24,16 +24,16 @@
<artifactId>jsr305</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>13.0.1</version>
</dependency>
<dependency>
<groupId>net.md-5</groupId>
<artifactId>mendax</artifactId>
<version>1.4.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-ext-jdk15on</artifactId>
@ -44,15 +44,10 @@
<artifactId>snakeyaml</artifactId>
<version>1.11</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>0.11.6</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>BungeeCord</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@ -93,6 +88,39 @@
</filters>
</configuration>
</plugin>
<plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<version>2.0.6</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>proguard</goal>
</goals>
</execution>
</executions>
<configuration>
<addMavenDescriptor>true</addMavenDescriptor>
<includeDependency>false</includeDependency>
<libs>
<lib>${java.home}/lib/rt.jar</lib>
<lib>${java.home}/lib/jce.jar</lib>
</libs>
<obfuscate>false</obfuscate>
<options>
<option>-dontoptimize</option>
<option>-keep class net.md_5.bungee.** { *; }</option>
</options>
</configuration>
<dependencies>
<dependency>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-base</artifactId>
<version>4.8</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>