Skip to content

Commit

Permalink
Add stub api class.
Browse files Browse the repository at this point in the history
  • Loading branch information
md-5 committed Jan 10, 2013
1 parent 0354ce3 commit 162f754
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 64 deletions.
26 changes: 13 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -34,5 +34,5 @@ nb-configuration.xml
.idea/

# other files
/*log*
*.log*
*.yml
28 changes: 28 additions & 0 deletions api/pom.xml
Original file line number Diff line number Diff line change
@@ -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>
16 changes: 16 additions & 0 deletions api/src/main/java/net/md_5/bungee/api/ProxyServer.java
Original file line number Diff line number Diff line change
@@ -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 changes: 4 additions & 39 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -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>
Expand All @@ -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>
Expand All @@ -38,6 +37,7 @@

<modules>
<module>proxy</module>
<module>api</module>
</modules>

<scm>
Expand All @@ -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>
Expand All @@ -70,7 +69,6 @@
</dependencies>

<build>
<finalName>${project.name}</finalName>
<plugins>
<plugin>
<groupId>com.lukegb.mojo</groupId>
Expand Down Expand Up @@ -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>
52 changes: 40 additions & 12 deletions proxy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand Down Expand Up @@ -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>

0 comments on commit 162f754

Please sign in to comment.