Split up source files into several source directories.

This commit is contained in:
sk89q 2014-04-02 20:03:52 -07:00
parent 469cb8c8b3
commit 6c460f02c5
85 changed files with 5577 additions and 5437 deletions

319
pom.xml
View File

@ -1,16 +1,26 @@
<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"> <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> <modelVersion>4.0.0</modelVersion>
<groupId>com.sk89q</groupId> <groupId>com.sk89q</groupId>
<artifactId>worldedit</artifactId> <artifactId>worldedit</artifactId>
<version>5.7-SNAPSHOT</version> <version>6.0.0-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<!-- Project information --> <!-- Fix encoding warnings -->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<!--
=====================================
Project Information
=====================================
-->
<name>WorldEdit</name> <name>WorldEdit</name>
<inceptionYear>2010</inceptionYear> <inceptionYear>2010</inceptionYear>
<url>http://wiki.sk89q.com/wiki/WorldEdit</url> <url>http://wiki.sk89q.com/wiki/WorldEdit</url>
<description>A voxel map editor for Minecraft with tools for adventure map designers, <description>An in-game voxel map editor for Minecraft.</description>
server administrators, and anyone who enjoys building massive structures.</description>
<licenses> <licenses>
<license> <license>
@ -33,8 +43,8 @@
</issueManagement> </issueManagement>
<ciManagement> <ciManagement>
<system>Jenkins</system> <system>TeamCity</system>
<url>http://build.sk89q.com</url> <url>http://builds.enginehub.org</url>
</ciManagement> </ciManagement>
<scm> <scm>
@ -51,11 +61,19 @@
</mailingList> </mailingList>
</mailingLists> </mailingLists>
<!--
=====================================
Distribution Management
=====================================
-->
<distributionManagement> <distributionManagement>
<site> <site>
<id>sk89q-docs-upload</id> <id>sk89q-docs-upload</id>
<url>ftp://sk89q-maven-deploy/worldedit/</url> <url>ftp://sk89q-maven-deploy/worldedit/</url>
</site> </site>
<!-- The CI server uses these -->
<repository> <repository>
<id>maven.sk89q.com</id> <id>maven.sk89q.com</id>
<url>http://maven.sk89q.com/artifactory/libs-release-local</url> <url>http://maven.sk89q.com/artifactory/libs-release-local</url>
@ -66,98 +84,88 @@
</snapshotRepository> </snapshotRepository>
</distributionManagement> </distributionManagement>
<properties> <!-- Fix encoding warnings --> <!--
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> =====================================
</properties> Dependencies
=====================================
-->
<repositories> <repositories>
<repository> <repository>
<id>sk89q-repo</id> <id>maven.sk89q.com</id>
<url>http://maven.sk89q.com/repo/</url> <url>http://maven.sk89q.com/repo/</url>
</repository> </repository>
<repository>
<id>bukkit-repo</id>
<url>http://repo.bukkit.org/content/groups/public</url>
</repository>
</repositories> </repositories>
<dependencies> <dependencies>
<dependency> <!-- Used for snapshots --> <!-- Used for snapshots -->
<dependency>
<groupId>de.schlichtherle</groupId> <groupId>de.schlichtherle</groupId>
<artifactId>truezip</artifactId> <artifactId>truezip</artifactId>
<version>6.8.3</version> <version>6.8.3</version>
<scope>compile</scope> <scope>compile</scope> <!-- optional runtime dependency -->
<type>jar</type> <type>jar</type>
</dependency> </dependency>
<dependency> <!-- Used for CraftScripts --> <!-- Used for scripting -->
<dependency>
<groupId>rhino</groupId> <groupId>rhino</groupId>
<artifactId>js</artifactId> <artifactId>js</artifactId>
<version>1.7R2</version> <version>1.7R2</version>
<scope>compile</scope> <scope>compile</scope> <!-- optional runtime dependency -->
<type>jar</type> <type>jar</type>
</dependency> </dependency>
<dependency> <!-- Time format detection --> <!-- YAML processing -->
<groupId>com.sk89q</groupId>
<artifactId>jchronic</artifactId> <!-- not original library -->
<version>0.2.4a</version>
<scope>compile</scope>
<type>jar</type>
</dependency>
<!-- Used for Permissions support (this version has both the legacy API
and the new Permissions API to compile against -->
<dependency> <dependency>
<groupId>com.sk89q</groupId> <groupId>org.yaml</groupId>
<artifactId>dummypermscompat</artifactId> <artifactId>snakeyaml</artifactId>
<version>1.7</version> <version>1.9</version>
<scope>compile</scope>
<type>jar</type>
<optional>true</optional> <!-- Don't export -->
</dependency>
<dependency> <!-- Bukkit implementation -->
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.7.2-R0.2</version>
<scope>compile</scope>
<type>jar</type> <type>jar</type>
<scope>compile</scope> <!-- optional runtime dependency -->
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<!-- It's Guava -->
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
<artifactId>guava</artifactId> <artifactId>guava</artifactId>
<version>10.0.1</version> <version>10.0.1</version> <!-- Bukkit only bundles 10.0.1 -->
<scope>compile</scope> <scope>compile</scope> <!-- required runtime dependency -->
<type>jar</type> <type>jar</type>
</dependency> </dependency>
<dependency> <!-- NMS blocks --> <!-- Used for time operations -->
<groupId>org.bukkit</groupId> <dependency>
<artifactId>craftbukkit</artifactId> <groupId>com.sk89q</groupId>
<version>1.7.5-R0.1-SNAPSHOT</version> <artifactId>jchronic</artifactId> <!-- not the original library -->
<scope>compile</scope> <version>0.2.4a</version>
<scope>compile</scope> <!-- shaded -->
<type>jar</type> <type>jar</type>
<optional>true</optional>
</dependency> </dependency>
<dependency> <!-- Unit tests --> <!-- Unit tests -->
<dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId> <artifactId>mockito-core</artifactId>
<version>1.9.0-rc1</version> <version>1.9.0-rc1</version>
<scope>test</scope> <scope>test</scope>
<type>jar</type> <type>jar</type>
</dependency> </dependency>
</dependencies> </dependencies>
<!--
=====================================
Build
=====================================
-->
<build> <build>
<defaultGoal>install</defaultGoal> <defaultGoal>install</defaultGoal>
<sourceDirectory>${basedir}/src/main/java/</sourceDirectory> <sourceDirectory>${basedir}/src/main/java/</sourceDirectory>
<extensions> <!-- Used for uploading the docs --> <!-- Used for uploading the docs -->
<extensions>
<extension> <extension>
<groupId>org.apache.maven.wagon</groupId> <groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId> <artifactId>wagon-ftp</artifactId>
@ -165,34 +173,29 @@
</extension> </extension>
</extensions> </extensions>
<resources>
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>${basedir}/src/main/resources/</directory>
<includes>
<include>plugin.yml</include>
</includes>
</resource>
<resource>
<targetPath>defaults/</targetPath>
<filtering>true</filtering>
<directory>${basedir}/src/main/resources/</directory>
<includes>
<include>config.yml</include>
</includes>
</resource>
<resource> <!-- NMS support in Bukkit -->
<targetPath>nmsblocks/</targetPath>
<filtering>false</filtering>
<directory>${basedir}/src/main/resources/nmsblocks/</directory>
<includes>
<include>*.class</include>
</includes>
</resource>
</resources>
<plugins> <plugins>
<!-- Add source folder -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/src/legacy/java/</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Compiler -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
@ -203,6 +206,7 @@
</configuration> </configuration>
</plugin> </plugin>
<!-- JAR plugin -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
@ -224,6 +228,7 @@
</configuration> </configuration>
</plugin> </plugin>
<!-- Assembly builds .zip, etc. -->
<plugin> <plugin>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-2</version> <version>2.2-beta-2</version>
@ -241,6 +246,7 @@
</executions> </executions>
</plugin> </plugin>
<!-- Shades -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
@ -262,6 +268,7 @@
</executions> </executions>
</plugin> </plugin>
<!-- Release plugin -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId> <artifactId>maven-release-plugin</artifactId>
@ -273,6 +280,7 @@
</configuration> </configuration>
</plugin> </plugin>
<!-- Test runner -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
@ -284,12 +292,14 @@
</configuration> </configuration>
</plugin> </plugin>
<!-- Site builder -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId> <artifactId>maven-site-plugin</artifactId>
<version>3.1</version> <version>3.1</version>
<configuration> <configuration>
<reportPlugins> <reportPlugins>
<!-- Project information -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId> <artifactId>maven-project-info-reports-plugin</artifactId>
@ -304,6 +314,7 @@
</reportSets> </reportSets>
</plugin> </plugin>
<!-- Javadocs -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
@ -315,8 +326,140 @@
</plugins> </plugins>
</build> </build>
<!--
=====================================
Profiles
=====================================
-->
<profiles> <profiles>
<!-- Build WorldEdit for MC-Forge --> <!--
=====================================
Bukkit
=====================================
-->
<profile>
<id>bukkit</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>bukkit-repo</id>
<url>http://repo.bukkit.org/content/groups/public</url>
</repository>
</repositories>
<dependencies>
<!-- Used for Permissions support (this version has both the legacy API
and the new Permissions API to compile against -->
<dependency>
<groupId>com.sk89q</groupId>
<artifactId>dummypermscompat</artifactId>
<version>1.7</version>
<scope>compile</scope>
<type>jar</type>
<optional>true</optional>
</dependency>
<!-- Bukkit implementation -->
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.7.2-R0.2</version>
<scope>compile</scope>
<type>jar</type>
<optional>true</optional>
</dependency>
<!-- NMS blocks -->
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.7.5-R0.1-SNAPSHOT</version>
<scope>compile</scope>
<type>jar</type>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<resources>
<!-- Bukkit plugin.yml -->
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>${basedir}/src/bukkit/resources/</directory>
<includes>
<include>plugin.yml</include>
</includes>
</resource>
<!-- Default files -->
<resource>
<targetPath>defaults/</targetPath>
<filtering>true</filtering>
<directory>${basedir}/src/bukkit/resources/</directory>
<includes>
<include>config.yml</include>
</includes>
</resource>
<!-- NMS support in Bukkit -->
<resource>
<targetPath>nmsblocks/</targetPath>
<filtering>false</filtering>
<directory>${basedir}/src/bukkit/resources/nmsblocks/</directory>
<includes>
<include>*.class</include>
</includes>
</resource>
</resources>
<plugins>
<!-- Add source folder -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-bukkit-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/src/bukkit/java/</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-bukkit-test-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/src/bukkit-test/java/</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!--
=====================================
Forge
=====================================
-->
<profile> <profile>
<id>forge</id> <id>forge</id>
<build> <build>
@ -349,7 +492,11 @@
</build> </build>
</profile> </profile>
<!-- Attach javadocs and source .jars --> <!--
=====================================
Attach docs and source
=====================================
-->
<profile> <profile>
<id>attach-docs</id> <id>attach-docs</id>
@ -386,7 +533,11 @@
</build> </build>
</profile> </profile>
<!-- Build Spout, disabled by default because it always breaks --> <!--
=====================================
Spout (BROKEN)
=====================================
-->
<profile> <profile>
<id>spout</id> <id>spout</id>
@ -430,7 +581,7 @@
<version>1.5</version> <version>1.5</version>
<executions> <executions>
<execution> <execution>
<id>add-sources</id> <id>add-spout-sources</id>
<phase>generate-sources</phase> <phase>generate-sources</phase>
<goals> <goals>
<goal>add-source</goal> <goal>add-source</goal>

View File

@ -19,40 +19,29 @@
package com.sk89q.worldedit.bukkit; package com.sk89q.worldedit.bukkit;
import java.io.File; import com.sk89q.util.yaml.YAMLProcessor;
import java.io.FileNotFoundException; import com.sk89q.wepif.PermissionsResolverManager;
import java.io.FileOutputStream; import com.sk89q.worldedit.*;
import java.io.IOException; import com.sk89q.worldedit.bukkit.selections.CuboidSelection;
import java.io.InputStream; import com.sk89q.worldedit.bukkit.selections.Polygonal2DSelection;
import java.util.Enumeration; import com.sk89q.worldedit.bukkit.selections.Selection;
import java.util.jar.JarEntry; import com.sk89q.worldedit.extent.inventory.BlockBag;
import java.util.jar.JarFile; import com.sk89q.worldedit.regions.CuboidRegion;
import java.util.logging.Handler; import com.sk89q.worldedit.regions.Polygonal2DRegion;
import java.util.zip.ZipEntry; import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.regions.RegionSelector;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
import com.sk89q.util.yaml.YAMLProcessor; import java.io.*;
import com.sk89q.wepif.PermissionsResolverManager; import java.util.Enumeration;
import com.sk89q.worldedit.EditSession; import java.util.jar.JarEntry;
import com.sk89q.worldedit.IncompleteRegionException; import java.util.jar.JarFile;
import com.sk89q.worldedit.LocalPlayer; import java.util.logging.Handler;
import com.sk89q.worldedit.LocalSession; import java.util.zip.ZipEntry;
import com.sk89q.worldedit.ServerInterface;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.WorldEditOperation;
import com.sk89q.worldedit.extent.inventory.BlockBag;
import com.sk89q.worldedit.bukkit.selections.CuboidSelection;
import com.sk89q.worldedit.bukkit.selections.Polygonal2DSelection;
import com.sk89q.worldedit.bukkit.selections.Selection;
import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.regions.Polygonal2DRegion;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.regions.RegionSelector;
/** /**
* Plugin for Bukkit. * Plugin for Bukkit.