mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-06 07:32:46 +00:00
10
.classpath
10
.classpath
@@ -4,13 +4,13 @@
|
|||||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
|
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
|
||||||
<classpathentry excluding="mysql5/|db4o/" kind="src" path="src/dao"/>
|
<classpathentry excluding="mysql5/|db4o/" kind="src" path="src/dao"/>
|
||||||
<classpathentry kind="src" path="src/dao/mysql5"/>
|
<classpathentry kind="src" path="src/dao/mysql5"/>
|
||||||
<classpathentry kind="src" path="data/script/template"/>
|
<classpathentry kind="src" output="target/scripts" path="data/script/template"/>
|
||||||
<classpathentry kind="src" path="data/script/quest"/>
|
<classpathentry kind="src" output="target/scripts" path="data/script/quest"/>
|
||||||
<classpathentry kind="src" path="data/script/ai"/>
|
<classpathentry kind="src" output="target/scripts" path="data/script/ai"/>
|
||||||
<classpathentry kind="src" path="data/plugin"/>
|
<classpathentry kind="src" output="target/scripts" path="data/plugin"/>
|
||||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
|
||||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
|
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
|
||||||
<classpathentry kind="src" path="src/tool/java"/>
|
<classpathentry kind="src" output="target/tools-classes" path="src/tool/java"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
|
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import com.google.inject.Inject;
|
|||||||
import com.l2jserver.model.template.Template;
|
import com.l2jserver.model.template.Template;
|
||||||
import com.l2jserver.service.game.scripting.classlistener.Loader;
|
import com.l2jserver.service.game.scripting.classlistener.Loader;
|
||||||
import com.l2jserver.service.game.scripting.classlistener.Unloader;
|
import com.l2jserver.service.game.scripting.classlistener.Unloader;
|
||||||
import com.l2jserver.service.game.template.StaticTemplateService;
|
import com.l2jserver.service.game.template.ScriptTemplateService;
|
||||||
import com.l2jserver.service.game.template.TemplateService;
|
import com.l2jserver.service.game.template.TemplateService;
|
||||||
import com.l2jserver.util.ClassUtils;
|
import com.l2jserver.util.ClassUtils;
|
||||||
import com.l2jserver.util.factory.CollectionFactory;
|
import com.l2jserver.util.factory.CollectionFactory;
|
||||||
@@ -26,11 +26,11 @@ public class PluginLoader implements Loader, Unloader {
|
|||||||
private static final Logger log = LoggerFactory
|
private static final Logger log = LoggerFactory
|
||||||
.getLogger(PluginLoader.class);
|
.getLogger(PluginLoader.class);
|
||||||
|
|
||||||
private final StaticTemplateService templateService;
|
private final ScriptTemplateService templateService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public PluginLoader(TemplateService templateService) {
|
public PluginLoader(TemplateService templateService) {
|
||||||
this.templateService = (StaticTemplateService) templateService;
|
this.templateService = (ScriptTemplateService) templateService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import com.google.inject.Inject;
|
|||||||
import com.l2jserver.model.template.Template;
|
import com.l2jserver.model.template.Template;
|
||||||
import com.l2jserver.service.game.scripting.classlistener.Loader;
|
import com.l2jserver.service.game.scripting.classlistener.Loader;
|
||||||
import com.l2jserver.service.game.scripting.classlistener.Unloader;
|
import com.l2jserver.service.game.scripting.classlistener.Unloader;
|
||||||
import com.l2jserver.service.game.template.StaticTemplateService;
|
import com.l2jserver.service.game.template.ScriptTemplateService;
|
||||||
import com.l2jserver.service.game.template.TemplateService;
|
import com.l2jserver.service.game.template.TemplateService;
|
||||||
import com.l2jserver.util.ClassUtils;
|
import com.l2jserver.util.ClassUtils;
|
||||||
import com.l2jserver.util.factory.CollectionFactory;
|
import com.l2jserver.util.factory.CollectionFactory;
|
||||||
@@ -26,11 +26,11 @@ public class TemplateLoader implements Loader, Unloader {
|
|||||||
private static final Logger log = LoggerFactory
|
private static final Logger log = LoggerFactory
|
||||||
.getLogger(TemplateLoader.class);
|
.getLogger(TemplateLoader.class);
|
||||||
|
|
||||||
private final StaticTemplateService templateService;
|
private final ScriptTemplateService templateService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public TemplateLoader(TemplateService templateService) {
|
public TemplateLoader(TemplateService templateService) {
|
||||||
this.templateService = (StaticTemplateService) templateService;
|
this.templateService = (ScriptTemplateService) templateService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
2
dist/start.sh
vendored
Normal file
2
dist/start.sh
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
echo "Not yet implemented!"
|
||||||
81
pom.xml
81
pom.xml
@@ -2,8 +2,8 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
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.l2jserver</groupId>
|
<groupId>com.l2jserver</groupId>
|
||||||
<artifactId>l2jserver2-gameserver</artifactId>
|
<artifactId>l2j2-gameserver</artifactId>
|
||||||
<version>2.0.0-DEVEL</version>
|
<version>2.0.0</version>
|
||||||
<name>L2JServer - Game Server</name>
|
<name>L2JServer - Game Server</name>
|
||||||
<description>Lineage II server emulator</description>
|
<description>Lineage II server emulator</description>
|
||||||
<inceptionYear>2011</inceptionYear>
|
<inceptionYear>2011</inceptionYear>
|
||||||
@@ -20,56 +20,56 @@
|
|||||||
<groupId>org.jboss.netty</groupId>
|
<groupId>org.jboss.netty</groupId>
|
||||||
<artifactId>netty</artifactId>
|
<artifactId>netty</artifactId>
|
||||||
<version>3.2.4.Final</version>
|
<version>3.2.4.Final</version>
|
||||||
<scope>compile</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.inject</groupId>
|
<groupId>com.google.inject</groupId>
|
||||||
<artifactId>guice</artifactId>
|
<artifactId>guice</artifactId>
|
||||||
<version>3.0</version>
|
<version>3.0</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.inject.extensions</groupId>
|
<groupId>com.google.inject.extensions</groupId>
|
||||||
<artifactId>guice-assistedinject</artifactId>
|
<artifactId>guice-assistedinject</artifactId>
|
||||||
<version>3.0</version>
|
<version>3.0</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-log4j12</artifactId>
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
<version>1.6.1</version>
|
<version>1.6.1</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>mysql</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
<version>5.1.16</version>
|
<version>5.1.16</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javacc</groupId>
|
<groupId>javacc</groupId>
|
||||||
<artifactId>javacc</artifactId>
|
<artifactId>javacc</artifactId>
|
||||||
<version>4.1</version>
|
<version>4.1</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-io</artifactId>
|
<artifactId>commons-io</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.2</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.kenai.nbpwr</groupId>
|
<groupId>com.kenai.nbpwr</groupId>
|
||||||
<artifactId>org-apache-commons-dbcp</artifactId>
|
<artifactId>org-apache-commons-dbcp</artifactId>
|
||||||
<version>1.2.2-201002241055</version>
|
<version>1.2.2-201002241055</version>
|
||||||
<type>nbm</type>
|
<type>nbm</type>
|
||||||
<scope>compile</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
@@ -98,21 +98,40 @@
|
|||||||
</contributors>
|
</contributors>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>git://github.com/Rogiel/l2jserver2-gs.git</connection>
|
<connection>git://github.com/Rogiel/l2jserver2-gs.git</connection>
|
||||||
<developerConnection>ssh://git@github.com:Rogiel/l2jserver2-gs.git</developerConnection>
|
<developerConnection>ssh://git@github.com:Rogiel/l2jserver2-gs.git
|
||||||
|
</developerConnection>
|
||||||
<tag>master</tag>
|
<tag>master</tag>
|
||||||
<url>https://github.com/Rogiel/l2jserver2-gs</url>
|
<url>https://github.com/Rogiel/l2jserver2-gs</url>
|
||||||
</scm>
|
</scm>
|
||||||
<build>
|
<build>
|
||||||
<defaultGoal>package</defaultGoal>
|
<defaultGoal>package</defaultGoal>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
|
<version>2.4.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>assembly</phase>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</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>
|
||||||
<version>2.3.1</version>
|
<version>2.3.1</version>
|
||||||
|
<configuration>
|
||||||
|
<archive>
|
||||||
|
<manifest>
|
||||||
|
<addClasspath>true</addClasspath>
|
||||||
|
<classpathPrefix>libs/</classpathPrefix>
|
||||||
|
<mainClass>com.l2jserver.L2JGameServerMain</mainClass>
|
||||||
|
</manifest>
|
||||||
|
</archive>
|
||||||
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>jar</id>
|
<phase>assembly</phase>
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
<goals>
|
||||||
<goal>jar</goal>
|
<goal>jar</goal>
|
||||||
</goals>
|
</goals>
|
||||||
@@ -121,38 +140,22 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
<version>2.1.2</version>
|
<version>2.2.1</version>
|
||||||
<executions>
|
<configuration>
|
||||||
<execution>
|
<descriptors>
|
||||||
<id>default</id>
|
<descriptor>src/assembly/distribution-bin.xml</descriptor>
|
||||||
<phase>package</phase>
|
<descriptor>src/assembly/distribution-src.xml</descriptor>
|
||||||
<goals>
|
</descriptors>
|
||||||
<goal>jar</goal>
|
</configuration>
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<version>2.7</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>default</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>repository.jboss.org</id>
|
<id>repository.jboss.org</id>
|
||||||
<url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
|
<url>https://repository.jboss.org/nexus/content/repositories/releases/
|
||||||
|
</url>
|
||||||
<snapshots>
|
<snapshots>
|
||||||
<enabled>false</enabled>
|
<enabled>false</enabled>
|
||||||
</snapshots>
|
</snapshots>
|
||||||
|
|||||||
46
src/assembly/distribution-bin.xml
Normal file
46
src/assembly/distribution-bin.xml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<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>bin</id>
|
||||||
|
<formats>
|
||||||
|
<format>tar.gz</format>
|
||||||
|
<format>tar.bz2</format>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<baseDirectory></baseDirectory>
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.basedir}</directory>
|
||||||
|
<outputDirectory>/</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>data/**</include>
|
||||||
|
<include>README</include>
|
||||||
|
<include>LICENSE</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.basedir}/dist</directory>
|
||||||
|
<outputDirectory>/</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.build.directory}</directory>
|
||||||
|
<outputDirectory>/</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.jar</include>
|
||||||
|
</includes>
|
||||||
|
<excludes>
|
||||||
|
<exclude>*-sources.jar</exclude>
|
||||||
|
<exclude>*-javadoc.jar</exclude>
|
||||||
|
</excludes>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
<dependencySets>
|
||||||
|
<dependencySet>
|
||||||
|
<outputDirectory>/libs</outputDirectory>
|
||||||
|
<useProjectArtifact>true</useProjectArtifact>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
|
</assembly>
|
||||||
36
src/assembly/distribution-src.xml
Normal file
36
src/assembly/distribution-src.xml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<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>src</id>
|
||||||
|
<formats>
|
||||||
|
<format>tar.gz</format>
|
||||||
|
<format>tar.bz2</format>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<baseDirectory></baseDirectory>
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.basedir}</directory>
|
||||||
|
<outputDirectory>/</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>data/**</include>
|
||||||
|
<include>src/**</include>
|
||||||
|
<include>README</include>
|
||||||
|
<include>LICENSE</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.basedir}/dist</directory>
|
||||||
|
<outputDirectory>/</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
<dependencySets>
|
||||||
|
<dependencySet>
|
||||||
|
<outputDirectory>/libs</outputDirectory>
|
||||||
|
<useProjectArtifact>true</useProjectArtifact>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
|
</assembly>
|
||||||
@@ -8,7 +8,7 @@ import com.l2jserver.service.database.DatabaseService;
|
|||||||
import com.l2jserver.service.database.MySQLDatabaseService;
|
import com.l2jserver.service.database.MySQLDatabaseService;
|
||||||
import com.l2jserver.service.game.scripting.ScriptingService;
|
import com.l2jserver.service.game.scripting.ScriptingService;
|
||||||
import com.l2jserver.service.game.scripting.ScriptingServiceImpl;
|
import com.l2jserver.service.game.scripting.ScriptingServiceImpl;
|
||||||
import com.l2jserver.service.game.template.StaticTemplateService;
|
import com.l2jserver.service.game.template.ScriptTemplateService;
|
||||||
import com.l2jserver.service.game.template.TemplateService;
|
import com.l2jserver.service.game.template.TemplateService;
|
||||||
import com.l2jserver.service.game.world.WorldService;
|
import com.l2jserver.service.game.world.WorldService;
|
||||||
import com.l2jserver.service.game.world.WorldServiceImpl;
|
import com.l2jserver.service.game.world.WorldServiceImpl;
|
||||||
@@ -34,7 +34,7 @@ public class ServiceModule extends AbstractModule {
|
|||||||
Scopes.SINGLETON);
|
Scopes.SINGLETON);
|
||||||
bind(ScriptingService.class).to(ScriptingServiceImpl.class).in(
|
bind(ScriptingService.class).to(ScriptingServiceImpl.class).in(
|
||||||
Scopes.SINGLETON);
|
Scopes.SINGLETON);
|
||||||
bind(TemplateService.class).to(StaticTemplateService.class).in(
|
bind(TemplateService.class).to(ScriptTemplateService.class).in(
|
||||||
Scopes.SINGLETON);
|
Scopes.SINGLETON);
|
||||||
|
|
||||||
bind(WorldService.class).to(WorldServiceImpl.class)
|
bind(WorldService.class).to(WorldServiceImpl.class)
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ import com.l2jserver.service.game.scripting.ScriptContext;
|
|||||||
import com.l2jserver.service.game.scripting.ScriptingService;
|
import com.l2jserver.service.game.scripting.ScriptingService;
|
||||||
import com.l2jserver.util.factory.CollectionFactory;
|
import com.l2jserver.util.factory.CollectionFactory;
|
||||||
|
|
||||||
public class StaticTemplateService extends AbstractService implements
|
public class ScriptTemplateService extends AbstractService implements
|
||||||
TemplateService {
|
TemplateService {
|
||||||
private final ScriptingService scriptingService;
|
private final ScriptingService scriptingService;
|
||||||
private final StaticTemplateServiceConfiguration config;
|
private final ScriptTemplateServiceConfiguration config;
|
||||||
private final Injector injector;
|
private final Injector injector;
|
||||||
|
|
||||||
private ScriptContext context;
|
private ScriptContext context;
|
||||||
@@ -27,12 +27,12 @@ public class StaticTemplateService extends AbstractService implements
|
|||||||
TemplateID.class, Template.class);
|
TemplateID.class, Template.class);
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public StaticTemplateService(ScriptingService scriptingService,
|
public ScriptTemplateService(ScriptingService scriptingService,
|
||||||
ConfigurationService configService, Injector injector) {
|
ConfigurationService configService, Injector injector) {
|
||||||
this.scriptingService = scriptingService;
|
this.scriptingService = scriptingService;
|
||||||
this.injector = injector;
|
this.injector = injector;
|
||||||
this.config = configService
|
this.config = configService
|
||||||
.get(StaticTemplateServiceConfiguration.class);
|
.get(ScriptTemplateServiceConfiguration.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -6,7 +6,7 @@ import com.l2jserver.service.configuration.Configuration;
|
|||||||
import com.l2jserver.service.configuration.Configuration.ConfigurationName;
|
import com.l2jserver.service.configuration.Configuration.ConfigurationName;
|
||||||
|
|
||||||
@ConfigurationName("template")
|
@ConfigurationName("template")
|
||||||
public interface StaticTemplateServiceConfiguration extends Configuration {
|
public interface ScriptTemplateServiceConfiguration extends Configuration {
|
||||||
@ConfigurationPropertyGetter(name = "template.descriptor", defaultValue = "data/script/template/template.xml")
|
@ConfigurationPropertyGetter(name = "template.descriptor", defaultValue = "data/script/template/template.xml")
|
||||||
File getTemplateDescriptor();
|
File getTemplateDescriptor();
|
||||||
|
|
||||||
@@ -4,28 +4,17 @@ import org.junit.Test;
|
|||||||
|
|
||||||
import script.template.item.AdenaItemTemplate;
|
import script.template.item.AdenaItemTemplate;
|
||||||
|
|
||||||
import com.google.inject.AbstractModule;
|
|
||||||
import com.google.inject.Guice;
|
import com.google.inject.Guice;
|
||||||
import com.google.inject.Injector;
|
import com.google.inject.Injector;
|
||||||
import com.google.inject.Scopes;
|
|
||||||
import com.l2jserver.db.dao.DAOModuleMySQL5;
|
import com.l2jserver.db.dao.DAOModuleMySQL5;
|
||||||
import com.l2jserver.model.id.factory.IDFactoryModule;
|
import com.l2jserver.model.id.factory.IDFactoryModule;
|
||||||
import com.l2jserver.model.id.template.factory.ItemTemplateIDFactory;
|
import com.l2jserver.model.id.template.factory.ItemTemplateIDFactory;
|
||||||
|
import com.l2jserver.service.ServiceModule;
|
||||||
import com.l2jserver.service.ServiceStartException;
|
import com.l2jserver.service.ServiceStartException;
|
||||||
import com.l2jserver.service.game.scripting.ScriptingService;
|
|
||||||
import com.l2jserver.service.game.scripting.ScriptingServiceImpl;
|
|
||||||
|
|
||||||
public class StaticTemplateServiceTest {
|
public class StaticTemplateServiceTest {
|
||||||
private final Injector injector = Guice.createInjector(
|
private final Injector injector = Guice.createInjector(new ServiceModule(),
|
||||||
new IDFactoryModule(), new DAOModuleMySQL5(), new AbstractModule() {
|
new IDFactoryModule(), new DAOModuleMySQL5());
|
||||||
@Override
|
|
||||||
protected void configure() {
|
|
||||||
bind(ScriptingService.class).to(ScriptingServiceImpl.class)
|
|
||||||
.in(Scopes.SINGLETON);
|
|
||||||
bind(TemplateService.class).to(StaticTemplateService.class)
|
|
||||||
.in(Scopes.SINGLETON);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
private final TemplateService service = injector
|
private final TemplateService service = injector
|
||||||
.getInstance(TemplateService.class);
|
.getInstance(TemplateService.class);
|
||||||
private final ItemTemplateIDFactory factory = injector
|
private final ItemTemplateIDFactory factory = injector
|
||||||
|
|||||||
Reference in New Issue
Block a user