mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-06 07:32:46 +00:00
Implements packed data directory for faster loading times
This commit is contained in:
@@ -8,19 +8,6 @@
|
||||
</formats>
|
||||
<baseDirectory></baseDirectory>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<includes>
|
||||
<include>data/**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>.gitignore</exclude>
|
||||
<exclude>data/cache/**</exclude>
|
||||
<exclude>data/pathing.db</exclude>
|
||||
<exclude>data/database/**</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/distribution/global</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
@@ -33,6 +20,11 @@
|
||||
<destName>l2jserver2.jar</destName>
|
||||
<fileMode>0755</fileMode>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.build.directory}/${project.artifactId}-${project.version}-data.zip</source>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<destName>data.zip</destName>
|
||||
</file>
|
||||
</files>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
|
||||
@@ -8,19 +8,6 @@
|
||||
</formats>
|
||||
<baseDirectory></baseDirectory>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<includes>
|
||||
<include>data/**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>.gitignore</exclude>
|
||||
<exclude>data/cache/**</exclude>
|
||||
<exclude>data/pathing.db</exclude>
|
||||
<exclude>data/database/**</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/distribution/global</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
@@ -33,6 +20,11 @@
|
||||
<destName>l2jserver2.jar</destName>
|
||||
<fileMode>0755</fileMode>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.build.directory}/${project.artifactId}-${project.version}-data.zip</source>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<destName>data.zip</destName>
|
||||
</file>
|
||||
</files>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
|
||||
@@ -8,19 +8,6 @@
|
||||
</formats>
|
||||
<baseDirectory></baseDirectory>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<includes>
|
||||
<include>data/**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>.gitignore</exclude>
|
||||
<exclude>data/cache/**</exclude>
|
||||
<exclude>data/pathing.db</exclude>
|
||||
<exclude>data/database/**</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/distribution/global</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
@@ -33,6 +20,11 @@
|
||||
<destName>l2jserver2.jar</destName>
|
||||
<fileMode>0755</fileMode>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.build.directory}/${project.artifactId}-${project.version}-data.zip</source>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<destName>data.zip</destName>
|
||||
</file>
|
||||
</files>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
|
||||
@@ -8,19 +8,6 @@
|
||||
</formats>
|
||||
<baseDirectory></baseDirectory>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<includes>
|
||||
<include>data/**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>.gitignore</exclude>
|
||||
<exclude>data/cache/**</exclude>
|
||||
<exclude>data/pathing.db</exclude>
|
||||
<exclude>data/database/**</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/distribution/global</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
@@ -33,6 +20,11 @@
|
||||
<destName>l2jserver2.jar</destName>
|
||||
<fileMode>0755</fileMode>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.build.directory}/${project.artifactId}-${project.version}-data.zip</source>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<destName>data.zip</destName>
|
||||
</file>
|
||||
</files>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<assembly
|
||||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
|
||||
<id>data</id>
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/data</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<excludes>
|
||||
<exclude>.gitignore</exclude>
|
||||
<exclude>cache/**</exclude>
|
||||
<exclude>pathing.db</exclude>
|
||||
<exclude>database/**</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
||||
@@ -120,7 +120,7 @@ public class GameServerJDBCDatabaseService extends AbstractSQLDatabaseService
|
||||
updateSchema(QLogChat.logChat);
|
||||
if (updateSchema(QNPC.npc)) {
|
||||
try {
|
||||
importData(vfsService.resolve("data/static/npc.csv"), QNPC.npc);
|
||||
importData(vfsService.resolveDataFile("static/npc.csv"), QNPC.npc);
|
||||
} catch (IOException e) {
|
||||
throw new DatabaseException(e);
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ public class GameServerOrientDatabaseService extends
|
||||
updateSchema(QLogChat.logChat);
|
||||
if (updateSchema(QNPC.npc)) {
|
||||
try {
|
||||
importData(vfsService.resolve("data/static/npc.csv"), QNPC.npc);
|
||||
importData(vfsService.resolveDataFile("static/npc.csv"), QNPC.npc);
|
||||
} catch (IOException e) {
|
||||
throw new DatabaseException(e);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ package com.l2jserver.service.game.template;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URI;
|
||||
import java.nio.file.FileVisitResult;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
@@ -143,9 +142,9 @@ public class XMLTemplateService extends AbstractService implements
|
||||
/**
|
||||
* @return the directory in which templates are stored
|
||||
*/
|
||||
@ConfigurationPropertyGetter(defaultValue = "data/template")
|
||||
@ConfigurationPropertyGetter(defaultValue = "template/")
|
||||
@ConfigurationXPath("/configuration/services/template/directory")
|
||||
URI getTemplateDirectory();
|
||||
String getTemplateDirectory();
|
||||
|
||||
/**
|
||||
* @param file
|
||||
@@ -153,7 +152,7 @@ public class XMLTemplateService extends AbstractService implements
|
||||
*/
|
||||
@ConfigurationPropertySetter
|
||||
@ConfigurationXPath("/configuration/services/template/directory")
|
||||
void setTemplateDirectory(URI file);
|
||||
void setTemplateDirectory(String file);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -215,8 +214,8 @@ public class XMLTemplateService extends AbstractService implements
|
||||
unmarshaller.setAdapter(effectIdTemplateAdapter);
|
||||
unmarshaller.setAdapter(teleportationIdTemplateAdapter);
|
||||
|
||||
final Path templatePath = vfsService.resolve(config
|
||||
.getTemplateDirectory().toString());
|
||||
final Path templatePath = vfsService.resolveDataFile(config
|
||||
.getTemplateDirectory());
|
||||
|
||||
log.info("Scanning {} for XML templates", templatePath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user