Thread: [Java-link-svn] SF.net SVN: java-link: [6] trunk
Status: Pre-Alpha
Brought to you by:
welterde0
From: <wel...@us...> - 2006-05-13 20:42:24
|
Revision: 6 Author: welterde0 Date: 2006-05-13 13:41:47 -0700 (Sat, 13 May 2006) ViewCVS: http://svn.sourceforge.net/java-link/?rev=6&view=rev Log Message: ----------- buildsystem update from ant to maven2: step1 Modified Paths: -------------- trunk/client/src/main/java/org/jlink/ClientFrontend.java trunk/client/src/main/java/org/jlink/ClientNetwork.java trunk/client/src/main/java/org/jlink/client/frontend/MainFrame.java trunk/client/src/main/java/org/jlink/client/frontend/menu/MainMenu.java trunk/client/src/main/java/org/jlink/client/frontend/theme/Theme.java trunk/client/src/main/java/org/jlink/client/frontend/theme/ThemeManager.java trunk/client/src/main/java/org/jlink/client/gui/MenuBean.java trunk/client/src/main/java/org/jlink/frontend/WindowManagerImpl.java trunk/server/src/main/java/org/jlink/ServerMain.java trunk/server/src/main/java/org/jlink/ServerNetwork.java trunk/server/src/main/java/org/jlink/server/net/NetworkBackend.java trunk/share/src/main/java/org/jlink/net/ConnectionHandler.java Added Paths: ----------- trunk/client/ trunk/client/nbproject/ trunk/client/nbproject/mavencall.xml trunk/client/nbproject/project.properties trunk/client/nbproject/project.xml trunk/client/pom.xml trunk/client/src/ trunk/client/src/main/ trunk/client/src/main/assembly/ trunk/client/src/main/assembly/dep.xml trunk/client/src/main/java/ trunk/client/src/site/ trunk/client/src/site/site.xml trunk/client/src/test/ trunk/root/ trunk/root/pom.xml trunk/server/ trunk/server/pom.xml trunk/server/src/ trunk/server/src/main/ trunk/server/src/main/java/ trunk/server/src/test/ trunk/share/ trunk/share/nbproject/ trunk/share/nbproject/mavencall.xml trunk/share/nbproject/project.properties trunk/share/nbproject/project.xml trunk/share/pom.xml trunk/share/src/ trunk/share/src/main/ trunk/share/src/main/assembly/ trunk/share/src/main/assembly/dep.xml trunk/share/src/main/java/ trunk/share/src/test/ trunk/templates/maven2/ trunk/templates/maven2/pom.xml Removed Paths: ------------- trunk/Client/ trunk/Server/ trunk/Share/ Added: trunk/client/nbproject/mavencall.xml =================================================================== --- trunk/client/nbproject/mavencall.xml (rev 0) +++ trunk/client/nbproject/mavencall.xml 2006-05-13 20:41:47 UTC (rev 6) @@ -0,0 +1,37 @@ +<project name="client" default="build" basedir=".."> + <target name="build" description="Build"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="package"/> + </exec> + </target> + <target name="clean" description="Clean"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="clean:clean"/> + </exec> + </target> + <target name="javadoc" description="Javadoc"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="site:site"/> + </exec> + </target> + <target name="run" description="Install Locally"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="install"/> + </exec> + </target> + <target name="test" description="Test Project"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="test"/> + </exec> + </target> + <target name="jalopy" description="Format Code"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="jalopy:format"/> + </exec> + </target> + <target name="refresh-project" description="Refresh Project"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="netbeans-freeform:generate-netbeans-project"/> + </exec> + </target> +</project> \ No newline at end of file Added: trunk/client/nbproject/project.properties =================================================================== --- trunk/client/nbproject/project.properties (rev 0) +++ trunk/client/nbproject/project.properties 2006-05-13 20:41:47 UTC (rev 6) @@ -0,0 +1,5 @@ +#The netbeans freeform property file +#Sat May 13 22:20:34 CEST 2006 +local.repository=/home/tassilo/.m2/repository +mvn.path=mvn +project.directory=/home/tassilo/Documents/dev/jlink/feature_maven2/client Added: trunk/client/nbproject/project.xml =================================================================== --- trunk/client/nbproject/project.xml (rev 0) +++ trunk/client/nbproject/project.xml 2006-05-13 20:41:47 UTC (rev 6) @@ -0,0 +1,121 @@ +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.ant.freeform</type> + <configuration> + <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> + <name>JLink Client</name> + <properties> + <property name="ant.script">nbproject/mavencall.xml</property> + <property-file>nbproject/project.properties</property-file> + </properties> + <folders> + <source-folder> + <label>src/main/java</label> + <type>java</type> + <location>src/main/java</location> + </source-folder> + <source-folder> + <label>src/test/java</label> + <type>java</type> + <location>src/test/java</location> + </source-folder> + </folders> + <ide-actions> + <action name="build"> + <script>${ant.script}</script> + <target>build</target> + </action> + <action name="clean"> + <script>${ant.script}</script> + <target>clean</target> + </action> + <action name="rebuild"> + <script>${ant.script}</script> + <target>clean</target> + <target>build</target> + </action> + <action name="javadoc"> + <script>${ant.script}</script> + <target>javadoc</target> + </action> + <action name="run"> + <script>${ant.script}</script> + <target>run</target> + </action> + <action name="test"> + <script>${ant.script}</script> + <target>test</target> + </action> + </ide-actions> + <view> + <items> + <source-file> + <label>pom</label> + <location>pom.xml</location> + </source-file> + <source-file> + <label>mavencall</label> + <location>nbproject/mavencall.xml</location> + </source-file> + <source-folder style="packages"> + <label>src/main/java</label> + <location>src/main/java</location> + </source-folder> + <source-folder style="packages"> + <label>src/test/java</label> + <location>src/test/java</location> + </source-folder> + <source-folder style="tree"> + <label>src/main/resources</label> + <location>src/main/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/test/resources</label> + <location>src/test/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/site</label> + <location>src/site</location> + </source-folder> + <source-folder style="tree"> + <label>target</label> + <location>target</location> + </source-folder> + </items> + <context-menu> + <action> + <script>${ant.script}</script> + <label>Refresh Project</label> + <target>refresh-project</target> + </action> + <ide-action name="build"/> + <ide-action name="clean"/> + <ide-action name="rebuild"/> + <ide-action name="javadoc"/> + <ide-action name="run"/> + <ide-action name="test"/> + <action> + <script>${ant.script}</script> + <label>Format Code</label> + <target>jalopy</target> + </action> + </context-menu> + </view> + <subprojects/> + </general-data> + <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2"> + <compilation-unit> + <package-root>src/main/java</package-root> + <classpath mode="compile">${local.repository}/org/jvnet/substance/core/2.2.02/core-2.2.02.jar:${local.repository}/jdom/jdom/1.0/jdom-1.0.jar:${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/org/jvnet/swing-layout/core/1.0/core-1.0.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar</classpath> + <built-to>target/classes</built-to> + <source-level>1.4</source-level> + </compilation-unit> + <compilation-unit> + <package-root>src/test/java</package-root> + <unit-tests/> + <classpath mode="compile">target/classes:${local.repository}/org/jvnet/substance/core/2.2.02/core-2.2.02.jar:${local.repository}/junit/junit/3.8.1/junit-3.8.1.jar:${local.repository}/jdom/jdom/1.0/jdom-1.0.jar:${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/org/jvnet/swing-layout/core/1.0/core-1.0.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar</classpath> + <built-to>target/test-classes</built-to> + <source-level>1.4</source-level> + </compilation-unit> + </java-data> + </configuration> +</project> \ No newline at end of file Added: trunk/client/pom.xml =================================================================== --- trunk/client/pom.xml (rev 0) +++ trunk/client/pom.xml 2006-05-13 20:41:47 UTC (rev 6) @@ -0,0 +1,125 @@ +<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/maven-v4_0_0.xsd"> +<!--//////////////////////////////////////// + /////////////General//////////////////// + /////////////////////////////////////--> + <parent> + <artifactId>yamd-root</artifactId> + <groupId>org.welterde.yamd</groupId> + <version>0.0.1-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>org.jlink</groupId> + <artifactId>client</artifactId> + <packaging>jar</packaging> + <version>0.0.1-SNAPSHOT</version> + <name>JLink Client</name> + <url>http://java-link.sf.net/</url> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.jlink</groupId> + <artifactId>share</artifactId> + <version>0.0.1-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.jvnet.substance</groupId> + <artifactId>core</artifactId> + <version>2.2.02</version> + </dependency> + <dependency> + <groupId>jdom</groupId> + <artifactId>jdom</artifactId> + <version>1.0</version> + </dependency> + <dependency> + <groupId>org.jvnet.swing-layout</groupId> + <artifactId>core</artifactId> + <version>1.0</version> + </dependency> + </dependencies> +<!--//////////////////////////////////////// + /////////////Reporting////////////////// + /////////////////////////////////////--> + <reporting> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>jxr-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-pmd-plugin</artifactId> + <configuration> + <linkXref>true</linkXref> + <sourceEncoding>utf-8</sourceEncoding> + <minimumTokens>100</minimumTokens> + <targetJdk>1.5</targetJdk> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-report-plugin</artifactId> + </plugin> + </plugins> + </reporting> +<!--//////////////////////////////////////// + /////////////Building/////////////////// + /////////////////////////////////////--> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptor>src/main/assembly/dep.xml</descriptor> + </configuration> + </plugin> + </plugins> + </build> +<!--//////////////////////////////////////// + /////////////Deploying////////////////// + /////////////////////////////////////--> + <distributionManagement> + <site> + <id>jlink-sf</id> + <url>scp://shell.sf.net/home/groups/j/ja/java-link/htdocs/maven2/client</url> + </site> + </distributionManagement> +<!--//////////////////////////////////////// + /////////////Include from root////////// + /////////////////////////////////////--> + <ciManagement> + <system>cruisecontrol</system> + <url>http://welterde.i2p/cruisecontrol/</url> + </ciManagement> + <issueManagement> + <system>sourceforge</system> + <url>http://sourceforge.net/tracker/?group_id=162264</url> + </issueManagement> + <developers> + <developer> + <id>welterde</id> + <email>wel...@ar...</email> + </developer> + </developers> + <scm> + <connection>scm:svn:https://svn.sourceforge.net/svnroot/javalink</connection> + <url>http://svn.sourceforge.net/viewcvs.cgi/java-link/</url> + </scm> +</project> Added: trunk/client/src/main/assembly/dep.xml =================================================================== --- trunk/client/src/main/assembly/dep.xml (rev 0) +++ trunk/client/src/main/assembly/dep.xml 2006-05-13 20:41:47 UTC (rev 6) @@ -0,0 +1,20 @@ +<assembly> + <id>deps</id> + <formats> + <format>jar</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <fileSets> + <fileSet> + <directory>target/classes</directory> + <outputDirectory>/</outputDirectory> + </fileSet> + </fileSets> + <dependencySets> + <dependencySet> + <outputDirectory>/</outputDirectory> + <unpack>true</unpack> + <scope>runtime</scope> + </dependencySet> + </dependencySets> +</assembly> Copied: trunk/client/src/main/java (from rev 5, trunk/Client/src) Modified: trunk/client/src/main/java/org/jlink/ClientFrontend.java =================================================================== --- trunk/Client/src/org/jlink/ClientFrontend.java 2006-05-12 18:06:26 UTC (rev 5) +++ trunk/client/src/main/java/org/jlink/ClientFrontend.java 2006-05-13 20:41:47 UTC (rev 6) @@ -80,12 +80,12 @@ c.destroy(); return null; } - ret.log.debug("is ok, d={}", d); + ret.log.debug("is ok, d=" + d); if(Options.FRONTEND_VIDEO_FULLSCREEN) { ret.log.debug("calculating screen mp"); ret.mx = d.getWidth() / 1024; ret.my = d.getHeight() / 768; - ret.log.debug("done, mx={}, my={}", ret.mx, ret.my); + ret.log.debug("done, mx=" + ret.mx + ", my=" + ret.my); ret.root = new MainFrame("JLink", d, ret.mx, ret.my); } else { ret.root = new MainFrame("JLink", new Dimension(1024, 768), ret.mx, ret.my); @@ -186,7 +186,7 @@ } public void setServerHost(String nhost) { - log.debug("Frontend::setServerHost({}) delegated", nhost); + log.debug("Frontend::setServerHost(" + nhost + ") delegated"); this.modCore.setServerHost(nhost); } Modified: trunk/client/src/main/java/org/jlink/ClientNetwork.java =================================================================== --- trunk/Client/src/org/jlink/ClientNetwork.java 2006-05-12 18:06:26 UTC (rev 5) +++ trunk/client/src/main/java/org/jlink/ClientNetwork.java 2006-05-13 20:41:47 UTC (rev 6) @@ -91,7 +91,7 @@ if(port <= 0) throw new IllegalArgumentException(); ConnectionHandler h = null; - log.info("connecting to {}:{}", host, port); + log.info("connecting to " + host + ":" + port); try { this.connectSock = new Socket(host, port); log.debug("connected, creating Handler"); Modified: trunk/client/src/main/java/org/jlink/client/frontend/MainFrame.java =================================================================== --- trunk/Client/src/org/jlink/client/frontend/MainFrame.java 2006-05-12 18:06:26 UTC (rev 5) +++ trunk/client/src/main/java/org/jlink/client/frontend/MainFrame.java 2006-05-13 20:41:47 UTC (rev 6) @@ -52,7 +52,7 @@ public MainFrame(String title, Dimension dim, double mx, double my) { this.log = Logger.getLogger("jlink.frontend.mainframe"); - log.debug("created Object(MainFrame), Title: {}", title); + log.debug("created Object(MainFrame), Title: " + title); //creating Frame/Window log.debug("creating frame"); Modified: trunk/client/src/main/java/org/jlink/client/frontend/menu/MainMenu.java =================================================================== --- trunk/Client/src/org/jlink/client/frontend/menu/MainMenu.java 2006-05-12 18:06:26 UTC (rev 5) +++ trunk/client/src/main/java/org/jlink/client/frontend/menu/MainMenu.java 2006-05-13 20:41:47 UTC (rev 6) @@ -135,7 +135,7 @@ private ImageIcon getIcon(String p) { - log.debug("loading image: {}", p); + log.debug("loading image: " + p); Image i = this.cur.getImage(p); log.debug("scaling"); i = i.getScaledInstance(54, 54, Image.SCALE_SMOOTH); Modified: trunk/client/src/main/java/org/jlink/client/frontend/theme/Theme.java =================================================================== --- trunk/Client/src/org/jlink/client/frontend/theme/Theme.java 2006-05-12 18:06:26 UTC (rev 5) +++ trunk/client/src/main/java/org/jlink/client/frontend/theme/Theme.java 2006-05-13 20:41:47 UTC (rev 6) @@ -51,7 +51,7 @@ Theme ret = null; ret = new Theme(); ret.log = Logger.getLogger("jlink.frontend.theme"); - ret.log.debug("loading Theme from {}", dir.getAbsolutePath()); + ret.log.debug("loading Theme from " + dir.getAbsolutePath()); ret.dir = dir; @@ -80,7 +80,7 @@ if(maxMissing < 0) throw new IllegalArgumentException("maxMissing found: [" + maxMissing + "] required: >= 0"); NDC.push(this.name); - log.debug("Theme::{}::validate({})", this.name, maxMissing); + log.debug("Theme::" + this.name + "::validate(" + maxMissing + ")"); NDC.push("validate"); log.debug("checking MainMenu images"); @@ -127,7 +127,7 @@ //Image Operations public Image getImage(String i) { - log.debug("ImageRequest: {}", i); + log.debug("ImageRequest: " + i); File f = null; f = new File(this.dir, i); //log.debug("checking existence of: {}", f.getAbsolutePath()); Modified: trunk/client/src/main/java/org/jlink/client/frontend/theme/ThemeManager.java =================================================================== --- trunk/Client/src/org/jlink/client/frontend/theme/ThemeManager.java 2006-05-12 18:06:26 UTC (rev 5) +++ trunk/client/src/main/java/org/jlink/client/frontend/theme/ThemeManager.java 2006-05-13 20:41:47 UTC (rev 6) @@ -45,7 +45,7 @@ //loading Methods public void load(File dir) { - log.info("loading Themes from {}", dir); + log.info("loading Themes from " + dir); if(!dir.isDirectory()) return; File[] t = dir.listFiles(); @@ -53,7 +53,7 @@ return; int i = 0; while(i < t.length) { - log.debug("checking {}", t[i]); + log.debug("checking " + t[i]); if(!t[i].isDirectory()) { log.debug("isnt directory"); i++; @@ -70,7 +70,7 @@ } public void loadTheme(File d) { Theme t = Theme.load(d); - log.info("loaded Theme: {}", t.getName()); + log.info("loaded Theme: " + t.getName()); this.db.add(t); } Modified: trunk/client/src/main/java/org/jlink/client/gui/MenuBean.java =================================================================== --- trunk/Client/src/org/jlink/client/gui/MenuBean.java 2006-05-12 18:06:26 UTC (rev 5) +++ trunk/client/src/main/java/org/jlink/client/gui/MenuBean.java 2006-05-13 20:41:47 UTC (rev 6) @@ -65,18 +65,18 @@ //Buttons public void addButton(String id, Icon ico, int x, int y, int w, int h, String tooltip) { Logger log = Logger.getLogger("jlink.gui.beans.menu"); - log.debug("addButton(...) called id={}", id); + log.debug("addButton(...) called id=" + id); JButton b = new JButton(ico); b.setActionCommand(id); log.debug("calculating"); int x0 = (int) (x * mx); - log.debug("x, pre={}, suf={}", x, x0); + log.debug("x, pre=" + x + ", suf=" + x0); int x1 = (int) (w * mx); - log.debug("w pre={}, suf={}", w, x1); + log.debug("w pre=" + w + ", suf=" + x1); int y0 = (int) (y * my); - log.debug("y pre={}, suf={}", y, y0); + log.debug("y pre=" + y + ", suf=" + y0); int y1 = (int) (h * my); - log.debug("h pre={}, suf={}", h, y1); + log.debug("h pre=" + h + ", suf="+ y1); b.setBounds(x0, y0, x1, y1); b.setToolTipText(tooltip); this.c.add(b); Modified: trunk/client/src/main/java/org/jlink/frontend/WindowManagerImpl.java =================================================================== --- trunk/Client/src/org/jlink/frontend/WindowManagerImpl.java 2006-05-12 18:06:26 UTC (rev 5) +++ trunk/client/src/main/java/org/jlink/frontend/WindowManagerImpl.java 2006-05-13 20:41:47 UTC (rev 6) @@ -56,7 +56,7 @@ } public void addWindow(String id, Window win) { - log.trace("entering method addWindow({}, {}", id, win); + log.trace("entering method addWindow(" + id + ", " + win + ")"); if(id == null) throw new NullPointerException(); Added: trunk/client/src/site/site.xml =================================================================== --- trunk/client/src/site/site.xml (rev 0) +++ trunk/client/src/site/site.xml 2006-05-13 20:41:47 UTC (rev 6) @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<project name="JLink Client"> + <bannerRight> + <src>http://sflogo.sourceforge.net/sflogo.php?group_id=162264&type=3</src> + </bannerRight> + <body> + ${reports} + </body> +</project> Added: trunk/root/pom.xml =================================================================== --- trunk/root/pom.xml (rev 0) +++ trunk/root/pom.xml 2006-05-13 20:41:47 UTC (rev 6) @@ -0,0 +1,35 @@ +<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/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.jlink</groupId> + <artifactId>root</artifactId> + <packaging>pom</packaging> + <version>0.0.1-SNAPSHOT</version> + <name>JLink Root</name> + <url>http://java-link.sf.net/</url> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + </dependencies> + <ciManagement> + <system>cruisecontrol</system> + <url>http://welterde.i2p/cruisecontrol/</url> + </ciManagement> + <issueManagement> + <system>sourceforge</system> + <url>http://sourceforge.net/tracker/?group_id=162264</url> + </issueManagement> + <developers> + <developer> + <id>welterde</id> + <email>wel...@ar...</email> + </developer> + </developers> + <scm> + <connection>scm:svn:https://svn.sourceforge.net/svnroot/javalink</connection> + <url>http://svn.sourceforge.net/viewcvs.cgi/java-link/</url> + </scm> +</project> Added: trunk/server/pom.xml =================================================================== --- trunk/server/pom.xml (rev 0) +++ trunk/server/pom.xml 2006-05-13 20:41:47 UTC (rev 6) @@ -0,0 +1,117 @@ +<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/maven-v4_0_0.xsd"> +<!--//////////////////////////////////////// + /////////////General//////////////////// + /////////////////////////////////////--> + <parent> + <artifactId>yamd-root</artifactId> + <groupId>org.welterde.yamd</groupId> + <version>0.0.1-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>org.jlink</groupId> + <artifactId>server</artifactId> + <packaging>jar</packaging> + <version>0.0.1-SNAPSHOT</version> + <name>JLink Server</name> + <url>http://java-link.sf.net/</url> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.jlink</groupId> + <artifactId>share</artifactId> + <version>0.0.1-SNAPSHOT</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.13</version> + <scope>compile</scope> + </dependency> + </dependencies> +<!--//////////////////////////////////////// + /////////////Reporting////////////////// + /////////////////////////////////////--> + <reporting> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>jxr-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-pmd-plugin</artifactId> + <configuration> + <linkXref>true</linkXref> + <sourceEncoding>utf-8</sourceEncoding> + <minimumTokens>100</minimumTokens> + <targetJdk>1.5</targetJdk> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-report-plugin</artifactId> + </plugin> + </plugins> + </reporting> +<!--//////////////////////////////////////// + /////////////Building/////////////////// + /////////////////////////////////////--> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptor>src/main/assembly/dep.xml</descriptor> + </configuration> + </plugin> + </plugins> + </build> +<!--//////////////////////////////////////// + /////////////Deploying////////////////// + /////////////////////////////////////--> + <distributionManagement> + <site> + <id>jlink-sf</id> + <url>scp://shell.sf.net/home/groups/j/ja/java-link/htdocs/maven2/server</url> + </site> + </distributionManagement> +<!--//////////////////////////////////////// + /////////////Include from root////////// + /////////////////////////////////////--> + <ciManagement> + <system>cruisecontrol</system> + <url>http://welterde.i2p/cruisecontrol/</url> + </ciManagement> + <issueManagement> + <system>sourceforge</system> + <url>http://sourceforge.net/tracker/?group_id=162264</url> + </issueManagement> + <developers> + <developer> + <id>welterde</id> + <email>wel...@ar...</email> + </developer> + </developers> + <scm> + <connection>scm:svn:https://svn.sourceforge.net/svnroot/javalink</connection> + <url>http://svn.sourceforge.net/viewcvs.cgi/java-link/</url> + </scm> +</project> Copied: trunk/server/src/main/java (from rev 5, trunk/Server/src) Modified: trunk/server/src/main/java/org/jlink/ServerMain.java =================================================================== --- trunk/Server/src/org/jlink/ServerMain.java 2006-05-12 18:06:26 UTC (rev 5) +++ trunk/server/src/main/java/org/jlink/ServerMain.java 2006-05-13 20:41:47 UTC (rev 6) @@ -36,7 +36,6 @@ import org.apache.log4j.FileAppender; import org.apache.log4j.PatternLayout; import org.apache.log4j.Level; -import org.apache.log4j.filter.LevelRangeFilter; import org.apache.log4j.ConsoleAppender; /** @@ -92,7 +91,7 @@ log.info("pre-compiling some classes"); boolean b = false; b = b || Compiler.compileClass(ServerNetwork.class); - log.debug("check for enabled compiling result 1: {}", b); + log.debug("check for enabled compiling result 1: " + b); //TODO: do some more checks if(b) { //compile more classes @@ -112,6 +111,6 @@ log.debug("############System############"); log.debug("##########Information#########"); log.debug("##############################"); - log.debug("System.compiler: {}", System.getProperty("java.compiler")); + log.debug("System.compiler: " + System.getProperty("java.compiler")); } } Modified: trunk/server/src/main/java/org/jlink/ServerNetwork.java =================================================================== --- trunk/Server/src/org/jlink/ServerNetwork.java 2006-05-12 18:06:26 UTC (rev 5) +++ trunk/server/src/main/java/org/jlink/ServerNetwork.java 2006-05-13 20:41:47 UTC (rev 6) @@ -61,7 +61,7 @@ //creating other Parts ret.log.debug("Network::createParts()"); try { - ret.log.debug("trying to listen on Port: {}", Options.NETWORK_LISTEN_PORT); + ret.log.debug("trying to listen on Port: " + Options.NETWORK_LISTEN_PORT); ret.mod_back = NetworkBackend.listen(ret, Options.NETWORK_LISTEN_PORT); ret.log.debug("ok we're listening"); } catch (IOException ex) { Modified: trunk/server/src/main/java/org/jlink/server/net/NetworkBackend.java =================================================================== --- trunk/Server/src/org/jlink/server/net/NetworkBackend.java 2006-05-12 18:06:26 UTC (rev 5) +++ trunk/server/src/main/java/org/jlink/server/net/NetworkBackend.java 2006-05-13 20:41:47 UTC (rev 6) @@ -53,7 +53,7 @@ NetworkBackend ret = null; ret = new NetworkBackend(); ret.log = Logger.getLogger("jlink.net.backend"); - ret.log.info("NetworkBackend::listen({})", port); + ret.log.info("NetworkBackend::listen(" + port + ")"); ret.mod_net = net; //creating Socket @@ -115,7 +115,7 @@ Socket cur = this.conSock.accept(); this.conCount++; NDC.push("" + this.conCount); - log.info("got Connection from {}", cur.getInetAddress()); + log.info("got Connection from " + cur.getInetAddress()); NDC.push("init"); log.debug("creating ConnectionHandler"); ConnectionHandler h = ConnectionHandler.connect(cur); Added: trunk/share/nbproject/mavencall.xml =================================================================== --- trunk/share/nbproject/mavencall.xml (rev 0) +++ trunk/share/nbproject/mavencall.xml 2006-05-13 20:41:47 UTC (rev 6) @@ -0,0 +1,37 @@ +<project name="share" default="build" basedir=".."> + <target name="build" description="Build"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="package"/> + </exec> + </target> + <target name="clean" description="Clean"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="clean:clean"/> + </exec> + </target> + <target name="javadoc" description="Javadoc"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="site:site"/> + </exec> + </target> + <target name="run" description="Install Locally"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="install"/> + </exec> + </target> + <target name="test" description="Test Project"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="test"/> + </exec> + </target> + <target name="jalopy" description="Format Code"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="jalopy:format"/> + </exec> + </target> + <target name="refresh-project" description="Refresh Project"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="netbeans-freeform:generate-netbeans-project"/> + </exec> + </target> +</project> \ No newline at end of file Added: trunk/share/nbproject/project.properties =================================================================== --- trunk/share/nbproject/project.properties (rev 0) +++ trunk/share/nbproject/project.properties 2006-05-13 20:41:47 UTC (rev 6) @@ -0,0 +1,5 @@ +#The netbeans freeform property file +#Sat May 13 22:20:43 CEST 2006 +local.repository=/home/tassilo/.m2/repository +mvn.path=mvn +project.directory=/home/tassilo/Documents/dev/jlink/feature_maven2/share Added: trunk/share/nbproject/project.xml =================================================================== --- trunk/share/nbproject/project.xml (rev 0) +++ trunk/share/nbproject/project.xml 2006-05-13 20:41:47 UTC (rev 6) @@ -0,0 +1,121 @@ +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.ant.freeform</type> + <configuration> + <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> + <name>JLink Share</name> + <properties> + <property name="ant.script">nbproject/mavencall.xml</property> + <property-file>nbproject/project.properties</property-file> + </properties> + <folders> + <source-folder> + <label>src/main/java</label> + <type>java</type> + <location>src/main/java</location> + </source-folder> + <source-folder> + <label>src/test/java</label> + <type>java</type> + <location>src/test/java</location> + </source-folder> + </folders> + <ide-actions> + <action name="build"> + <script>${ant.script}</script> + <target>build</target> + </action> + <action name="clean"> + <script>${ant.script}</script> + <target>clean</target> + </action> + <action name="rebuild"> + <script>${ant.script}</script> + <target>clean</target> + <target>build</target> + </action> + <action name="javadoc"> + <script>${ant.script}</script> + <target>javadoc</target> + </action> + <action name="run"> + <script>${ant.script}</script> + <target>run</target> + </action> + <action name="test"> + <script>${ant.script}</script> + <target>test</target> + </action> + </ide-actions> + <view> + <items> + <source-file> + <label>pom</label> + <location>pom.xml</location> + </source-file> + <source-file> + <label>mavencall</label> + <location>nbproject/mavencall.xml</location> + </source-file> + <source-folder style="packages"> + <label>src/main/java</label> + <location>src/main/java</location> + </source-folder> + <source-folder style="packages"> + <label>src/test/java</label> + <location>src/test/java</location> + </source-folder> + <source-folder style="tree"> + <label>src/main/resources</label> + <location>src/main/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/test/resources</label> + <location>src/test/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/site</label> + <location>src/site</location> + </source-folder> + <source-folder style="tree"> + <label>target</label> + <location>target</location> + </source-folder> + </items> + <context-menu> + <action> + <script>${ant.script}</script> + <label>Refresh Project</label> + <target>refresh-project</target> + </action> + <ide-action name="build"/> + <ide-action name="clean"/> + <ide-action name="rebuild"/> + <ide-action name="javadoc"/> + <ide-action name="run"/> + <ide-action name="test"/> + <action> + <script>${ant.script}</script> + <label>Format Code</label> + <target>jalopy</target> + </action> + </context-menu> + </view> + <subprojects/> + </general-data> + <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2"> + <compilation-unit> + <package-root>src/main/java</package-root> + <classpath mode="compile">${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar</classpath> + <built-to>target/classes</built-to> + <source-level>1.4</source-level> + </compilation-unit> + <compilation-unit> + <package-root>src/test/java</package-root> + <unit-tests/> + <classpath mode="compile">target/classes:${local.repository}/junit/junit/3.8.1/junit-3.8.1.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar</classpath> + <built-to>target/test-classes</built-to> + <source-level>1.4</source-level> + </compilation-unit> + </java-data> + </configuration> +</project> \ No newline at end of file Added: trunk/share/pom.xml =================================================================== --- trunk/share/pom.xml (rev 0) +++ trunk/share/pom.xml 2006-05-13 20:41:47 UTC (rev 6) @@ -0,0 +1,111 @@ +<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/maven-v4_0_0.xsd"> +<!--//////////////////////////////////////// + /////////////General//////////////////// + /////////////////////////////////////--> + <parent> + <artifactId>yamd-root</artifactId> + <groupId>org.welterde.yamd</groupId> + <version>0.0.1-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>org.jlink</groupId> + <artifactId>share</artifactId> + <packaging>jar</packaging> + <version>0.0.1-SNAPSHOT</version> + <name>JLink Share</name> + <url>http://java-link.sf.net/</url> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.13</version> + <scope>compile</scope> + </dependency> + </dependencies> + <!--//////////////////////////////////////// + /////////////Reporting////////////////// + /////////////////////////////////////--> + <reporting> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>jxr-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-pmd-plugin</artifactId> + <configuration> + <linkXref>true</linkXref> + <sourceEncoding>utf-8</sourceEncoding> + <minimumTokens>100</minimumTokens> + <targetJdk>1.5</targetJdk> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-report-plugin</artifactId> + </plugin> + </plugins> + </reporting> +<!--//////////////////////////////////////// + /////////////Building/////////////////// + /////////////////////////////////////--> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptor>src/main/assembly/dep.xml</descriptor> + </configuration> + </plugin> + </plugins> + </build> +<!--//////////////////////////////////////// + /////////////Deploying////////////////// + /////////////////////////////////////--> + <distributionManagement> + <site> + <id>jlink-sf</id> + <url>scp://shell.sf.net/home/groups/j/ja/java-link/htdocs/maven2/share</url> + </site> + </distributionManagement> +<!--//////////////////////////////////////// + /////////////Include from root////////// + /////////////////////////////////////--> + <ciManagement> + <system>cruisecontrol</system> + <url>http://welterde.i2p/cruisecontrol/</url> + </ciManagement> + <issueManagement> + <system>sourceforge</system> + <url>http://sourceforge.net/tracker/?group_id=162264</url> + </issueManagement> + <developers> + <developer> + <id>welterde</id> + <email>wel...@ar...</email> + </developer> + </developers> + <scm> + <connection>scm:svn:https://svn.sourceforge.net/svnroot/javalink</connection> + <url>http://svn.sourceforge.net/viewcvs.cgi/java-link/</url> + </scm> +</project> Added: trunk/share/src/main/assembly/dep.xml =================================================================== --- trunk/share/src/main/assembly/dep.xml (rev 0) +++ trunk/share/src/main/assembly/dep.xml 2006-05-13 20:41:47 UTC (rev 6) @@ -0,0 +1,20 @@ +<assembly> + <id>deps</id> + <formats> + <format>jar</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <fileSets> + <fileSet> + <directory>target/classes</directory> + <outputDirectory>/</outputDirectory> + </fileSet> + </fileSets> + <dependencySets> + <dependencySet> + <outputDirectory>/</outputDirectory> + <unpack>true</unpack> + <scope>runtime</scope> + </dependencySet> + </dependencySets> +</assembly> Copied: trunk/share/src/main/java (from rev 5, trunk/Share/src) Modified: trunk/share/src/main/java/org/jlink/net/ConnectionHandler.java =================================================================== --- trunk/Share/src/org/jlink/net/ConnectionHandler.java 2006-05-12 18:06:26 UTC (rev 5) +++ trunk/share/src/main/java/org/jlink/net/ConnectionHandler.java 2006-05-13 20:41:47 UTC (rev 6) @@ -129,7 +129,7 @@ ConnectionHandler ret = null; ret = new ConnectionHandler(); ret.log = Logger.getLogger("jlink.network.connection_andler"); - ret.log.debug("ConnectionHandler created, remote host={}", s.getInetAddress()); + ret.log.debug("ConnectionHandler created, remote host=" + s.getInetAddress()); ret.sock = s; ret.log.debug("creating Streams"); Added: trunk/templates/maven2/pom.xml =================================================================== --- trunk/templates/maven2/pom.xml (rev 0) +++ trunk/templates/maven2/pom.xml 2006-05-13 20:41:47 UTC (rev 6) @@ -0,0 +1,105 @@ +<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/maven-v4_0_0.xsd"> +<!--//////////////////////////////////////// + /////////////General//////////////////// + /////////////////////////////////////--> + <parent> + <artifactId>yamd-root</artifactId> + <groupId>org.welterde.yamd</groupId> + <version>0.0.1-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>org.jlink</groupId> + <artifactId>${name}</artifactId> + <packaging>jar</packaging> + <version>0.0.1-SNAPSHOT</version> + <name>JLink ${Name}</name> + <url>http://java-link.sf.net/</url> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + </dependencies> +<!--//////////////////////////////////////// + /////////////Reporting////////////////// + /////////////////////////////////////--> + <reporting> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>jxr-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-pmd-plugin</artifactId> + <configuration> + <linkXref>true</linkXref> + <sourceEncoding>utf-8</sourceEncoding> + <minimumTokens>100</minimumTokens> + <targetJdk>1.5</targetJdk> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-report-plugin</artifactId> + </plugin> + </plugins> + </reporting> +<!--//////////////////////////////////////// + /////////////Building/////////////////// + /////////////////////////////////////--> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptor>src/main/assembly/dep.xml</descriptor> + </configuration> + </plugin> + </plugins> + </build> +<!--//////////////////////////////////////// + /////////////Deploying////////////////// + /////////////////////////////////////--> + <distributionManagement> + <site> + <id>jlink-sf</id> + <url>scp://shell.sf.net/home/groups/j/ja/java-link/htdocs/maven2/${name}</url> + </site> + </distributionManagement> +<!--//////////////////////////////////////// + /////////////Include from root////////// + /////////////////////////////////////--> + <ciManagement> + <system>cruisecontrol</system> + <url>http://welterde.i2p/cruisecontrol/</url> + </ciManagement> + <issueManagement> + <system>sourceforge</system> + <url>http://sourceforge.net/tracker/?group_id=162264</url> + </issueManagement> + <developers> + <developer> + <id>welterde</id> + <email>wel...@ar...</email> + </developer> + </developers> + <scm> + <connection>scm:svn:https://svn.sourceforge.net/svnroot/javalink</connection> + <url>http://svn.sourceforge.net/viewcvs.cgi/java-link/</url> + </scm> +</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wel...@us...> - 2006-05-14 19:24:20
|
Revision: 7 Author: welterde0 Date: 2006-05-14 12:23:51 -0700 (Sun, 14 May 2006) ViewCVS: http://svn.sourceforge.net/java-link/?rev=7&view=rev Log Message: ----------- buildsystem update from ant to maven2: step2 updated some ll net things Modified Paths: -------------- trunk/client/pom.xml trunk/server/pom.xml trunk/share/nbproject/project.xml trunk/share/pom.xml trunk/share/src/main/java/org/jlink/net/ll/LLEvent.java trunk/templates/maven2/pom.xml Added Paths: ----------- trunk/share/src/main/java/org/jlink/net/ll/LLConfiguration.java trunk/share/src/main/java/org/jlink/net/ll/LLConfigurationException.java trunk/share/src/main/java/org/jlink/net/ll/LLFactory.java trunk/share/src/main/java/org/jlink/net/ll/LLServerConfiguration.java trunk/share/src/main/java/org/jlink/net/ll/LLServerConfigurationException.java trunk/share/src/main/java/org/jlink/net/ll/LLServerFactory.java Removed Paths: ------------- trunk/lib/ trunk/share/src/main/java/org/jlink/net/ll/LLNetworkInterface.java Modified: trunk/client/pom.xml =================================================================== --- trunk/client/pom.xml 2006-05-13 20:41:47 UTC (rev 6) +++ trunk/client/pom.xml 2006-05-14 19:23:51 UTC (rev 7) @@ -37,6 +37,16 @@ <version>1.0</version> </dependency> <dependency> + <groupId>saxpath</groupId> + <artifactId>saxpath</artifactId> + <version>1.0-FCS</version> + </dependency> + <dependency> + <groupId>jaxen</groupId> + <artifactId>jaxen</artifactId> + <version>1.0-FCS</version> + </dependency> + <dependency> <groupId>org.jvnet.swing-layout</groupId> <artifactId>core</artifactId> <version>1.0</version> @@ -59,6 +69,22 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <configuration> + <rulesets> + <ruleset>/rulesets/basic.xml</ruleset> + <ruleset>/rulesets/codesize.xml</ruleset> + <ruleset>/rulesets/coupling.xml</ruleset> + <ruleset>/rulesets/design.xml</ruleset>- + <ruleset>/rulesets/finalizers.xml</ruleset> + <ruleset>/rulesets/imports.xml</ruleset> + <ruleset>/rulesets/javabeans.xml</ruleset> + <ruleset>/rulesets/logging-java.xml</ruleset> + <ruleset>/rulesets/naming.xml</ruleset> + <ruleset>/rulesets/optimizations.xml</ruleset> + <ruleset>/rulesets/strictexception.xml</ruleset> + <ruleset>/rulesets/strings.xml</ruleset> + <ruleset>/rulesets/sunsecure.xml</ruleset> + <ruleset>/rulesets/unusedcode.xml</ruleset> + </rulesets> <linkXref>true</linkXref> <sourceEncoding>utf-8</sourceEncoding> <minimumTokens>100</minimumTokens> Modified: trunk/server/pom.xml =================================================================== --- trunk/server/pom.xml 2006-05-13 20:41:47 UTC (rev 6) +++ trunk/server/pom.xml 2006-05-14 19:23:51 UTC (rev 7) @@ -51,6 +51,23 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <configuration> + <rulesets> + <ruleset>/rulesets/basic.xml</ruleset> + <ruleset>/rulesets/braces.xml</ruleset> + <ruleset>/rulesets/codesize.xml</ruleset> + <ruleset>/rulesets/coupling.xml</ruleset> + <ruleset>/rulesets/design.xml</ruleset> + <ruleset>/rulesets/finalizers.xml</ruleset> + <ruleset>/rulesets/imports.xml</ruleset> + <ruleset>/rulesets/javabeans.xml</ruleset> + <ruleset>/rulesets/logging-java.xml</ruleset> + <ruleset>/rulesets/naming.xml</ruleset> + <ruleset>/rulesets/optimizations.xml</ruleset> + <ruleset>/rulesets/strictexception.xml</ruleset> + <ruleset>/rulesets/strings.xml</ruleset> + <ruleset>/rulesets/sunsecure.xml</ruleset> + <ruleset>/rulesets/unusedcode.xml</ruleset> + </rulesets> <linkXref>true</linkXref> <sourceEncoding>utf-8</sourceEncoding> <minimumTokens>100</minimumTokens> Modified: trunk/share/nbproject/project.xml =================================================================== --- trunk/share/nbproject/project.xml 2006-05-13 20:41:47 UTC (rev 6) +++ trunk/share/nbproject/project.xml 2006-05-14 19:23:51 UTC (rev 7) @@ -1,121 +1,134 @@ +<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://www.netbeans.org/ns/project/1"> - <type>org.netbeans.modules.ant.freeform</type> - <configuration> - <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> - <name>JLink Share</name> - <properties> - <property name="ant.script">nbproject/mavencall.xml</property> - <property-file>nbproject/project.properties</property-file> - </properties> - <folders> - <source-folder> - <label>src/main/java</label> - <type>java</type> - <location>src/main/java</location> - </source-folder> - <source-folder> - <label>src/test/java</label> - <type>java</type> - <location>src/test/java</location> - </source-folder> - </folders> - <ide-actions> - <action name="build"> - <script>${ant.script}</script> - <target>build</target> - </action> - <action name="clean"> - <script>${ant.script}</script> - <target>clean</target> - </action> - <action name="rebuild"> - <script>${ant.script}</script> - <target>clean</target> - <target>build</target> - </action> - <action name="javadoc"> - <script>${ant.script}</script> - <target>javadoc</target> - </action> - <action name="run"> - <script>${ant.script}</script> - <target>run</target> - </action> - <action name="test"> - <script>${ant.script}</script> - <target>test</target> - </action> - </ide-actions> - <view> - <items> - <source-file> - <label>pom</label> - <location>pom.xml</location> - </source-file> - <source-file> - <label>mavencall</label> - <location>nbproject/mavencall.xml</location> - </source-file> - <source-folder style="packages"> - <label>src/main/java</label> - <location>src/main/java</location> - </source-folder> - <source-folder style="packages"> - <label>src/test/java</label> - <location>src/test/java</location> - </source-folder> - <source-folder style="tree"> - <label>src/main/resources</label> - <location>src/main/resources</location> - </source-folder> - <source-folder style="tree"> - <label>src/test/resources</label> - <location>src/test/resources</location> - </source-folder> - <source-folder style="tree"> - <label>src/site</label> - <location>src/site</location> - </source-folder> - <source-folder style="tree"> - <label>target</label> - <location>target</location> - </source-folder> - </items> - <context-menu> - <action> - <script>${ant.script}</script> - <label>Refresh Project</label> - <target>refresh-project</target> - </action> - <ide-action name="build"/> - <ide-action name="clean"/> - <ide-action name="rebuild"/> - <ide-action name="javadoc"/> - <ide-action name="run"/> - <ide-action name="test"/> - <action> - <script>${ant.script}</script> - <label>Format Code</label> - <target>jalopy</target> - </action> - </context-menu> - </view> - <subprojects/> - </general-data> - <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2"> - <compilation-unit> - <package-root>src/main/java</package-root> - <classpath mode="compile">${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar</classpath> - <built-to>target/classes</built-to> - <source-level>1.4</source-level> - </compilation-unit> - <compilation-unit> - <package-root>src/test/java</package-root> - <unit-tests/> - <classpath mode="compile">target/classes:${local.repository}/junit/junit/3.8.1/junit-3.8.1.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar</classpath> - <built-to>target/test-classes</built-to> - <source-level>1.4</source-level> - </compilation-unit> - </java-data> - </configuration> -</project> \ No newline at end of file + <type>org.netbeans.modules.ant.freeform</type> + <configuration> + <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> + <name>JLink Share</name> + <properties> + <property name="ant.script">nbproject/mavencall.xml</property> + <property-file>nbproject/project.properties</property-file> + </properties> + <folders> + <source-folder> + <label>src/main/java</label> + <type>java</type> + <location>src/main/java</location> + </source-folder> + <source-folder> + <label>src/test/java</label> + <type>java</type> + <location>src/test/java</location> + </source-folder> + </folders> + <ide-actions> + <action name="build"> + <script>${ant.script}</script> + <target>build</target> + </action> + <action name="clean"> + <script>${ant.script}</script> + <target>clean</target> + </action> + <action name="rebuild"> + <script>${ant.script}</script> + <target>clean</target> + <target>build</target> + </action> + <action name="javadoc"> + <script>${ant.script}</script> + <target>javadoc</target> + </action> + <action name="run"> + <script>${ant.script}</script> + <target>run</target> + </action> + <action name="test"> + <script>${ant.script}</script> + <target>test</target> + </action> + </ide-actions> + <export> + <type>folder</type> + <location>target/classes</location> + <script>${ant.script}</script> + <build-target>build</build-target> + </export> + <export> + <type>folder</type> + <location>target/test-classes</location> + <script>${ant.script}</script> + <build-target>build</build-target> + </export> + <view> + <items> + <source-folder style="packages"> + <label>src/main/java</label> + <location>src/main/java</location> + </source-folder> + <source-folder style="packages"> + <label>src/test/java</label> + <location>src/test/java</location> + </source-folder> + <source-file> + <label>pom</label> + <location>pom.xml</location> + </source-file> + <source-file> + <label>mavencall</label> + <location>nbproject/mavencall.xml</location> + </source-file> + <source-folder style="tree"> + <label>src/main/resources</label> + <location>src/main/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/test/resources</label> + <location>src/test/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/site</label> + <location>src/site</location> + </source-folder> + <source-folder style="tree"> + <label>target</label> + <location>target</location> + </source-folder> + </items> + <context-menu> + <action> + <script>${ant.script}</script> + <label>Refresh Project</label> + <target>refresh-project</target> + </action> + <ide-action name="build"/> + <ide-action name="clean"/> + <ide-action name="rebuild"/> + <ide-action name="javadoc"/> + <ide-action name="run"/> + <ide-action name="test"/> + <action> + <script>${ant.script}</script> + <label>Format Code</label> + <target>jalopy</target> + </action> + </context-menu> + </view> + <subprojects/> + </general-data> + <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2"> + <compilation-unit> + <package-root>src/main/java</package-root> + <classpath mode="compile">${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar</classpath> + <built-to>target/classes</built-to> + <source-level>1.5</source-level> + </compilation-unit> + <compilation-unit> + <package-root>src/test/java</package-root> + <unit-tests/> + <classpath mode="compile">target/classes:${local.repository}/junit/junit/3.8.1/junit-3.8.1.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar</classpath> + <built-to>target/test-classes</built-to> + <source-level>1.5</source-level> + </compilation-unit> + </java-data> + </configuration> +</project> Modified: trunk/share/pom.xml =================================================================== --- trunk/share/pom.xml 2006-05-13 20:41:47 UTC (rev 6) +++ trunk/share/pom.xml 2006-05-14 19:23:51 UTC (rev 7) @@ -45,6 +45,23 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <configuration> + <rulesets> + <ruleset>/rulesets/basic.xml</ruleset> + <ruleset>/rulesets/braces.xml</ruleset> + <ruleset>/rulesets/codesize.xml</ruleset> + <ruleset>/rulesets/coupling.xml</ruleset> + <ruleset>/rulesets/design.xml</ruleset> + <ruleset>/rulesets/finalizers.xml</ruleset> + <ruleset>/rulesets/imports.xml</ruleset> + <ruleset>/rulesets/javabeans.xml</ruleset> + <ruleset>/rulesets/logging-java.xml</ruleset> + <ruleset>/rulesets/naming.xml</ruleset> + <ruleset>/rulesets/optimizations.xml</ruleset> + <ruleset>/rulesets/strictexception.xml</ruleset> + <ruleset>/rulesets/strings.xml</ruleset> + <ruleset>/rulesets/sunsecure.xml</ruleset> + <ruleset>/rulesets/unusedcode.xml</ruleset> + </rulesets> <linkXref>true</linkXref> <sourceEncoding>utf-8</sourceEncoding> <minimumTokens>100</minimumTokens> Added: trunk/share/src/main/java/org/jlink/net/ll/LLConfiguration.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/ll/LLConfiguration.java (rev 0) +++ trunk/share/src/main/java/org/jlink/net/ll/LLConfiguration.java 2006-05-14 19:23:51 UTC (rev 7) @@ -0,0 +1,40 @@ +/* + * LLConfiguration.java + * + * Created on 14. Mai 2006, 15:52 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.net.ll; + +import java.util.Locale; + +/** + * + * @author tassilo + */ +public interface LLConfiguration { + public String[] getNames(); + public String getDefault(int id); + public String getValue(int id); + public String getDescription(int id, Locale l); + public String getDescription(int id); + + public void setValue(int id, String val); +} Added: trunk/share/src/main/java/org/jlink/net/ll/LLConfigurationException.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/ll/LLConfigurationException.java (rev 0) +++ trunk/share/src/main/java/org/jlink/net/ll/LLConfigurationException.java 2006-05-14 19:23:51 UTC (rev 7) @@ -0,0 +1,46 @@ +/* + * LLConfigurationException.java + * + * Created on 14. Mai 2006, 16:04 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.net.ll; + +/** + * + * @author tassilo + */ +public class LLConfigurationException extends java.lang.Exception { + + /** + * Creates a new instance of <code>LLConfigurationException</code> without detail message. + */ + public LLConfigurationException() { + } + + + /** + * Constructs an instance of <code>LLConfigurationException</code> with the specified detail message. + * @param msg the detail message. + */ + public LLConfigurationException(String msg) { + super(msg); + } +} Modified: trunk/share/src/main/java/org/jlink/net/ll/LLEvent.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/ll/LLEvent.java 2006-05-13 20:41:47 UTC (rev 6) +++ trunk/share/src/main/java/org/jlink/net/ll/LLEvent.java 2006-05-14 19:23:51 UTC (rev 7) @@ -23,17 +23,83 @@ package org.jlink.net.ll; +import java.util.Map; +import java.util.HashMap; + /** * * @author tassilo */ public class LLEvent { + + /** Creates a new instance of LLEvent */ public LLEvent() { + super(); + reset(); } + //infos + public int getMsgClass() { + return this.msg_class; + } + public void setMsgClass(int c) { + this.msg_class = c; + } + public long getMsgID() { + return this.msg_id; + } + public void setMsgID(long id) { + this.msg_id = id; + } + public long getMsgReply() { + return this.msg_reply; + } + public void setMsgReply(long reply) { + this.msg_reply = reply; + } + //Payload + public int getInt() { + return this.pay_int; + } + public void setInt(int val) { + this.pay_int = val; + } + public Map getMap() { + if(this.pay_map == null) + this.pay_map = new HashMap<String, Object>(); + return this.pay_map; + } + public void setMap(Map m) { + this.pay_map = m; + } - private byte msg_class = 0; + //System + public void reset() { + this.msg_class = -1; + this.msg_id = -1; + this.msg_reply = -1; + if(this.pay_map != null) { + this.pay_map.clear(); + } + this.pay_int = -1; + } + public boolean validate() { + if(msg_class == -1) + return false; + if(msg_id == -1) + return false; + return true; + } + + //infos + private int msg_class = -1; + private long msg_id = -1; + private long msg_reply = -1; + + //Payload + private Map<String, Object> pay_map = null; + private int pay_int = -1; } Added: trunk/share/src/main/java/org/jlink/net/ll/LLFactory.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/ll/LLFactory.java (rev 0) +++ trunk/share/src/main/java/org/jlink/net/ll/LLFactory.java 2006-05-14 19:23:51 UTC (rev 7) @@ -0,0 +1,36 @@ +/* + * LLFactory.java + * + * Created on 14. Mai 2006, 15:50 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.net.ll; + +/** + * + * @author tassilo + */ +public interface LLFactory { + public LLConfiguration getConfig(); + public void setConfig(LLConfiguration conf) throws LLConfigurationException; + public void resetConfig(); + + public LLConnector create() throws LLConnectionException, LLConfigurationException; +} Deleted: trunk/share/src/main/java/org/jlink/net/ll/LLNetworkInterface.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/ll/LLNetworkInterface.java 2006-05-13 20:41:47 UTC (rev 6) +++ trunk/share/src/main/java/org/jlink/net/ll/LLNetworkInterface.java 2006-05-14 19:23:51 UTC (rev 7) @@ -1,32 +0,0 @@ -/* - * LLNetworkInterface.java - * - * Created on 21. März 2006, 21:55 - * - * JLink: An Introversion Uplink Clone with multiplayer support. - * Copyright (C) 2006 Tassilo Schweyer - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -package org.jlink.net.ll; - -/** - * - * @author tassilo - */ -public interface LLNetworkInterface { - -} Added: trunk/share/src/main/java/org/jlink/net/ll/LLServerConfiguration.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/ll/LLServerConfiguration.java (rev 0) +++ trunk/share/src/main/java/org/jlink/net/ll/LLServerConfiguration.java 2006-05-14 19:23:51 UTC (rev 7) @@ -0,0 +1,33 @@ +/* + * LLServerConfiguration.java + * + * Created on 14. Mai 2006, 16:09 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.net.ll; + +/** + * + * @author tassilo + */ +public interface LLServerConfiguration { + public String get(String key); + public void set(String key, String val); +} Added: trunk/share/src/main/java/org/jlink/net/ll/LLServerConfigurationException.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/ll/LLServerConfigurationException.java (rev 0) +++ trunk/share/src/main/java/org/jlink/net/ll/LLServerConfigurationException.java 2006-05-14 19:23:51 UTC (rev 7) @@ -0,0 +1,46 @@ +/* + * LLServerConfigurationException.java + * + * Created on 14. Mai 2006, 16:07 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.net.ll; + +/** + * + * @author tassilo + */ +public class LLServerConfigurationException extends java.lang.Exception { + + /** + * Creates a new instance of <code>LLServerConfigurationException</code> without detail message. + */ + public LLServerConfigurationException() { + } + + + /** + * Constructs an instance of <code>LLServerConfigurationException</code> with the specified detail message. + * @param msg the detail message. + */ + public LLServerConfigurationException(String msg) { + super(msg); + } +} Added: trunk/share/src/main/java/org/jlink/net/ll/LLServerFactory.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/ll/LLServerFactory.java (rev 0) +++ trunk/share/src/main/java/org/jlink/net/ll/LLServerFactory.java 2006-05-14 19:23:51 UTC (rev 7) @@ -0,0 +1,32 @@ +/* + * LLServerFactory.java + * + * Created on 14. Mai 2006, 16:02 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.net.ll; + +/** + * + * @author tassilo + */ +public interface LLServerFactory { + public LLServerConnector create(LLServerConfiguration conf) throws LLConnectionException, LLServerConfigurationException; +} Modified: trunk/templates/maven2/pom.xml =================================================================== --- trunk/templates/maven2/pom.xml 2006-05-13 20:41:47 UTC (rev 6) +++ trunk/templates/maven2/pom.xml 2006-05-14 19:23:51 UTC (rev 7) @@ -35,16 +35,29 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-pmd-plugin</artifactId> - <configuration> + <configuration> + <rulesets> + <ruleset>/rulesets/basic.xml</ruleset> + <ruleset>/rulesets/braces.xml</ruleset> + <ruleset>/rulesets/codesize.xml</ruleset> + <ruleset>/rulesets/coupling.xml</ruleset> + <ruleset>/rulesets/design.xml</ruleset> + <ruleset>/rulesets/finalizers.xml</ruleset> + <ruleset>/rulesets/imports.xml</ruleset> + <ruleset>/rulesets/javabeans.xml</ruleset> + <ruleset>/rulesets/logging-java.xml</ruleset> + <ruleset>/rulesets/naming.xml</ruleset> + <ruleset>/rulesets/optimizations.xml</ruleset> + <ruleset>/rulesets/strictexception.xml</ruleset> + <ruleset>/rulesets/strings.xml</ruleset> + <ruleset>/rulesets/sunsecure.xml</ruleset> + <ruleset>/rulesets/unusedcode.xml</ruleset> + </rulesets> <linkXref>true</linkXref> <sourceEncoding>utf-8</sourceEncoding> <minimumTokens>100</minimumTokens> <targetJdk>1.5</targetJdk> </configuration> - </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wel...@us...> - 2006-09-02 19:01:18
|
Revision: 9 http://svn.sourceforge.net/java-link/?rev=9&view=rev Author: welterde0 Date: 2006-09-02 11:54:25 -0700 (Sat, 02 Sep 2006) Log Message: ----------- added build file for unix(which installs ant and maven) and an ant buildfile(which may also work on windows) written some test case code added some Share::net::hl code added some Share::net::ll code written some Share::net::ll::xml code updated images and fonts updated world system added missing sflogo tags in the site code of share and server updated pom of client, share and server(all: removed root, tag; client: added compile scope to the deps(Bugfix) updated client nbproject updated laf code in client updated gui code in client Modified Paths: -------------- trunk/client/nbproject/project.xml trunk/client/pom.xml trunk/client/src/main/java/org/jlink/ClientFrontend.java trunk/server/pom.xml trunk/share/pom.xml trunk/share/src/main/java/org/jlink/net/hl/HLHandler.java trunk/share/src/main/java/org/jlink/net/hl/HLProtocol.java trunk/share/src/main/java/org/jlink/net/hl/HLRegistry.java trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConfiguration.java trunk/share/src/main/java/org/jlink/world/Session.java trunk/share/src/test/java/org/jlink/net/ll/LLEventTest.java trunk/templates/maven2/pom.xml Added Paths: ----------- trunk/build.xml trunk/build_unix.sh trunk/client/src/main/java/org/jlink/client/Core.java trunk/client/src/main/java/org/jlink/client/Main.java trunk/client/src/main/java/org/jlink/gui/net/ trunk/client/src/main/java/org/jlink/gui/net/ll/ trunk/client/src/main/java/org/jlink/gui/net/ll/ConfigurationWrapper.java trunk/server/src/site/ trunk/server/src/site/site.xml trunk/share/src/main/java/org/jlink/ControllerSupport.java trunk/share/src/main/java/org/jlink/net/hl/HLEvent.java trunk/share/src/main/java/org/jlink/net/hl/sys/ trunk/share/src/main/java/org/jlink/net/ll/LLProtocol.java trunk/share/src/main/java/org/jlink/net/ll/xml/XMLProtocol.java trunk/share/src/main/java/org/jlink/world/AvatarController.java trunk/share/src/main/resources/ trunk/share/src/main/resources/org/ trunk/share/src/main/resources/org/jlink/ trunk/share/src/main/resources/org/jlink/resources/ trunk/share/src/main/resources/org/jlink/resources/fonts/ trunk/share/src/main/resources/org/jlink/resources/fonts/battle3.ttf trunk/share/src/main/resources/org/jlink/resources/theme/ trunk/share/src/main/resources/org/jlink/resources/theme/account-register.png trunk/share/src/main/resources/org/jlink/resources/theme/system-change_server.png trunk/share/src/main/resources/org/jlink/resources/theme/system-exit.png trunk/share/src/site/ trunk/share/src/site/site.xml trunk/util/ trunk/util/apache-ant-1.6.5-bin.tar.bz2 trunk/util/maven-2.0.4-bin.tar.bz2 Removed Paths: ------------- trunk/client/src/main/java/org/jlink/client/gui/Colors.java trunk/client/src/main/java/org/jlink/client/gui/MenuBean.java trunk/client/src/main/java/org/jlink/gui/JInternalFrameFactory.java trunk/client/src/main/java/org/jlink/gui/laf/ trunk/share/src/main/java/org/jlink/resources/fonts/ trunk/share/src/main/java/org/jlink/resources/theme/ Added: trunk/build.xml =================================================================== --- trunk/build.xml (rev 0) +++ trunk/build.xml 2006-09-02 18:54:25 UTC (rev 9) @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * build.xml + * + * Created on 04. August 2006, 14:53 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +--> +<project name="jlink" default="default" basedir="."> + <!--Global--> + + <!--Targets--> + <target name="share"> + <exec executable="mvn" dir="share" output="share.build.log" failonerror="true"> + <arg value="compile"/> + </exec> + <exec executable="mvn" dir="share" output="share.build.log" failonerror="true"> + <arg value="install"/> + </exec> + </target> + + + + <target name="server" depends="share"> + <exec executable="mvn" dir="server" output="server.build.log"> + <arg value="compile"/> + </exec> + <exec executable="mvn" dir="server" output="server.build.log"> + <arg value="assembly:assembly"/> + </exec> + </target> + + <target name="client-deps" depends="share"> + <mkdir dir="tmp"/> + + <echo message="downloading dep client/lafplugin.jar"/> + <get src="http://dl.sourceforge.net/java-link/lafplugin-0.1.jar" dest="tmp/lafplugin.jar"/> + <echo message="installing it"/> + <exec executable="mvn"> + <arg line="install:install-file -DgroupId=org.jvnet -DartifactId=lafplugin -Dversion=0.1 -Dpackaging=jar -Dfile=tmp/lafplugin.jar"/> + </exec> + <echo message="[done]"/> + + <echo message="downloading dep client/nanoxml.jar"/> + <get src="http://dl.sourceforge.net/java-link/nanoxml_lite-2.2.3.jar" dest="tmp/nanoxml.jar"/> + </target> + + <target name="client" depends="client-deps"> + <exec executable="mvn" dir="client" output="client.build.log"> + <arg value="compile"/> + </exec> + <exec executable="mvn" dir="client" output="client.build.log"> + <arg value="assembly:assembly"/> + </exec> + </target> + + + + <target name="default" depends="client, server"> + + </target> +</project> Added: trunk/build_unix.sh =================================================================== --- trunk/build_unix.sh (rev 0) +++ trunk/build_unix.sh 2006-09-02 18:54:25 UTC (rev 9) @@ -0,0 +1,55 @@ +#!/bin/sh + +export MVN_VERSION=2.0.4 +export MVN_FILE=maven-$MVN_VERSION-bin.tar.bz2 + +export ANT_VERSION=1.6.5 +export ANT_FILE=apache-ant-$ANT_VERSION-bin.tar.bz2 +export ANT_HOME=`pwd`/util/apache-ant-$ANT_VERSION + +export PATH=`pwd`/util/maven-$MVN_VERSION/bin:`pwd`/util/apache-ant-$ANT_VERSION/bin:$PATH + +function fail_mvn() { + echo "couldnt find maven and couldnt install it" + exit 1 +} + +function install_mvn() { + tar -xjC util -f util/$MVN_FILE +} + +function check_mvn() { + echo "checking maven2...." + mvn -version &> /dev/null || install_mvn + mvn -version &> /dev/null || fail_mvn + set_color GREEN && echo "[ok]" && set_color NORMAL + #TODO add color and right positon +} + +function fail_ant() { + echo "couldnt find ant and couldnt install it" + exit 1 +} + +function install_ant() { + tar -xjC util -f util/$ANT_FILE +} + +function check_ant() { + echo "checking ant...." + ant -version &> /dev/null || install_ant + ant -version &> /dev/null || fail_ant + set_color GREEN && echo "[ok]" && set_color NORMAL + #TODO add color and right positon +} + + + + + + +##The main code +check_mvn +check_ant + +ant Property changes on: trunk/build_unix.sh ___________________________________________________________________ Name: svn:executable + * Modified: trunk/client/nbproject/project.xml =================================================================== --- trunk/client/nbproject/project.xml 2006-05-15 18:34:32 UTC (rev 8) +++ trunk/client/nbproject/project.xml 2006-09-02 18:54:25 UTC (rev 9) @@ -1,121 +1,134 @@ +<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://www.netbeans.org/ns/project/1"> - <type>org.netbeans.modules.ant.freeform</type> - <configuration> - <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> - <name>JLink Client</name> - <properties> - <property name="ant.script">nbproject/mavencall.xml</property> - <property-file>nbproject/project.properties</property-file> - </properties> - <folders> - <source-folder> - <label>src/main/java</label> - <type>java</type> - <location>src/main/java</location> - </source-folder> - <source-folder> - <label>src/test/java</label> - <type>java</type> - <location>src/test/java</location> - </source-folder> - </folders> - <ide-actions> - <action name="build"> - <script>${ant.script}</script> - <target>build</target> - </action> - <action name="clean"> - <script>${ant.script}</script> - <target>clean</target> - </action> - <action name="rebuild"> - <script>${ant.script}</script> - <target>clean</target> - <target>build</target> - </action> - <action name="javadoc"> - <script>${ant.script}</script> - <target>javadoc</target> - </action> - <action name="run"> - <script>${ant.script}</script> - <target>run</target> - </action> - <action name="test"> - <script>${ant.script}</script> - <target>test</target> - </action> - </ide-actions> - <view> - <items> - <source-file> - <label>pom</label> - <location>pom.xml</location> - </source-file> - <source-file> - <label>mavencall</label> - <location>nbproject/mavencall.xml</location> - </source-file> - <source-folder style="packages"> - <label>src/main/java</label> - <location>src/main/java</location> - </source-folder> - <source-folder style="packages"> - <label>src/test/java</label> - <location>src/test/java</location> - </source-folder> - <source-folder style="tree"> - <label>src/main/resources</label> - <location>src/main/resources</location> - </source-folder> - <source-folder style="tree"> - <label>src/test/resources</label> - <location>src/test/resources</location> - </source-folder> - <source-folder style="tree"> - <label>src/site</label> - <location>src/site</location> - </source-folder> - <source-folder style="tree"> - <label>target</label> - <location>target</location> - </source-folder> - </items> - <context-menu> - <action> - <script>${ant.script}</script> - <label>Refresh Project</label> - <target>refresh-project</target> - </action> - <ide-action name="build"/> - <ide-action name="clean"/> - <ide-action name="rebuild"/> - <ide-action name="javadoc"/> - <ide-action name="run"/> - <ide-action name="test"/> - <action> - <script>${ant.script}</script> - <label>Format Code</label> - <target>jalopy</target> - </action> - </context-menu> - </view> - <subprojects/> - </general-data> - <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2"> - <compilation-unit> - <package-root>src/main/java</package-root> - <classpath mode="compile">${local.repository}/org/jvnet/substance/core/2.2.02/core-2.2.02.jar:${local.repository}/jdom/jdom/1.0/jdom-1.0.jar:${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/org/jvnet/swing-layout/core/1.0/core-1.0.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar</classpath> - <built-to>target/classes</built-to> - <source-level>1.4</source-level> - </compilation-unit> - <compilation-unit> - <package-root>src/test/java</package-root> - <unit-tests/> - <classpath mode="compile">target/classes:${local.repository}/org/jvnet/substance/core/2.2.02/core-2.2.02.jar:${local.repository}/junit/junit/3.8.1/junit-3.8.1.jar:${local.repository}/jdom/jdom/1.0/jdom-1.0.jar:${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/org/jvnet/swing-layout/core/1.0/core-1.0.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar</classpath> - <built-to>target/test-classes</built-to> - <source-level>1.4</source-level> - </compilation-unit> - </java-data> - </configuration> -</project> \ No newline at end of file + <type>org.netbeans.modules.ant.freeform</type> + <configuration> + <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> + <name>JLink Client</name> + <properties> + <property name="ant.script">nbproject/mavencall.xml</property> + <property-file>nbproject/project.properties</property-file> + </properties> + <folders> + <source-folder> + <label>src/main/java</label> + <type>java</type> + <location>src/main/java</location> + </source-folder> + <source-folder> + <label>src/test/java</label> + <type>java</type> + <location>src/test/java</location> + </source-folder> + </folders> + <ide-actions> + <action name="build"> + <script>${ant.script}</script> + <target>build</target> + </action> + <action name="clean"> + <script>${ant.script}</script> + <target>clean</target> + </action> + <action name="rebuild"> + <script>${ant.script}</script> + <target>clean</target> + <target>build</target> + </action> + <action name="javadoc"> + <script>${ant.script}</script> + <target>javadoc</target> + </action> + <action name="run"> + <script>${ant.script}</script> + <target>run</target> + </action> + <action name="test"> + <script>${ant.script}</script> + <target>test</target> + </action> + </ide-actions> + <export> + <type>folder</type> + <location>target/classes</location> + <script>${ant.script}</script> + <build-target>build</build-target> + </export> + <export> + <type>folder</type> + <location>target/test-classes</location> + <script>${ant.script}</script> + <build-target>build</build-target> + </export> + <view> + <items> + <source-folder style="packages"> + <label>src/main/java</label> + <location>src/main/java</location> + </source-folder> + <source-folder style="packages"> + <label>src/test/java</label> + <location>src/test/java</location> + </source-folder> + <source-file> + <label>pom</label> + <location>pom.xml</location> + </source-file> + <source-file> + <label>mavencall</label> + <location>nbproject/mavencall.xml</location> + </source-file> + <source-folder style="tree"> + <label>src/main/resources</label> + <location>src/main/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/test/resources</label> + <location>src/test/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/site</label> + <location>src/site</location> + </source-folder> + <source-folder style="tree"> + <label>target</label> + <location>target</location> + </source-folder> + </items> + <context-menu> + <action> + <script>${ant.script}</script> + <label>Refresh Project</label> + <target>refresh-project</target> + </action> + <ide-action name="build"/> + <ide-action name="clean"/> + <ide-action name="rebuild"/> + <ide-action name="javadoc"/> + <ide-action name="run"/> + <ide-action name="test"/> + <action> + <script>${ant.script}</script> + <label>Format Code</label> + <target>jalopy</target> + </action> + </context-menu> + </view> + <subprojects/> + </general-data> + <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2"> + <compilation-unit> + <package-root>src/main/java</package-root> + <classpath mode="compile">${local.repository}/org/jvnet/substance/core/2.2.02/core-2.2.02.jar:${local.repository}/jdom/jdom/1.0/jdom-1.0.jar:${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/org/jvnet/swing-layout/core/1.0/core-1.0.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar</classpath> + <built-to>target/classes</built-to> + <source-level>1.5</source-level> + </compilation-unit> + <compilation-unit> + <package-root>src/test/java</package-root> + <unit-tests/> + <classpath mode="compile">target/classes:${local.repository}/org/jvnet/substance/core/2.2.02/core-2.2.02.jar:${local.repository}/junit/junit/3.8.1/junit-3.8.1.jar:${local.repository}/jdom/jdom/1.0/jdom-1.0.jar:${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/org/jvnet/swing-layout/core/1.0/core-1.0.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar</classpath> + <built-to>target/test-classes</built-to> + <source-level>1.5</source-level> + </compilation-unit> + </java-data> + </configuration> +</project> Modified: trunk/client/pom.xml =================================================================== --- trunk/client/pom.xml 2006-05-15 18:34:32 UTC (rev 8) +++ trunk/client/pom.xml 2006-09-02 18:54:25 UTC (rev 9) @@ -2,11 +2,6 @@ <!--//////////////////////////////////////// /////////////General//////////////////// /////////////////////////////////////--> - <parent> - <artifactId>yamd-root</artifactId> - <groupId>org.welterde.yamd</groupId> - <version>0.0.1-SNAPSHOT</version> - </parent> <modelVersion>4.0.0</modelVersion> <groupId>org.jlink</groupId> <artifactId>client</artifactId> @@ -25,31 +20,37 @@ <groupId>org.jlink</groupId> <artifactId>share</artifactId> <version>0.0.1-SNAPSHOT</version> + <scope>compile</scope> </dependency> <dependency> <groupId>org.jvnet.substance</groupId> <artifactId>core</artifactId> <version>2.2.02</version> + <scope>compile</scope> </dependency> <dependency> <groupId>jdom</groupId> <artifactId>jdom</artifactId> <version>1.0</version> + <scope>compile</scope> </dependency> <dependency> <groupId>saxpath</groupId> <artifactId>saxpath</artifactId> <version>1.0-FCS</version> + <scope>compile</scope> </dependency> <dependency> <groupId>jaxen</groupId> <artifactId>jaxen</artifactId> <version>1.0-FCS</version> + <scope>compile</scope> </dependency> <dependency> <groupId>org.jvnet.swing-layout</groupId> <artifactId>core</artifactId> <version>1.0</version> + <scope>compile</scope> </dependency> </dependencies> <!--//////////////////////////////////////// Modified: trunk/client/src/main/java/org/jlink/ClientFrontend.java =================================================================== --- trunk/client/src/main/java/org/jlink/ClientFrontend.java 2006-05-15 18:34:32 UTC (rev 8) +++ trunk/client/src/main/java/org/jlink/ClientFrontend.java 2006-09-02 18:54:25 UTC (rev 9) @@ -32,8 +32,6 @@ import org.jlink.client.frontend.menu.MainMenuListener; import org.jlink.client.frontend.theme.ThemeManager; import org.jlink.client.frontend.theme.Theme; -//import::own::gui -import org.jlink.client.gui.MenuBean; //import::sys //import::sys::io import java.io.File; Added: trunk/client/src/main/java/org/jlink/client/Core.java =================================================================== --- trunk/client/src/main/java/org/jlink/client/Core.java (rev 0) +++ trunk/client/src/main/java/org/jlink/client/Core.java 2006-09-02 18:54:25 UTC (rev 9) @@ -0,0 +1,93 @@ +/* + * Core.java + * + * Created on 1. Juni 2006, 16:29 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.client; + +import org.jlink.Controller; +import org.jlink.ControllerSupport; + +/** + * + * @author tassilo + */ +public class Core implements Controller { + + /** Creates a new instance of Core */ + public Core() { + } + + public void init() { + } + + public void start() { + if(!this.statInit) + this.init(); + this.statRun = true; + this.run(); + } + + public void join() { + synchronized(this.callStop) { + try { + this.callStop.wait(); + } catch(InterruptedException exc) { + + } + } + } + + private void run() { + if(!this.statRun) + this.start(); + while(!this.doStop) { + try { + + + Thread.sleep(100); + } catch(InterruptedException exc) { + + } finally { + + } + } + //wake up all threads in join() + synchronized(this.callStop) { + this.callStop.notifyAll(); + } + } + + public void stop() { + this.doStop = true; + } + + public void destroy() { + } + + + private boolean doStop = false; + + private boolean statInit = false; + private boolean statRun = false; + + private Object callStop = new Object();//lock +} Added: trunk/client/src/main/java/org/jlink/client/Main.java =================================================================== --- trunk/client/src/main/java/org/jlink/client/Main.java (rev 0) +++ trunk/client/src/main/java/org/jlink/client/Main.java 2006-09-02 18:54:25 UTC (rev 9) @@ -0,0 +1,43 @@ +/* + * Main.java + * + * Created on 27. Mai 2006, 17:19 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.client; + +/** + * + * @author tassilo + */ +public class Main { + + /** Creates a new instance of Main */ + public Main() { + } + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + // TODO code application logic here + } + +} Deleted: trunk/client/src/main/java/org/jlink/client/gui/Colors.java =================================================================== --- trunk/client/src/main/java/org/jlink/client/gui/Colors.java 2006-05-15 18:34:32 UTC (rev 8) +++ trunk/client/src/main/java/org/jlink/client/gui/Colors.java 2006-09-02 18:54:25 UTC (rev 9) @@ -1,40 +0,0 @@ -/* - * Colors.java - * - * Created on 19. Februar 2006, 20:45 - * - * JLink: An Introversion Uplink Clone with multiplayer support. - * Copyright (C) 2006 Tassilo Schweyer - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -package org.jlink.client.gui; - -//import::sys -//import::sys::awt -import java.awt.Color; - -/** - * - * @author tassilo - */ -public class Colors { - private Colors() { - } - - public static final Color MAIN_MENU_BACKGROUND = Color.WHITE; - -} Deleted: trunk/client/src/main/java/org/jlink/client/gui/MenuBean.java =================================================================== --- trunk/client/src/main/java/org/jlink/client/gui/MenuBean.java 2006-05-15 18:34:32 UTC (rev 8) +++ trunk/client/src/main/java/org/jlink/client/gui/MenuBean.java 2006-09-02 18:54:25 UTC (rev 9) @@ -1,131 +0,0 @@ -/* - * MenuBean.java - * - * Created on 27. Februar 2006, 14:47 - * - * JLink: An Introversion Uplink Clone with multiplayer support. - * Copyright (C) 2006 Tassilo Schweyer - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -package org.jlink.client.gui; - -//import -//import::sys -//import::sys::awt -import java.awt.Color; -import java.awt.event.ActionListener; -//import::sys::swing -import javax.swing.JComponent; -import javax.swing.JButton; -import javax.swing.Icon; -//import::sys::util -import java.util.Map; -import java.util.HashMap; -//import::sys::log4j -import org.apache.log4j.Logger; - - - -/** - * - * @author tassilo - */ -public class MenuBean { - - /** Creates a new instance of MenuBean */ - public MenuBean(double mx, double my) { - this.c = new JComponent(){}; - this.c.setVisible(true); - this.db_buttons = new HashMap<String, JButton>(); - - this.mx = mx; - this.my = my; - } - public JComponent getComponent() { - return this.c; - } - - /////////////////////// - ////Core Operations//// - /////////////////////// - //Buttons - public void addButton(String id, Icon ico, int x, int y, int w, int h, String tooltip) { - Logger log = Logger.getLogger("jlink.gui.beans.menu"); - log.debug("addButton(...) called id=" + id); - JButton b = new JButton(ico); - b.setActionCommand(id); - log.debug("calculating"); - int x0 = (int) (x * mx); - log.debug("x, pre=" + x + ", suf=" + x0); - int x1 = (int) (w * mx); - log.debug("w pre=" + w + ", suf=" + x1); - int y0 = (int) (y * my); - log.debug("y pre=" + y + ", suf=" + y0); - int y1 = (int) (h * my); - log.debug("h pre=" + h + ", suf="+ y1); - b.setBounds(x0, y0, x1, y1); - b.setToolTipText(tooltip); - this.c.add(b); - this.c.validate(); - this.c.repaint(); - this.db_buttons.put(id, b); - // TODO: write remove Methode , on demand - } - - public void addButtonListener(String id, ActionListener l) { - JButton b = this.db_buttons.get(id); - b.addActionListener(l); - } - - //Style - public void setBGColor(Color c) { - this.c.setBackground(c); - this.c.repaint(); - this.c_bg = c; - } - - - - - - - - - - - - - - - - - - - - - - - - - - //Variables - private JComponent c = null; - private Color c_bg = Color.WHITE; - private Map<String, JButton> db_buttons = null; - private double mx = 1; - private double my = 1; -} Deleted: trunk/client/src/main/java/org/jlink/gui/JInternalFrameFactory.java =================================================================== --- trunk/client/src/main/java/org/jlink/gui/JInternalFrameFactory.java 2006-05-15 18:34:32 UTC (rev 8) +++ trunk/client/src/main/java/org/jlink/gui/JInternalFrameFactory.java 2006-09-02 18:54:25 UTC (rev 9) @@ -1,47 +0,0 @@ -/* - * JInternalFrameFactory.java - * - * Created on 23. März 2006, 21:51 - * - * JLink: An Introversion Uplink Clone with multiplayer support. - * Copyright (C) 2006 Tassilo Schweyer - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -package org.jlink.gui; - -import javax.swing.JInternalFrame; -import javax.swing.JPopupMenu; -import javax.swing.JComponent; -import javax.swing.plaf.basic.BasicInternalFrameUI; - -/** - * - * @author tassilo - */ -public class JInternalFrameFactory { - - public static void addPUMenuToIFrame(JInternalFrame f, JPopupMenu m) { - JComponent c = ((BasicInternalFrameUI) f.getUI()).getNorthPane(); - c.setComponentPopupMenu(m); - - } - - - - private JInternalFrameFactory() { - } -} Added: trunk/client/src/main/java/org/jlink/gui/net/ll/ConfigurationWrapper.java =================================================================== --- trunk/client/src/main/java/org/jlink/gui/net/ll/ConfigurationWrapper.java (rev 0) +++ trunk/client/src/main/java/org/jlink/gui/net/ll/ConfigurationWrapper.java 2006-09-02 18:54:25 UTC (rev 9) @@ -0,0 +1,57 @@ +/* + * ConfigurationWrapper.java + * + * Created on 27. Mai 2006, 14:12 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.gui.net.ll; + +//import +//import::own +import org.jlink.net.ll.LLConfiguration; +//import::sys +import javax.swing.JPanel; + + +/** + * + * @author tassilo + */ +public class ConfigurationWrapper { + public static ConfigurationWrapper create(LLConfiguration conf) { + + //TODO: write creation code + return null; + } + public LLConfiguration getConfig() { + return this.data_conf; + } + + + + + + + /** Creates a new instance of ConfigurationWrapper */ + private ConfigurationWrapper() { + } + + private LLConfiguration data_conf = null; +} Modified: trunk/server/pom.xml =================================================================== --- trunk/server/pom.xml 2006-05-15 18:34:32 UTC (rev 8) +++ trunk/server/pom.xml 2006-09-02 18:54:25 UTC (rev 9) @@ -2,11 +2,6 @@ <!--//////////////////////////////////////// /////////////General//////////////////// /////////////////////////////////////--> - <parent> - <artifactId>yamd-root</artifactId> - <groupId>org.welterde.yamd</groupId> - <version>0.0.1-SNAPSHOT</version> - </parent> <modelVersion>4.0.0</modelVersion> <groupId>org.jlink</groupId> <artifactId>server</artifactId> Added: trunk/server/src/site/site.xml =================================================================== --- trunk/server/src/site/site.xml (rev 0) +++ trunk/server/src/site/site.xml 2006-09-02 18:54:25 UTC (rev 9) @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<project name="JLink Client"> + <bannerRight> + <src>http://sflogo.sourceforge.net/sflogo.php?group_id=162264&type=3</src> + </bannerRight> + <body> + ${reports} + </body> +</project> Modified: trunk/share/pom.xml =================================================================== --- trunk/share/pom.xml 2006-05-15 18:34:32 UTC (rev 8) +++ trunk/share/pom.xml 2006-09-02 18:54:25 UTC (rev 9) @@ -2,11 +2,6 @@ <!--//////////////////////////////////////// /////////////General//////////////////// /////////////////////////////////////--> - <parent> - <artifactId>yamd-root</artifactId> - <groupId>org.welterde.yamd</groupId> - <version>0.0.1-SNAPSHOT</version> - </parent> <modelVersion>4.0.0</modelVersion> <groupId>org.jlink</groupId> <artifactId>share</artifactId> Added: trunk/share/src/main/java/org/jlink/ControllerSupport.java =================================================================== --- trunk/share/src/main/java/org/jlink/ControllerSupport.java (rev 0) +++ trunk/share/src/main/java/org/jlink/ControllerSupport.java 2006-09-02 18:54:25 UTC (rev 9) @@ -0,0 +1,79 @@ +/* + * ControllerSupport.java + * + * Created on 1. Juni 2006, 16:29 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink; + +/** + * + * @author tassilo + */ +public class ControllerSupport implements Controller { + + /** Creates a new instance of ControllerSupport */ + public ControllerSupport() { + } + + public void init() { + if(this.valid) + ;//TODO: exception + this.valid = true; + } + + public void start() { + if(this.running) + ;//TODO: exception + this.running = true; + } + + public void join() { + synchronized(this.obj) { + try { + this.obj.wait(); + } catch(InterruptedException e) { + + } + } + } + + public void stop() { + if(!this.running) + ;//TODO: exception + this.running = false; + synchronized(this.obj) { + this.obj.notify(); + } + } + + public void destroy() { + if(!this.valid) + ;//TODO: exception + if(this.running) + ;//TODO: exception + this.valid = false; + } + + + private boolean valid = false; + private boolean running = false; + private Object obj = "sadfsd"; +} Added: trunk/share/src/main/java/org/jlink/net/hl/HLEvent.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/hl/HLEvent.java (rev 0) +++ trunk/share/src/main/java/org/jlink/net/hl/HLEvent.java 2006-09-02 18:54:25 UTC (rev 9) @@ -0,0 +1,32 @@ +/* + * HLEvent.java + * + * Created on 27. Mai 2006, 12:41 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.net.hl; + +/** + * + * @author tassilo + */ +public interface HLEvent { + +} Modified: trunk/share/src/main/java/org/jlink/net/hl/HLHandler.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/hl/HLHandler.java 2006-05-15 18:34:32 UTC (rev 8) +++ trunk/share/src/main/java/org/jlink/net/hl/HLHandler.java 2006-09-02 18:54:25 UTC (rev 9) @@ -23,10 +23,17 @@ package org.jlink.net.hl; +import org.jlink.net.ll.LLEvent; + /** * * @author tassilo */ public interface HLHandler { + public LLEvent encode(HLEvent evt); + public HLEvent decode(LLEvent evt); + public boolean handles(LLEvent evt); + public boolean handles(HLEvent evt); + public HLHandler getParent(); } Modified: trunk/share/src/main/java/org/jlink/net/hl/HLProtocol.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/hl/HLProtocol.java 2006-05-15 18:34:32 UTC (rev 8) +++ trunk/share/src/main/java/org/jlink/net/hl/HLProtocol.java 2006-09-02 18:54:25 UTC (rev 9) @@ -23,6 +23,8 @@ package org.jlink.net.hl; +import org.jlink.net.ll.LLEvent; + /** * * @author tassilo Modified: trunk/share/src/main/java/org/jlink/net/hl/HLRegistry.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/hl/HLRegistry.java 2006-05-15 18:34:32 UTC (rev 8) +++ trunk/share/src/main/java/org/jlink/net/hl/HLRegistry.java 2006-09-02 18:54:25 UTC (rev 9) @@ -33,4 +33,6 @@ public HLRegistry() { } + + } Added: trunk/share/src/main/java/org/jlink/net/ll/LLProtocol.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/ll/LLProtocol.java (rev 0) +++ trunk/share/src/main/java/org/jlink/net/ll/LLProtocol.java 2006-09-02 18:54:25 UTC (rev 9) @@ -0,0 +1,34 @@ +/* + * LLProtocol.java + * + * Created on 27. Mai 2006, 13:02 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.net.ll; + +/** + * + * @author tassilo + */ +public interface LLProtocol { + public LLFactory createClient(); + + public LLServerFactory createServer(); +} Modified: trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConfiguration.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConfiguration.java 2006-05-15 18:34:32 UTC (rev 8) +++ trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConfiguration.java 2006-09-02 18:54:25 UTC (rev 9) @@ -37,26 +37,45 @@ } public String[] getNames() { - return null; + return this.dat_names; } public String getDefault(int id) { - return null; + return this.dat_default[id]; } public String getValue(int id) { - return null; + return this.dat_values[id]; } - public String getDescription(int id, Locale l) { - return null; + public String getDescription(int id, final Locale l) { + return this.getDescription(id); } public String getDescription(int id) { - return null; + return this.dat_descs[id]; } public void setValue(int id, String val) { + this.dat_values[id] = val; } + + + private String[] dat_names = new String[] { + "Host", + "Port", + "compress" + }; + private String[] dat_default = new String[] { + "localhost", + "4236", + "true" + }; + private String[] dat_values = new String[3]; + private String[] dat_descs = new String[] { + "The Hostname of the remote host", + "The Port of the remote host", + "Should the Data be compressed(true/false)" + }; } Added: trunk/share/src/main/java/org/jlink/net/ll/xml/XMLProtocol.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/ll/xml/XMLProtocol.java (rev 0) +++ trunk/share/src/main/java/org/jlink/net/ll/xml/XMLProtocol.java 2006-09-02 18:54:25 UTC (rev 9) @@ -0,0 +1,48 @@ +/* + * XMLProtocol.java + * + * Created on 27. Mai 2006, 13:05 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.net.ll.xml; + +import org.jlink.net.ll.LLFactory; +import org.jlink.net.ll.LLProtocol; +import org.jlink.net.ll.LLServerFactory; + +/** + * + * @author tassilo + */ +public class XMLProtocol implements LLProtocol { + + /** Creates a new instance of XMLProtocol */ + public XMLProtocol() { + } + + public LLFactory createClient() { + return new XMLFactory(); + } + + public LLServerFactory createServer() { + return null; + } + +} Added: trunk/share/src/main/java/org/jlink/world/AvatarController.java =================================================================== --- trunk/share/src/main/java/org/jlink/world/AvatarController.java (rev 0) +++ trunk/share/src/main/java/org/jlink/world/AvatarController.java 2006-09-02 18:54:25 UTC (rev 9) @@ -0,0 +1,35 @@ +/* + * AvatarController.java + * + * Created on 25. Juni 2006, 15:13 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.world; + +/** + * + * @author tassilo + */ +public interface AvatarController { + public Avatar get(String name) throws SessionException; + public Avatar[] list() throws SessionException; + public Avatar create(String name) throws SessionException; + public void delete(String name) throws SessionException; +} Modified: trunk/share/src/main/java/org/jlink/world/Session.java =================================================================== --- trunk/share/src/main/java/org/jlink/world/Session.java 2006-05-15 18:34:32 UTC (rev 8) +++ trunk/share/src/main/java/org/jlink/world/Session.java 2006-09-02 18:54:25 UTC (rev 9) @@ -37,4 +37,8 @@ public Avatar[] avatarList() throws SessionException; public Avatar avatarCreate(String name) throws SessionException; public void avatarDelete(String name) throws SessionException; + + //lookup + public Object lookup(String name); + public Object lookup(Class c); } Added: trunk/share/src/main/resources/org/jlink/resources/fonts/battle3.ttf =================================================================== (Binary files differ) Property changes on: trunk/share/src/main/resources/org/jlink/resources/fonts/battle3.ttf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/share/src/main/resources/org/jlink/resources/theme/account-register.png =================================================================== (Binary files differ) Property changes on: trunk/share/src/main/resources/org/jlink/resources/theme/account-register.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/share/src/main/resources/org/jlink/resources/theme/system-change_server.png =================================================================== (Binary files differ) Property changes on: trunk/share/src/main/resources/org/jlink/resources/theme/system-change_server.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/share/src/main/resources/org/jlink/resources/theme/system-exit.png =================================================================== (Binary files differ) Property changes on: trunk/share/src/main/resources/org/jlink/resources/theme/system-exit.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/share/src/site/site.xml =================================================================== --- trunk/share/src/site/site.xml (rev 0) +++ trunk/share/src/site/site.xml 2006-09-02 18:54:25 UTC (rev 9) @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<project name="JLink Client"> + <bannerRight> + <src>http://sflogo.sourceforge.net/sflogo.php?group_id=162264&type=3</src> + </bannerRight> + <body> + ${reports} + </body> +</project> Modified: trunk/share/src/test/java/org/jlink/net/ll/LLEventTest.java =================================================================== --- trunk/share/src/test/java/org/jlink/net/ll/LLEventTest.java 2006-05-15 18:34:32 UTC (rev 8) +++ trunk/share/src/test/java/org/jlink/net/ll/LLEventTest.java 2006-09-02 18:54:25 UTC (rev 9) @@ -41,12 +41,9 @@ LLEvent instance = new LLEvent(); - int expResult = 0; + int expResult = -1; int result = instance.getMsgClass(); assertEquals(expResult, result); - - // TODO review the generated test code and remove the default call to fail. - fail("The test case is a prototype."); } /** @@ -59,9 +56,7 @@ LLEvent instance = new LLEvent(); instance.setMsgClass(c); - - // TODO review the generated test code and remove the default call to fail. - fail("The test case is a prototype."); + assertEquals(c, instance.getMsgClass()); } /** @@ -72,12 +67,9 @@ LLEvent instance = new LLEvent(); - long expResult = 0L; + long expResult = -1L; long result = instance.getMsgID(); assertEquals(expResult, result); - - // TODO review the generated test code and remove the default call to fail. - fail("The test case is a prototype."); } /** @@ -90,9 +82,13 @@ LLEvent instance = new LLEvent(); instance.setMsgID(id); - - // TODO review the generated test code and remove the default call to fail. - fail("The test case is a prototype."); + assertEquals(id, instance.getMsgID()); + id = 1L; + instance.setMsgID(id); + assertEquals(id, instance.getMsgID()); + id = -1L; + instance.setMsgID(id); + assertEquals(id, instance.getMsgID()); } /** @@ -103,12 +99,9 @@ LLEvent instance = new LLEvent(); - long expResult = 0L; + long expResult = -1L; long result = instance.getMsgReply(); assertEquals(expResult, result); - - // TODO review the generated test code and remove the default call to fail. - fail("The test case is a prototype."); } /** @@ -121,9 +114,13 @@ LLEvent instance = new LLEvent(); instance.setMsgReply(reply); - - // TODO review the generated test code and remove the default call to fail. - fail("The test case is a prototype."); + assertEquals(reply, instance.getMsgReply()); + reply = 1L; + instance.setMsgReply(reply); + assertEquals(reply, instance.getMsgReply()); + reply = -1L; + instance.setMsgReply(reply); + assertEquals(reply, instance.getMsgReply()); } /** @@ -149,14 +146,12 @@ */ public void testSetInt() { System.out.println("setInt"); - - int val = 0; LLEvent instance = new LLEvent(); - instance.setInt(val); - - // TODO review the generated test code and remove the default call to fail. - fail("The test case is a prototype."); + instance.setInt(1); + assertEquals(1, instance.getInt()); + instance.setInt(-1); + assertEquals(-1, instance.getInt()); } /** @@ -166,28 +161,22 @@ System.out.println("getMap"); LLEvent instance = new LLEvent(); - - Map expResult = null; - Map result = instance.getMap(); - assertEquals(expResult, result); - - // TODO review the generated test code and remove the default call to fail. - fail("The test case is a prototype."); + Map r1 = instance.getMap(); + assertNotNull(r1); + Map r2 = instance.getMap(); + assertEquals(r1, r2); } - /** * Test of setMap method, of class org.jlink.net.ll.LLEvent. */ public void testSetMap() { System.out.println("setMap"); - Map m = null; + Map m = new HashMap(); LLEvent instance = new LLEvent(); instance.setMap(m); - - // TODO review the generated test code and remove the default call to fail. - fail("The test case is a prototype."); + assertEquals(m, instance.getMap()); } /** Modified: trunk/templates/maven2/pom.xml =================================================================== --- trunk/templates/maven2/pom.xml 2006-05-15 18:34:32 UTC (rev 8) +++ trunk/templates/maven2/pom.xml 2006-09-02 18:54:25 UTC (rev 9) @@ -2,11 +2,6 @@ <!--//////////////////////////////////////// /////////////General//////////////////// /////////////////////////////////////--> - <parent> - <artifactId>yamd-root</artifactId> - <groupId>org.welterde.yamd</groupId> - <version>0.0.1-SNAPSHOT</version> - </parent> <modelVersion>4.0.0</modelVersion> <groupId>org.jlink</groupId> <artifactId>${name}</artifactId> Added: trunk/util/apache-ant-1.6.5-bin.tar.bz2 =================================================================== (Binary files differ) Property changes on: trunk/util/apache-ant-1.6.5-bin.tar.bz2 ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/util/maven-2.0.4-bin.tar.bz2 =================================================================== (Binary files differ) Property changes on: trunk/util/maven-2.0.4-bin.tar.bz2 ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wel...@us...> - 2006-10-07 21:28:32
|
Revision: 10 http://svn.sourceforge.net/java-link/?rev=10&view=rev Author: welterde0 Date: 2006-10-07 14:28:11 -0700 (Sat, 07 Oct 2006) Log Message: ----------- build(X/nbproject/build.xml): updated build scripts to backup themselfs before mvn update is run added link to nbproject/project.properties file with default setting for maven added link to nbproject/private/private.properties file for your own setting of maven path build(build.xml): added support for mirrors(actually just one heanet) added libs for share(jfunutil) added libs for client(swing-layout.jar, substance) config(X/pom.xml) fixed svn URL fixed server maven site config Modified Paths: -------------- trunk/build.xml trunk/client/nbproject/mavencall.xml trunk/client/pom.xml trunk/server/nbproject/mavencall.xml trunk/server/pom.xml trunk/share/nbproject/mavencall.xml trunk/share/pom.xml Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2006-09-02 18:54:25 UTC (rev 9) +++ trunk/build.xml 2006-10-07 21:28:11 UTC (rev 10) @@ -24,8 +24,21 @@ <project name="jlink" default="default" basedir="."> <!--Global--> + <!--Sourceforge Mirrors; choose one if th other dont work--> + <property name="sf.mirror" value="heanet"/> + <!-- + TODO: other mirrors + --> <!--Targets--> - <target name="share"> + <target name="share-deps"> + <echo message="downloading dep client/jfunutil.jar"/> + <get src="http://${sf.mirror}.dl.sourceforge.net/sourceforge/java-link/jfunutil-5.0.jar" dest="tmp/substance.jar"/> + <exec executable="mvn"> + <arg line="install:install-file -DgroupId=yan -DartifactId=jfunutil -Dversion=5.0 -Dpackaging=jar -Dfile=tmp/jfunutil.jar"/> + </exec> + <echo message="[done]"/> + </target> + <target name="share" depends="share-deps"> <exec executable="mvn" dir="share" output="share.build.log" failonerror="true"> <arg value="compile"/> </exec> @@ -49,7 +62,7 @@ <mkdir dir="tmp"/> <echo message="downloading dep client/lafplugin.jar"/> - <get src="http://dl.sourceforge.net/java-link/lafplugin-0.1.jar" dest="tmp/lafplugin.jar"/> + <get src="http://${sf.mirror}.dl.sourceforge.net/sourceforge/java-link/lafplugin-0.1.jar" dest="tmp/lafplugin.jar"/> <echo message="installing it"/> <exec executable="mvn"> <arg line="install:install-file -DgroupId=org.jvnet -DartifactId=lafplugin -Dversion=0.1 -Dpackaging=jar -Dfile=tmp/lafplugin.jar"/> @@ -57,7 +70,25 @@ <echo message="[done]"/> <echo message="downloading dep client/nanoxml.jar"/> - <get src="http://dl.sourceforge.net/java-link/nanoxml_lite-2.2.3.jar" dest="tmp/nanoxml.jar"/> + <get src="http://${sf.mirror}.dl.sourceforge.net/sourceforge/java-link/nanoxml_lite-2.2.3.jar" dest="tmp/nanoxml.jar"/> + <exec executable="mvn"> + <arg line="install:install-file -DgroupId=nanoxml -DartifactId=nanoxml -Dversion=2.2.3 -Dpackaging=jar -Dfile=tmp/nanoxml.jar"/> + </exec> + <echo message="[done]"/> + + <echo message="downloading dep client/swing-layour.jar"/> + <get src="http://${sf.mirror}.dl.sourceforge.net/sourceforge/java-link/swing-layout-1.0.jar" dest="tmp/swing-layout.jar"/> + <exec executable="mvn"> + <arg line="install:install-file -DgroupId=org.jvnet.swing-layout -DartifactId=core -Dversion=1.0 -Dpackaging=jar -Dfile=tmp/swing-layout.jar"/> + </exec> + <echo message="[done]"/> + + <echo message="downloading dep client/substance.jar"/> + <get src="http://${sf.mirror}.dl.sourceforge.net/sourceforge/java-link/substance-2.2.02.jar" dest="tmp/substance.jar"/> + <exec executable="mvn"> + <arg line="install:install-file -DgroupId=org.jvnet.substance -DartifactId=core -Dversion=2.2.02 -Dpackaging=jar -Dfile=tmp/substance.jar"/> + </exec> + <echo message="[done]"/> </target> <target name="client" depends="client-deps"> Modified: trunk/client/nbproject/mavencall.xml =================================================================== --- trunk/client/nbproject/mavencall.xml 2006-09-02 18:54:25 UTC (rev 9) +++ trunk/client/nbproject/mavencall.xml 2006-10-07 21:28:11 UTC (rev 10) @@ -1,4 +1,6 @@ <project name="client" default="build" basedir=".."> + <property file="nbproject/private/private.properties"/> + <property file="nbproject/project.properties"/> <target name="build" description="Build"> <exec dir="${basedir}" executable="${mvn.path}"> <arg line="package"/> @@ -30,8 +32,11 @@ </exec> </target> <target name="refresh-project" description="Refresh Project"> + <copy file="nbproject/mavencall.xml" tofile="nbproject/mavencall.xml.bak"/> <exec dir="${basedir}" executable="${mvn.path}"> <arg line="netbeans-freeform:generate-netbeans-project"/> </exec> + <delete file="nbproject.xml"/> + <move file="nbproject/mavencall.xml.bak" tofile="nbproject/mavencall.xml"/> </target> </project> \ No newline at end of file Modified: trunk/client/pom.xml =================================================================== --- trunk/client/pom.xml 2006-09-02 18:54:25 UTC (rev 9) +++ trunk/client/pom.xml 2006-10-07 21:28:11 UTC (rev 10) @@ -10,6 +10,12 @@ <name>JLink Client</name> <url>http://java-link.sf.net/</url> <dependencies> + <dependency> + <groupId>commons-configuration</groupId> + <artifactId>commons-configuration</artifactId> + <version>1.2</version> + <scope>compile</scope> + </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> @@ -52,6 +58,12 @@ <version>1.0</version> <scope>compile</scope> </dependency> + <dependency> + <groupId>nanoxml</groupId> + <artifactId>nanoxml</artifactId> + <version>2.2.3</version> + <scope>compile</scope> + </dependency> </dependencies> <!--//////////////////////////////////////// /////////////Reporting////////////////// @@ -146,7 +158,7 @@ </developer> </developers> <scm> - <connection>scm:svn:https://svn.sourceforge.net/svnroot/javalink</connection> + <connection>scm:svn:https://svn.sourceforge.net/svnroot/java-link</connection> <url>http://svn.sourceforge.net/viewcvs.cgi/java-link/</url> </scm> </project> Modified: trunk/server/nbproject/mavencall.xml =================================================================== --- trunk/server/nbproject/mavencall.xml 2006-09-02 18:54:25 UTC (rev 9) +++ trunk/server/nbproject/mavencall.xml 2006-10-07 21:28:11 UTC (rev 10) @@ -1,4 +1,6 @@ -<project name="server" default="build" basedir=".."> +<project name="client" default="build" basedir=".."> + <property file="nbproject/private/private.properties"/> + <property file="nbproject/project.properties"/> <target name="build" description="Build"> <exec dir="${basedir}" executable="${mvn.path}"> <arg line="package"/> @@ -30,8 +32,11 @@ </exec> </target> <target name="refresh-project" description="Refresh Project"> + <copy file="nbproject/mavencall.xml" tofile="nbproject/mavencall.xml.bak"/> <exec dir="${basedir}" executable="${mvn.path}"> <arg line="netbeans-freeform:generate-netbeans-project"/> </exec> + <delete file="nbproject.xml"/> + <move file="nbproject/mavencall.xml.bak" tofile="nbproject/mavencall.xml"/> </target> </project> \ No newline at end of file Modified: trunk/server/pom.xml =================================================================== --- trunk/server/pom.xml 2006-09-02 18:54:25 UTC (rev 9) +++ trunk/server/pom.xml 2006-10-07 21:28:11 UTC (rev 10) @@ -123,7 +123,7 @@ </developer> </developers> <scm> - <connection>scm:svn:https://svn.sourceforge.net/svnroot/javalink</connection> + <connection>scm:svn:https://svn.sourceforge.net/svnroot/java-link</connection> <url>http://svn.sourceforge.net/viewcvs.cgi/java-link/</url> </scm> </project> Modified: trunk/share/nbproject/mavencall.xml =================================================================== --- trunk/share/nbproject/mavencall.xml 2006-09-02 18:54:25 UTC (rev 9) +++ trunk/share/nbproject/mavencall.xml 2006-10-07 21:28:11 UTC (rev 10) @@ -1,4 +1,6 @@ -<project name="share" default="build" basedir=".."> +<project name="client" default="build" basedir=".."> + <property file="nbproject/private/private.properties"/> + <property file="nbproject/project.properties"/> <target name="build" description="Build"> <exec dir="${basedir}" executable="${mvn.path}"> <arg line="package"/> @@ -30,8 +32,11 @@ </exec> </target> <target name="refresh-project" description="Refresh Project"> + <copy file="nbproject/mavencall.xml" tofile="nbproject/mavencall.xml.bak"/> <exec dir="${basedir}" executable="${mvn.path}"> <arg line="netbeans-freeform:generate-netbeans-project"/> </exec> + <delete file="nbproject.xml"/> + <move file="nbproject/mavencall.xml.bak" tofile="nbproject/mavencall.xml"/> </target> </project> \ No newline at end of file Modified: trunk/share/pom.xml =================================================================== --- trunk/share/pom.xml 2006-09-02 18:54:25 UTC (rev 9) +++ trunk/share/pom.xml 2006-10-07 21:28:11 UTC (rev 10) @@ -22,6 +22,18 @@ <version>1.2.13</version> <scope>compile</scope> </dependency> + <dependency> + <groupId>yan</groupId> + <artifactId>yan</artifactId> + <version>5.0</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>yan</groupId> + <artifactId>jfunutil</artifactId> + <version>5.0</version> + <scope>compile</scope> + </dependency> </dependencies> <!--//////////////////////////////////////// /////////////Reporting////////////////// @@ -117,7 +129,7 @@ </developer> </developers> <scm> - <connection>scm:svn:https://svn.sourceforge.net/svnroot/javalink</connection> + <connection>scm:svn:https://svn.sourceforge.net/svnroot/java-link</connection> <url>http://svn.sourceforge.net/viewcvs.cgi/java-link/</url> </scm> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wel...@us...> - 2006-10-24 17:23:08
|
Revision: 19 http://svn.sourceforge.net/java-link/?rev=19&view=rev Author: welterde0 Date: 2006-10-24 10:21:13 -0700 (Tue, 24 Oct 2006) Log Message: ----------- pushed some unstable into the trunk; fixed missing jmx classes for libdb ok, this is lots of unstable code, ok? Added Paths: ----------- trunk/client/src/main/java/org/jlink/client/gui/RootFrame.java trunk/client/src/main/java/org/jlink/client/net/NetworkCore.java trunk/env_client/ trunk/env_server/ trunk/env_server/config/ trunk/env_server/config/example.xml trunk/env_server/db/ trunk/env_server/db/config.xml trunk/env_server/logging/ trunk/env_server/logging/sample.xml trunk/env_server/logs/ trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManagerJMX.java trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManagerJMXMBean.java trunk/libgui/ trunk/libgui/nbproject/ trunk/libgui/nbproject/mavencall.xml trunk/libgui/nbproject/private/ trunk/libgui/nbproject/private/private.properties trunk/libgui/nbproject/private/private.xml trunk/libgui/nbproject/project.properties trunk/libgui/nbproject/project.xml trunk/libgui/pom.xml trunk/libgui/src/ trunk/libgui/src/main/ trunk/libgui/src/main/java/ trunk/libgui/src/main/java/org/ trunk/libgui/src/main/java/org/jlink/ trunk/libgui/src/main/java/org/jlink/libgui/ trunk/libgui/src/main/java/org/jlink/libgui/GUIRenderer.java trunk/libgui/src/main/java/org/jlink/libgui/RootFrame.java trunk/libgui/src/main/java/org/jlink/libgui/RootPane.java trunk/libgui/src/main/java/org/jlink/libgui/Window.java trunk/libgui/src/main/java/org/jlink/libgui/WindowListener.java trunk/libgui/src/main/java/org/jlink/libgui/widgets/ trunk/libgui/src/main/resources/ trunk/libgui/src/main/resources/org/ trunk/libgui/src/main/resources/org/jlink/ trunk/libgui/src/main/resources/org/jlink/ref/ trunk/libgui/src/site/ trunk/libgui/src/site/site.xml trunk/libgui/src/test/ trunk/libgui/src/test/java/ trunk/libnet/ trunk/libnet/nbproject/ trunk/libnet/nbproject/mavencall.xml trunk/libnet/nbproject/private/ trunk/libnet/nbproject/private/private.properties trunk/libnet/nbproject/private/private.xml trunk/libnet/nbproject/project.properties trunk/libnet/nbproject/project.xml trunk/libnet/pom.xml trunk/libnet/src/ trunk/libnet/src/main/ trunk/libnet/src/main/java/ trunk/libnet/src/main/java/org/ trunk/libnet/src/main/java/org/jlink/ trunk/libnet/src/main/java/org/jlink/libnet/ trunk/libnet/src/main/java/org/jlink/libnet/hl/ trunk/libnet/src/main/java/org/jlink/libnet/hl/HLManager.java trunk/libnet/src/main/java/org/jlink/libnet/hl/HLMode.java trunk/libnet/src/main/java/org/jlink/libnet/hl/HLModeEnum.java trunk/libnet/src/main/java/org/jlink/libnet/hl/modes/ trunk/libnet/src/main/java/org/jlink/libnet/hl/modes/ftp/ trunk/libnet/src/main/java/org/jlink/libnet/ll/ trunk/libnet/src/main/java/org/jlink/libnet/ll/LLConfiguration.java trunk/libnet/src/main/java/org/jlink/libnet/ll/LLConfigurationException.java trunk/libnet/src/main/java/org/jlink/libnet/ll/LLConnector.java trunk/libnet/src/main/java/org/jlink/libnet/ll/LLEvent.java trunk/libnet/src/main/java/org/jlink/libnet/ll/LLFactory.java trunk/libnet/src/main/java/org/jlink/libnet/ll/LLProtocol.java trunk/libnet/src/main/java/org/jlink/libnet/ll/LLServerFactory.java trunk/libnet/src/main/java/org/jlink/libnet/ll/xml/ trunk/libnet/src/main/java/org/jlink/libnet/ml/ trunk/libnet/src/main/resources/ trunk/libnet/src/main/resources/org/ trunk/libnet/src/main/resources/org/jlink/ trunk/libnet/src/main/resources/org/jlink/libnet/ trunk/libnet/src/main/resources/org/jlink/libnet/ll/ trunk/libnet/src/main/resources/org/jlink/libnet/ll/xml/ trunk/libnet/src/main/resources/org/jlink/libnet/ll/xml/Translation.properties trunk/libnet/src/main/resources/org/jlink/libnet/ll/xml/Translation_de_DE.properties trunk/libnet/src/main/resources/org/jlink/libnet/ll/xml/config.properties trunk/libnet/src/site/ trunk/libnet/src/site/site.xml trunk/libnet/src/test/ trunk/libnet/src/test/java/ trunk/libserver/ trunk/libserver/catalog.xml trunk/libserver/nbproject/ trunk/libserver/nbproject/mavencall.xml trunk/libserver/nbproject/private/ trunk/libserver/nbproject/private/private.properties trunk/libserver/nbproject/private/private.xml trunk/libserver/nbproject/project.properties trunk/libserver/nbproject/project.xml trunk/libserver/pom.xml trunk/libserver/src/ trunk/libserver/src/main/ trunk/libserver/src/main/java/ trunk/libserver/src/main/java/org/ trunk/libserver/src/main/java/org/jlink/ trunk/libserver/src/main/java/org/jlink/server/ trunk/libserver/src/main/java/org/jlink/server/Server.java trunk/libserver/src/main/java/org/jlink/server/ServerController.java trunk/libserver/src/main/java/org/jlink/server/ServerDescriptor.java trunk/libserver/src/main/java/org/jlink/server/ServerException.java trunk/libserver/src/main/resources/ trunk/libserver/src/site/ trunk/libserver/src/site/site.xml trunk/libserver/src/test/ trunk/libserver/src/test/java/ trunk/libworld/ trunk/libworld/nbproject/ trunk/libworld/nbproject/mavencall.xml trunk/libworld/nbproject/private/ trunk/libworld/nbproject/private/private.properties trunk/libworld/nbproject/private/private.xml trunk/libworld/nbproject/project.properties trunk/libworld/nbproject/project.xml trunk/libworld/pom.xml trunk/libworld/src/ trunk/libworld/src/main/ trunk/libworld/src/main/java/ trunk/libworld/src/main/java/org/ trunk/libworld/src/main/java/org/jlink/ trunk/libworld/src/main/java/org/jlink/libworld/ trunk/libworld/src/main/java/org/jlink/libworld/Character.java trunk/libworld/src/main/java/org/jlink/libworld/CharacterController.java trunk/libworld/src/main/java/org/jlink/libworld/CharacterModel.java trunk/libworld/src/main/java/org/jlink/libworld/CompanyModel.java trunk/libworld/src/main/java/org/jlink/libworld/Game.java trunk/libworld/src/main/java/org/jlink/libworld/GameModel.java trunk/libworld/src/main/java/org/jlink/libworld/World.java trunk/libworld/src/main/java/org/jlink/libworld/WorldModel.java trunk/libworld/src/main/resources/ trunk/libworld/src/site/ trunk/libworld/src/site/site.xml trunk/libworld/src/test/ trunk/libworld/src/test/java/ trunk/server/src/test/java/ trunk/server/src/test/java/org/ trunk/server/src/test/java/org/jlink/ trunk/server/src/test/java/org/jlink/server/ trunk/share/src/main/java/org/jlink/logic/ trunk/share/src/main/java/org/jlink/logic/Connection.java trunk/share/src/main/java/org/jlink/logic/World.java trunk/share/src/main/java/org/jlink/logic/WorldManager.java trunk/share/src/main/java/org/jlink/logic/error/ trunk/share/src/main/java/org/jlink/logic/error/ErrorHandler.java trunk/share/src/main/java/org/jlink/logic/error/ErrorManager.java trunk/share/src/main/java/org/jlink/logic/plugin/ trunk/share/src/main/java/org/jlink/logic/plugin/PluginManager.java Added: trunk/client/src/main/java/org/jlink/client/gui/RootFrame.java =================================================================== --- trunk/client/src/main/java/org/jlink/client/gui/RootFrame.java (rev 0) +++ trunk/client/src/main/java/org/jlink/client/gui/RootFrame.java 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,85 @@ +/* + * RootFrame.java + * + * Created on 5. Oktober 2006, 14:43 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.client.gui; + +import javax.swing.JFrame; +import org.apache.commons.configuration.Configuration; + +/** + * + * @author welterde + */ +public class RootFrame { + + /** Creates a new instance of RootFrame */ + public RootFrame(Configuration conf) { + if(conf == null) + throw new NullPointerException("the configuration may not be null"); + this.conf = conf; + String title = "JLink"; + //TODO: add translation support to title + + //create new frame + this.frame = new JFrame(title); + //TODO: add desktop thing to frame + } + + + public void show(boolean fullscreen) { + //performance bypass + if(this.stat_showed) + return; + + if(fullscreen) { + //TODO: write fullscreen code + fullscreen = false; + } + if(!fullscreen) { + //TODO: read windowed size from config + this.frame.setSize(1024, 768); + this.frame.pack(); + this.frame.setVisible(true); + } + } + public void unshow() { + //performence bypass + if(!this.stat_showed) + return; + } + public void dipose() { + this.frame.dispose(); + } + + + + private JFrame frame = null; + + /** + * The global configuration. + */ + private Configuration conf = null; + + private boolean stat_showed = false; + +} Added: trunk/client/src/main/java/org/jlink/client/net/NetworkCore.java =================================================================== --- trunk/client/src/main/java/org/jlink/client/net/NetworkCore.java (rev 0) +++ trunk/client/src/main/java/org/jlink/client/net/NetworkCore.java 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,36 @@ +/* + * NetworkCore.java + * + * Created on 9. September 2006, 22:49 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.client.net; + +/** + * + * @author welterde + */ +public class NetworkCore { + + /** Creates a new instance of NetworkCore */ + public NetworkCore() { + } + +} Added: trunk/env_server/config/example.xml =================================================================== --- trunk/env_server/config/example.xml (rev 0) +++ trunk/env_server/config/example.xml 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<root> + +</root> Added: trunk/env_server/db/config.xml =================================================================== --- trunk/env_server/db/config.xml (rev 0) +++ trunk/env_server/db/config.xml 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<Repository> <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem"> + <param name="path" value="${rep.home}/repository"/> + </FileSystem> <Security> <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager"> </AccessManager> <LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule"> <!-- anonymous user name ('anonymous' is the default value) --> <param name="anonymousId" value="anonymous"/> </LoginModule> </Security> <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/> <Workspace name="${wsp.name}"> <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem"> <param name="path" value="${wsp.home}"/> </FileSystem> <PersistenceManager class="org.apache.jackrabbit.core.state.db.DerbyPersistenceManager"> <param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/> <param name="schemaObjectPrefix" value="${wsp.name}_"/> </PersistenceManager> <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex"> <param name="path" value="${wsp.home}/index"/> <param name="useCompoundFile" value="true"/> <param name="minMergeDocs" value="100"/> <param name="volatileIdleTime" value="3"/> <param name="maxMergeDocs" value="100000"/> <param name="mergeFactor" value="10"/> <param name="maxFieldLength" value="10000"/> <param name="bufferSize" value="10"/> <param name="cacheSize" value="1000"/> <param name="forceConsistencyCheck" value="false"/> <param name="autoRepair" value="true"/> <param name="analyzer" value="org.apache.lucene.analysis.standard.StandardAnalyzer"/> <param name="queryClass" value="org.apache.jackrabbit.core.query.QueryImpl"/> <param name="idleTime" value="-1"/> <param name="respectDocumentOrder" value="true"/> </SearchIndex> </Workspace> </Repository> \ No newline at end of file Added: trunk/env_server/logging/sample.xml =================================================================== --- trunk/env_server/logging/sample.xml (rev 0) +++ trunk/env_server/logging/sample.xml 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> + +<log4j:configuration> + + <appender name="LIVE-I" class="org.apache.log4j.net.SocketHubAppender"> + <param name="port" value="4445"/> + <param name="Threshold" value="all"/> + </appender> + <appender name="LIVE-II" class="org.apache.log4j.ConsoleAppender"> + <param name="Threshold" value="info"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d{ISO8601} %-5p %c - %m%n"/> + </layout> + </appender> + <appender name="DEBUG-I" class="org.apache.log4j.FileAppender"> + <param name="Threshold" value="all"/> + <param name="File" value="logs/debug.log.xml"/> + <param name="Append" value="false"/> + <layout class="org.apache.log4j.xml.XMLLayout"/> + </appender> + <appender name="FILE-I" class="org.apache.log4j.DailyRollingFileAppender"> + <param name="datePattern" value="'.'yyyy-MM-dd-HH"/> + <param name="File" value="logs/server.log.xml"/> + <param name="Threshold" value="debug"/> + <layout class="org.apache.log4j.xml.XMLLayout"/> + </appender> + + <root> + <priority value ="all" /> + <appender-ref ref="LIVE-I"/> + <appender-ref ref="LIVE-II"/> + <appender-ref ref="DEBUG-I"/> + <appender-ref ref="FILE-I"/> + </root> + +</log4j:configuration> \ No newline at end of file Added: trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManagerJMX.java =================================================================== --- trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManagerJMX.java (rev 0) +++ trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManagerJMX.java 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,117 @@ +/* + * StorageManagerJMX.java + * + * Created on 9. Oktober 2006, 19:18 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.server.libdb; +import javax.management.*; +import java.util.Arrays; + +/** + * Dynamic MBean based on StandardMBean + * Class StorageManagerJMX + * StorageManager Controller + * @author welterde + */ +public class StorageManagerJMX extends javax.management.StandardMBean implements StorageManagerJMXMBean { + + private org.jlink.server.libdb.StorageManager theRef; + + public StorageManagerJMX(org.jlink.server.libdb.StorageManager theRef) throws NotCompliantMBeanException { + super(StorageManagerJMXMBean.class); + this.theRef = theRef; + } + + /** + * Next are the methods to compute MBeanInfo. + * You shouldn't update these methods. + */ + protected String getDescription(MBeanInfo info) { + return "StorageManager Controller"; + } + + protected String getDescription(MBeanAttributeInfo info) { + String description = null; + return description; + } + + protected String getDescription(MBeanOperationInfo op, + MBeanParameterInfo param, + int sequence) { + if (op.getName().equals("destroy")) { + switch (sequence) { + default : return null; + } + } + return null; + } + + protected String getParameterName(MBeanOperationInfo op, + MBeanParameterInfo param, + int sequence) { + if (op.getName().equals("destroy")) { + switch (sequence) { + default : return null; + } + } + return null; + } + + protected String getDescription(MBeanOperationInfo info) { + String description = null; + MBeanParameterInfo[] params = info.getSignature(); + String[] signature = new String[params.length]; + for (int i = 0; i < params.length; i++) + signature[i] = params[i].getType(); + String[] methodSignature; + + methodSignature = new String[] { + }; + if (info.getName().equals("destroy") && Arrays.equals(signature, methodSignature)) { + description = "Operation exposed for management"; + } + + return description; + } + + public MBeanInfo getMBeanInfo() { + MBeanInfo mbinfo = super.getMBeanInfo(); + return new MBeanInfo(mbinfo.getClassName(), + mbinfo.getDescription(), + mbinfo.getAttributes(), + mbinfo.getConstructors(), + mbinfo.getOperations(), + getNotificationInfo()); + } + + public MBeanNotificationInfo[] getNotificationInfo() { + return new MBeanNotificationInfo[] {}; + } + + /** + * Operation exposed for management + */ + public void destroy() { + theRef.destroy(); + } +} + + Added: trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManagerJMXMBean.java =================================================================== --- trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManagerJMXMBean.java (rev 0) +++ trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManagerJMXMBean.java 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,40 @@ +/* + * StorageManagerJMXMBean.java + * + * Created on 9. Oktober 2006, 19:18 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.server.libdb; + +/** + * Interface StorageManagerJMXMBean + * StorageManager Controller + * @author welterde + */ +public interface StorageManagerJMXMBean +{ + /** + * Operation exposed for management + */ + public void destroy(); + +} + + Added: trunk/libgui/nbproject/mavencall.xml =================================================================== --- trunk/libgui/nbproject/mavencall.xml (rev 0) +++ trunk/libgui/nbproject/mavencall.xml 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,42 @@ +<project name="client" default="build" basedir=".."> + <property file="nbproject/private/private.properties"/> + <property file="nbproject/project.properties"/> + <target name="build" description="Build"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="package"/> + </exec> + </target> + <target name="clean" description="Clean"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="clean:clean"/> + </exec> + </target> + <target name="javadoc" description="Javadoc"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="site:site"/> + </exec> + </target> + <target name="run" description="Install Locally"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="install"/> + </exec> + </target> + <target name="test" description="Test Project"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="test"/> + </exec> + </target> + <target name="jalopy" description="Format Code"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="jalopy:format"/> + </exec> + </target> + <target name="refresh-project" description="Refresh Project"> + <copy file="nbproject/mavencall.xml" tofile="nbproject/mavencall.xml.bak"/> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="netbeans-freeform:generate-netbeans-project"/> + </exec> + <delete file="nbproject.xml"/> + <move file="nbproject/mavencall.xml.bak" tofile="nbproject/mavencall.xml"/> + </target> +</project> \ No newline at end of file Added: trunk/libgui/nbproject/private/private.properties =================================================================== --- trunk/libgui/nbproject/private/private.properties (rev 0) +++ trunk/libgui/nbproject/private/private.properties 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,3 @@ +# Own settings for... +#... maven +mvn.path=/opt/local/bin/mvn Added: trunk/libgui/nbproject/private/private.xml =================================================================== --- trunk/libgui/nbproject/private/private.xml (rev 0) +++ trunk/libgui/nbproject/private/private.xml 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project-private xmlns="http://www.netbeans.org/ns/project-private/1"> + <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/> +</project-private> Added: trunk/libgui/nbproject/project.properties =================================================================== --- trunk/libgui/nbproject/project.properties (rev 0) +++ trunk/libgui/nbproject/project.properties 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,5 @@ +#The netbeans freeform property file +#Wed Sep 13 22:31:11 CEST 2006 +local.repository=/Users/welterde/.m2/repository +mvn.path=mvn +project.directory=/Users/welterde/Documents/dev/jlink/current_trunk/libgui Added: trunk/libgui/nbproject/project.xml =================================================================== --- trunk/libgui/nbproject/project.xml (rev 0) +++ trunk/libgui/nbproject/project.xml 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,134 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.ant.freeform</type> + <configuration> + <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> + <name>JLink libgui</name> + <properties> + <property name="ant.script">nbproject/mavencall.xml</property> + <property-file>nbproject/project.properties</property-file> + </properties> + <folders> + <source-folder> + <label>src/main/java</label> + <type>java</type> + <location>src/main/java</location> + </source-folder> + <source-folder> + <label>src/test/java</label> + <type>java</type> + <location>src/test/java</location> + </source-folder> + </folders> + <ide-actions> + <action name="build"> + <script>${ant.script}</script> + <target>build</target> + </action> + <action name="clean"> + <script>${ant.script}</script> + <target>clean</target> + </action> + <action name="rebuild"> + <script>${ant.script}</script> + <target>clean</target> + <target>build</target> + </action> + <action name="javadoc"> + <script>${ant.script}</script> + <target>javadoc</target> + </action> + <action name="run"> + <script>${ant.script}</script> + <target>run</target> + </action> + <action name="test"> + <script>${ant.script}</script> + <target>test</target> + </action> + </ide-actions> + <export> + <type>folder</type> + <location>target/classes</location> + <script>${ant.script}</script> + <build-target>build</build-target> + </export> + <export> + <type>folder</type> + <location>target/test-classes</location> + <script>${ant.script}</script> + <build-target>build</build-target> + </export> + <view> + <items> + <source-folder style="packages"> + <label>src/main/java</label> + <location>src/main/java</location> + </source-folder> + <source-folder style="packages"> + <label>src/test/java</label> + <location>src/test/java</location> + </source-folder> + <source-file> + <label>pom</label> + <location>pom.xml</location> + </source-file> + <source-file> + <label>mavencall</label> + <location>nbproject/mavencall.xml</location> + </source-file> + <source-folder style="tree"> + <label>src/main/resources</label> + <location>src/main/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/test/resources</label> + <location>src/test/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/site</label> + <location>src/site</location> + </source-folder> + <source-folder style="tree"> + <label>target</label> + <location>target</location> + </source-folder> + </items> + <context-menu> + <action> + <script>${ant.script}</script> + <label>Refresh Project</label> + <target>refresh-project</target> + </action> + <ide-action name="build"/> + <ide-action name="clean"/> + <ide-action name="rebuild"/> + <ide-action name="javadoc"/> + <ide-action name="run"/> + <ide-action name="test"/> + <action> + <script>${ant.script}</script> + <label>Format Code</label> + <target>jalopy</target> + </action> + </context-menu> + </view> + <subprojects/> + </general-data> + <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2"> + <compilation-unit> + <package-root>src/main/java</package-root> + <classpath mode="compile">${local.repository}/commons-logging/commons-logging/1.0/commons-logging-1.0.jar:${local.repository}/groovy/groovy/1.0-jsr-06/groovy-1.0-jsr-06.jar:${local.repository}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar:${local.repository}/relaxngDatatype/relaxngDatatype/20020414/relaxngDatatype-20020414.jar:${local.repository}/xerces/xercesImpl/2.2.1/xercesImpl-2.2.1.jar:${local.repository}/isorelax/isorelax/20020414/isorelax-20020414.jar:${local.repository}/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar:${local.repository}/xalan/xalan/2.7.0/xalan-2.7.0.jar:${local.repository}/commons-lang/commons-lang/2.1/commons-lang-2.1.jar:${local.repository}/commons-configuration/commons-configuration/1.2/commons-configuration-1.2.jar:${local.repository}/commons-collections/commons-collections/3.1/commons-collections-3.1.jar:${local.repository}/jaxen/jaxen/1.0-FCS/jaxen-1.0-FCS.jar:${local.repository}/commons-digester/commons-digester/1.6/commons-digester-1.6.jar:${local.repository}/antlr/antlr/2.7.5/antlr-2.7.5.jar:${local.repository}/commons-beanutils/commons-beanutils/1.6/commons-beanutils-1.6.jar:${local.repository}/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:${local.repository}/asm/asm/2.2/asm-2.2.jar:${local.repository}/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar:${local.repository}/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar:${local.repository}/dom4j/dom4j/1.4/dom4j-1.4.jar:${local.repository}/saxpath/saxpath/1.0-FCS/saxpath-1.0-FCS.jar:${local.repository}/msv/msv/20020414/msv-20020414.jar</classpath> + <built-to>target/classes</built-to> + <source-level>1.5</source-level> + </compilation-unit> + <compilation-unit> + <package-root>src/test/java</package-root> + <unit-tests/> + <classpath mode="compile">target/classes:${local.repository}/commons-logging/commons-logging/1.0/commons-logging-1.0.jar:${local.repository}/groovy/groovy/1.0-jsr-06/groovy-1.0-jsr-06.jar:${local.repository}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar:${local.repository}/relaxngDatatype/relaxngDatatype/20020414/relaxngDatatype-20020414.jar:${local.repository}/xerces/xercesImpl/2.2.1/xercesImpl-2.2.1.jar:${local.repository}/junit/junit/3.8.1/junit-3.8.1.jar:${local.repository}/isorelax/isorelax/20020414/isorelax-20020414.jar:${local.repository}/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar:${local.repository}/xalan/xalan/2.7.0/xalan-2.7.0.jar:${local.repository}/commons-lang/commons-lang/2.1/commons-lang-2.1.jar:${local.repository}/commons-configuration/commons-configuration/1.2/commons-configuration-1.2.jar:${local.repository}/commons-collections/commons-collections/3.1/commons-collections-3.1.jar:${local.repository}/jaxen/jaxen/1.0-FCS/jaxen-1.0-FCS.jar:${local.repository}/commons-digester/commons-digester/1.6/commons-digester-1.6.jar:${local.repository}/antlr/antlr/2.7.5/antlr-2.7.5.jar:${local.repository}/commons-beanutils/commons-beanutils/1.6/commons-beanutils-1.6.jar:${local.repository}/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:${local.repository}/asm/asm/2.2/asm-2.2.jar:${local.repository}/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar:${local.repository}/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar:${local.repository}/dom4j/dom4j/1.4/dom4j-1.4.jar:${local.repository}/saxpath/saxpath/1.0-FCS/saxpath-1.0-FCS.jar:${local.repository}/msv/msv/20020414/msv-20020414.jar</classpath> + <built-to>target/test-classes</built-to> + <source-level>1.5</source-level> + </compilation-unit> + </java-data> + </configuration> +</project> Added: trunk/libgui/pom.xml =================================================================== --- trunk/libgui/pom.xml (rev 0) +++ trunk/libgui/pom.xml 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,123 @@ +<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/maven-v4_0_0.xsd"> +<!--//////////////////////////////////////// + /////////////General//////////////////// + /////////////////////////////////////--> + <modelVersion>4.0.0</modelVersion> + <groupId>org.jlink</groupId> + <artifactId>libgui</artifactId> + <packaging>jar</packaging> + <version>0.0.1-SNAPSHOT</version> + <name>JLink libgui</name> + <url>http://java-link.sf.net/</url> + <dependencies> + <dependency> + <groupId>groovy</groupId> + <artifactId>groovy</artifactId> + <version>1.0-jsr-06</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>commons-configuration</groupId> + <artifactId>commons-configuration</artifactId> + <version>1.2</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + </dependencies> +<!--//////////////////////////////////////// + /////////////Reporting////////////////// + /////////////////////////////////////--> + <reporting> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>jxr-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-pmd-plugin</artifactId> + <configuration> + <rulesets> + <ruleset>/rulesets/basic.xml</ruleset> + <ruleset>/rulesets/braces.xml</ruleset> + <ruleset>/rulesets/codesize.xml</ruleset> + <ruleset>/rulesets/coupling.xml</ruleset> + <ruleset>/rulesets/design.xml</ruleset> + <ruleset>/rulesets/finalizers.xml</ruleset> + <ruleset>/rulesets/imports.xml</ruleset> + <ruleset>/rulesets/javabeans.xml</ruleset> + <ruleset>/rulesets/logging-java.xml</ruleset> + <ruleset>/rulesets/naming.xml</ruleset> + <ruleset>/rulesets/optimizations.xml</ruleset> + <ruleset>/rulesets/strictexception.xml</ruleset> + <ruleset>/rulesets/strings.xml</ruleset> + <ruleset>/rulesets/sunsecure.xml</ruleset> + <ruleset>/rulesets/unusedcode.xml</ruleset> + </rulesets> + <linkXref>true</linkXref> + <sourceEncoding>utf-8</sourceEncoding> + <minimumTokens>100</minimumTokens> + <targetJdk>1.5</targetJdk> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-report-plugin</artifactId> + </plugin> + </plugins> + </reporting> +<!--//////////////////////////////////////// + /////////////Building/////////////////// + /////////////////////////////////////--> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + </plugins> + </build> +<!--//////////////////////////////////////// + /////////////Deploying////////////////// + /////////////////////////////////////--> + <distributionManagement> + <site> + <id>jlink-sf</id> + <url>scp://shell.sf.net/home/groups/j/ja/java-link/htdocs/maven2/libgui</url> + </site> + </distributionManagement> +<!--//////////////////////////////////////// + /////////////Include from root////////// + /////////////////////////////////////--> + <ciManagement> + <system>cruisecontrol</system> + <url>http://welterde.i2p/cruisecontrol/</url> + </ciManagement> + <issueManagement> + <system>sourceforge</system> + <url>http://sourceforge.net/tracker/?group_id=162264</url> + </issueManagement> + <developers> + <developer> + <id>welterde</id> + <email>wel...@ar...</email> + </developer> + </developers> + <scm> + <connection>scm:svn:https://svn.sourceforge.net/svnroot/javalink</connection> + <url>http://svn.sourceforge.net/viewcvs.cgi/java-link/</url> + </scm> +</project> Added: trunk/libgui/src/main/java/org/jlink/libgui/GUIRenderer.java =================================================================== --- trunk/libgui/src/main/java/org/jlink/libgui/GUIRenderer.java (rev 0) +++ trunk/libgui/src/main/java/org/jlink/libgui/GUIRenderer.java 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,36 @@ +/* + * GUIRenderer.java + * + * Created on 5. Oktober 2006, 14:39 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.libgui; + +/** + * + * @author welterde + */ +public class GUIRenderer { + + /** Creates a new instance of GUIRenderer */ + public GUIRenderer() { + } + +} Added: trunk/libgui/src/main/java/org/jlink/libgui/RootFrame.java =================================================================== --- trunk/libgui/src/main/java/org/jlink/libgui/RootFrame.java (rev 0) +++ trunk/libgui/src/main/java/org/jlink/libgui/RootFrame.java 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,86 @@ +/* + * RootFrame.java + * + * Created on 14. September 2006, 19:15 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.libgui; + +import java.awt.GraphicsEnvironment; +import java.awt.GraphicsDevice; + +import javax.swing.JFrame; +import javax.swing.JPanel; + +/** + * + * @author welterde + */ +public class RootFrame { + + /** Creates a new instance of RootFrame */ + public RootFrame(JPanel panel) { + if(panel == null) + throw new NullPointerException(); + this.comp_panel = panel; + this.comp_frame = new JFrame("JLink"); + this.comp_frame.add(this.comp_panel); + this.comp_frame.pack(); + } + + + public void show(boolean fullscreen) { + //try to do fullscreen + if(fullscreen) { + GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); + GraphicsDevice gs = ge.getDefaultScreenDevice(); + //check if we can switch to fullscreen + if (gs.isFullScreenSupported()) { + //TODO: write fullscreen code + fullscreen = false; + } else { + //if not, force fall over to windowed mode + fullscreen = false; + } + } + if(!fullscreen) { + this.comp_frame.setSize(1024, 768); + this.comp_frame.pack(); + this.comp_frame.setVisible(true); + } + } + public void unshow() { + this.comp_frame.setVisible(false); + } + public void dispose() { + this.comp_frame.dispose(); + } + + + + + + + + + + private JPanel comp_panel = null; + private JFrame comp_frame = null; +} Added: trunk/libgui/src/main/java/org/jlink/libgui/RootPane.java =================================================================== --- trunk/libgui/src/main/java/org/jlink/libgui/RootPane.java (rev 0) +++ trunk/libgui/src/main/java/org/jlink/libgui/RootPane.java 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,67 @@ +/* + * RootPane.java + * + * Created on 13. September 2006, 21:28 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.libgui; + +import javax.swing.JPanel; +import javax.swing.JPopupMenu; +import javax.swing.JMenuItem; + +import org.apache.commons.configuration.Configuration; +import org.apache.commons.configuration.ConversionException; + +/** + * + * @author welterde + */ +public class RootPane extends JPanel { + + /** Creates a new instance of RootPane */ + public RootPane(Configuration conf) { + //try to get an default value for X + try { + this.win_default_x = conf.getInt("win_x", 768); + } catch(ConversionException exc) { + //TODO: log it + } + //set X for panel + //try to get an default value for Y + try { + this.win_default_y = conf.getInt("win_y", 768); + } catch(ConversionException exc) { + //TODO: log it + } + + } + + + + + + //Base configuration + private int win_default_x = 200; + private int win_default_y = 200; + + + +} Added: trunk/libgui/src/main/java/org/jlink/libgui/Window.java =================================================================== --- trunk/libgui/src/main/java/org/jlink/libgui/Window.java (rev 0) +++ trunk/libgui/src/main/java/org/jlink/libgui/Window.java 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,57 @@ +/* + * Window.java + * + * Created on 14. September 2006, 15:16 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.libgui; + +import javax.swing.JInternalFrame; +import javax.swing.JPanel; +import javax.swing.JPopupMenu; + +/** + * TODO: add Popupmenu in titlebar + * TODO: add transparency + * @author welterde + */ +public abstract class Window extends JInternalFrame { + + /** + * Creates a new instance of Window + */ + public Window(String title, boolean resizable, boolean closeable, boolean maximizable, boolean iconifiable) { + super(title, resizable, closeable, maximizable, iconifiable); + this.pay_panel = this.getPanel(); + } + + + + //abstract methods + protected abstract JPanel getPanel(); + + protected void setModifiedState(boolean modified) { + //TODO: write modified code thingy + } + + + + private JPanel pay_panel = null; +} Added: trunk/libgui/src/main/java/org/jlink/libgui/WindowListener.java =================================================================== --- trunk/libgui/src/main/java/org/jlink/libgui/WindowListener.java (rev 0) +++ trunk/libgui/src/main/java/org/jlink/libgui/WindowListener.java 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,41 @@ +/* + * WindowListener.java + * + * Created on 14. September 2006, 22:17 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.libgui; + +/** + * + * @author welterde + */ +public interface WindowListener { + //modified state change + public void modified(); + public void discarded();//spelled right? + public void saved(); + + //window itself + public void maximized(); + public void minimized(); + public void resized(int x, int y); + public void moved(int abs_x, int abs_y); +} Added: trunk/libgui/src/site/site.xml =================================================================== --- trunk/libgui/src/site/site.xml (rev 0) +++ trunk/libgui/src/site/site.xml 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<project name="JLink libgui"> + <bannerRight> + <src>http://sflogo.sourceforge.net/sflogo.php?group_id=162264&type=3</src> + </bannerRight> + <body> + ${reports} + </body> +</project> Added: trunk/libnet/nbproject/mavencall.xml =================================================================== --- trunk/libnet/nbproject/mavencall.xml (rev 0) +++ trunk/libnet/nbproject/mavencall.xml 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,42 @@ +<project name="client" default="build" basedir=".."> + <property file="nbproject/private/private.properties"/> + <property file="nbproject/project.properties"/> + <target name="build" description="Build"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="package"/> + </exec> + </target> + <target name="clean" description="Clean"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="clean:clean"/> + </exec> + </target> + <target name="javadoc" description="Javadoc"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="site:site"/> + </exec> + </target> + <target name="run" description="Install Locally"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="install"/> + </exec> + </target> + <target name="test" description="Test Project"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="test"/> + </exec> + </target> + <target name="jalopy" description="Format Code"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="jalopy:format"/> + </exec> + </target> + <target name="refresh-project" description="Refresh Project"> + <copy file="nbproject/mavencall.xml" tofile="nbproject/mavencall.xml.bak"/> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="netbeans-freeform:generate-netbeans-project"/> + </exec> + <delete file="nbproject.xml"/> + <move file="nbproject/mavencall.xml.bak" tofile="nbproject/mavencall.xml"/> + </target> +</project> \ No newline at end of file Added: trunk/libnet/nbproject/private/private.properties =================================================================== --- trunk/libnet/nbproject/private/private.properties (rev 0) +++ trunk/libnet/nbproject/private/private.properties 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,3 @@ +# Own settings for... +#... maven +mvn.path=/opt/local/bin/mvn Added: trunk/libnet/nbproject/private/private.xml =================================================================== --- trunk/libnet/nbproject/private/private.xml (rev 0) +++ trunk/libnet/nbproject/private/private.xml 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project-private xmlns="http://www.netbeans.org/ns/project-private/1"> + <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/> +</project-private> Added: trunk/libnet/nbproject/project.properties =================================================================== --- trunk/libnet/nbproject/project.properties (rev 0) +++ trunk/libnet/nbproject/project.properties 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,2 @@ +#The netbeans freeform property file +#Sun Sep 03 13:57:42 CEST 2006 Added: trunk/libnet/nbproject/project.xml =================================================================== --- trunk/libnet/nbproject/project.xml (rev 0) +++ trunk/libnet/nbproject/project.xml 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,133 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.ant.freeform</type> + <configuration> + <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> + <name>JLink libnet</name> + <properties> + <property name="ant.script">nbproject/mavencall.xml</property> + <property-file>nbproject/project.properties</property-file> + </properties> + <folders> + <source-folder> + <label>src/main/java</label> + <type>java</type> + <location>src/main/java</location> + </source-folder> + <source-folder> + <label>src/test/java</label> + <type>java</type> + <location>src/test/java</location> + </source-folder> + </folders> + <ide-actions> + <action name="build"> + <script>${ant.script}</script> + <target>build</target> + </action> + <action name="clean"> + <script>${ant.script}</script> + <target>clean</target> + </action> + <action name="rebuild"> + <script>${ant.script}</script> + <target>clean</target> + <target>build</target> + </action> + <action name="javadoc"> + <script>${ant.script}</script> + <target>javadoc</target> + </action> + <action name="run"> + <script>${ant.script}</script> + <target>run</target> + </action> + <action name="test"> + <script>${ant.script}</script> + <target>test</target> + </action> + </ide-actions> + <export> + <type>folder</type> + <location>target/classes</location> + <script>${ant.script}</script> + <build-target>build</build-target> + </export> + <export> + <type>folder</type> + <location>target/test-classes</location> + <script>${ant.script}</script> + <build-target>build</build-target> + </export> + <view> + <items> + <source-folder style="packages"> + <label>src/main/java</label> + <location>src/main/java</location> + </source-folder> + <source-folder style="packages"> + <label>src/test/java</label> + <location>src/test/java</location> + </source-folder> + <source-file> + <label>pom</label> + <location>pom.xml</location> + </source-file> + <source-file> + <label>mavencall</label> + <location>nbproject/mavencall.xml</location> + </source-file> + <source-folder style="tree"> + <label>src/main/resources</label> + <location>src/main/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/test/resources</label> + <location>src/test/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/site</label> + <location>src/site</location> + </source-folder> + <source-folder style="tree"> + <label>target</label> + <location>target</location> + </source-folder> + </items> + <context-menu> + <action> + <script>${ant.script}</script> + <label>Refresh Project</label> + <target>refresh-project</target> + </action> + <ide-action name="build"/> + <ide-action name="clean"/> + <ide-action name="rebuild"/> + <ide-action name="javadoc"/> + <ide-action name="run"/> + <ide-action name="test"/> + <action> + <script>${ant.script}</script> + <label>Format Code</label> + <target>jalopy</target> + </action> + </context-menu> + </view> + <subprojects/> + </general-data> + <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2"> + <compilation-unit> + <package-root>src/main/java</package-root> + <built-to>target/classes</built-to> + <source-level>1.5</source-level> + </compilation-unit> + <compilation-unit> + <package-root>src/test/java</package-root> + <unit-tests/> + <classpath mode="compile">target/classes:${local.repository}/junit/junit/3.8.1/junit-3.8.1.jar</classpath> + <built-to>target/test-classes</built-to> + <source-level>1.5</source-level> + </compilation-unit> + </java-data> + </configuration> +</project> Added: trunk/libnet/pom.xml =================================================================== --- trunk/libnet/pom.xml (rev 0) +++ trunk/libnet/pom.xml 2006-10-24 17:21:13 UTC (rev 19) @@ -0,0 +1,111 @@ +<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/maven-v4_0_0.xsd"> +<!--//////////////////////////////////////// + /////////////General//////////////////// + /////////////////////////////////////--> + <modelVersion>4.0.0</modelVersion> + <groupId>org.jlink</groupId> + <artifactId>libnet</artifactId> + <packaging>jar</packaging> + <version>0.0.1-SNAPSHOT</version> + <name>JLink libnet</name> + <url>http://java-link.sf.net/</url> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + </dependencies> +<!--//////////////////////////////////////// + /////////////Reporting////////////////// + /////////////////////////////////////--> + <reporting> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>jxr-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-pmd-plugin</artifactId> + <configuration> + <rulesets> + <ruleset>/rulesets/basic.xml</ruleset> + <ruleset>/rulesets/braces.xml</ruleset> + <ruleset>/rulesets/codesize.xml</ruleset> + <ruleset>/rulesets/coupling.xml</ruleset> + <ruleset>... [truncated message content] |
From: <wel...@us...> - 2006-10-09 17:50:03
|
Revision: 16 http://svn.sourceforge.net/java-link/?rev=16&view=rev Author: welterde0 Date: 2006-10-09 10:49:22 -0700 (Mon, 09 Oct 2006) Log Message: ----------- added module libdb for server projects: added module libdb for server build(build.xml): added dep for jcr-1.0.jar of libdb fixed missing mkdirs in share and server deps server(pom.xml): added deb for libdb server: rewritten the Main class rewritten the Core added JMX support to Main Modified Paths: -------------- trunk/build.xml trunk/server/nbproject/project.xml trunk/server/pom.xml trunk/server/src/main/java/org/jlink/server/jmx/JMXAgent.java trunk/server/src/main/java/org/jlink/server/jmx/run.properties Added Paths: ----------- trunk/libdb/ trunk/libdb/nbproject/ trunk/libdb/nbproject/mavencall.xml trunk/libdb/nbproject/project.properties trunk/libdb/nbproject/project.xml trunk/libdb/pom.xml trunk/libdb/src/ trunk/libdb/src/main/ trunk/libdb/src/main/java/ trunk/libdb/src/main/java/org/ trunk/libdb/src/main/java/org/jlink/ trunk/libdb/src/main/java/org/jlink/server/ trunk/libdb/src/main/java/org/jlink/server/libdb/ trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManager.java trunk/libdb/src/main/java/org/jlink/server/libdb/drivers/ trunk/libdb/src/main/java/org/jlink/server/libdb/drivers/Driver.java trunk/libdb/src/main/java/org/jlink/server/libdb/drivers/JackrabbitDriver.java trunk/libdb/src/main/resources/ trunk/libdb/src/site/ trunk/libdb/src/site/site.xml trunk/libdb/src/test/ trunk/libdb/src/test/java/ trunk/server/src/main/java/org/jlink/server/Main.java trunk/server/src/main/java/org/jlink/server/MainJMX.java trunk/server/src/main/java/org/jlink/server/MainJMXMBean.java Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2006-10-08 19:29:46 UTC (rev 15) +++ trunk/build.xml 2006-10-09 17:49:22 UTC (rev 16) @@ -31,6 +31,7 @@ --> <!--Targets--> <target name="share-deps"> + <mkdir dir="tmp"/> <echo message="downloading dep client/jfunutil.jar"/> <get src="http://${sf.mirror}.dl.sourceforge.net/sourceforge/java-link/jfunutil-5.0.jar" dest="tmp/jfunutil.jar"/> <exec executable="mvn"> @@ -48,8 +49,21 @@ </target> - - <target name="server" depends="share"> + <target name="server-deps" depends="share"> + <mkdir dir="tmp"/> + <echo message="downloading dep server/jcr.jar"/> + <get src="http://${sf.mirror}.dl.sourceforge.net/sourceforge/java-link/jcr-1.0.jar" dest="tmp/jcr.jar"/> + <exec executable="mvn"> + <arg line="install:install-file -DgroupId=jsr170 -DartifactId=jcr -Dversion=1.0 -Dpackaging=jar -Dfile=tmp/jcr.jar"/> + </exec> + <echo message="[done]"/> + </target> + <target name="server-mods" depends="server-deps"> + <exec executable="mvn" dir="libdb" output="libdb.server.build.log"> + <arg value="install"/> + </exec> + </target> + <target name="server" depends="server-deps, server-mods"> <exec executable="mvn" dir="server" output="server.build.log"> <arg value="compile"/> </exec> Added: trunk/libdb/nbproject/mavencall.xml =================================================================== --- trunk/libdb/nbproject/mavencall.xml (rev 0) +++ trunk/libdb/nbproject/mavencall.xml 2006-10-09 17:49:22 UTC (rev 16) @@ -0,0 +1,42 @@ +<project name="client" default="build" basedir=".."> + <property file="nbproject/private/private.properties"/> + <property file="nbproject/project.properties"/> + <target name="build" description="Build"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="package"/> + </exec> + </target> + <target name="clean" description="Clean"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="clean:clean"/> + </exec> + </target> + <target name="javadoc" description="Javadoc"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="site:site"/> + </exec> + </target> + <target name="run" description="Install Locally"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="install"/> + </exec> + </target> + <target name="test" description="Test Project"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="test"/> + </exec> + </target> + <target name="jalopy" description="Format Code"> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="jalopy:format"/> + </exec> + </target> + <target name="refresh-project" description="Refresh Project"> + <copy file="nbproject/mavencall.xml" tofile="nbproject/mavencall.xml.bak"/> + <exec dir="${basedir}" executable="${mvn.path}"> + <arg line="netbeans-freeform:generate-netbeans-project"/> + </exec> + <delete file="nbproject.xml"/> + <move file="nbproject/mavencall.xml.bak" tofile="nbproject/mavencall.xml"/> + </target> +</project> \ No newline at end of file Added: trunk/libdb/nbproject/project.properties =================================================================== --- trunk/libdb/nbproject/project.properties (rev 0) +++ trunk/libdb/nbproject/project.properties 2006-10-09 17:49:22 UTC (rev 16) @@ -0,0 +1,5 @@ +#The netbeans freeform property file +#Mon Oct 09 18:04:07 CEST 2006 +local.repository=/Users/welterde/.m2/repository +mvn.path=mvn +project.directory=/Users/welterde/Documents/dev/jlink/current_trunk/libdb Added: trunk/libdb/nbproject/project.xml =================================================================== --- trunk/libdb/nbproject/project.xml (rev 0) +++ trunk/libdb/nbproject/project.xml 2006-10-09 17:49:22 UTC (rev 16) @@ -0,0 +1,134 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.ant.freeform</type> + <configuration> + <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> + <name>JLink libdb</name> + <properties> + <property name="ant.script">nbproject/mavencall.xml</property> + <property-file>nbproject/project.properties</property-file> + </properties> + <folders> + <source-folder> + <label>src/main/java</label> + <type>java</type> + <location>src/main/java</location> + </source-folder> + <source-folder> + <label>src/test/java</label> + <type>java</type> + <location>src/test/java</location> + </source-folder> + </folders> + <ide-actions> + <action name="build"> + <script>${ant.script}</script> + <target>build</target> + </action> + <action name="clean"> + <script>${ant.script}</script> + <target>clean</target> + </action> + <action name="rebuild"> + <script>${ant.script}</script> + <target>clean</target> + <target>build</target> + </action> + <action name="javadoc"> + <script>${ant.script}</script> + <target>javadoc</target> + </action> + <action name="run"> + <script>${ant.script}</script> + <target>run</target> + </action> + <action name="test"> + <script>${ant.script}</script> + <target>test</target> + </action> + </ide-actions> + <export> + <type>folder</type> + <location>target/classes</location> + <script>${ant.script}</script> + <build-target>build</build-target> + </export> + <export> + <type>folder</type> + <location>target/test-classes</location> + <script>${ant.script}</script> + <build-target>build</build-target> + </export> + <view> + <items> + <source-folder style="packages"> + <label>src/main/java</label> + <location>src/main/java</location> + </source-folder> + <source-folder style="packages"> + <label>src/test/java</label> + <location>src/test/java</location> + </source-folder> + <source-file> + <label>pom</label> + <location>pom.xml</location> + </source-file> + <source-file> + <label>mavencall</label> + <location>nbproject/mavencall.xml</location> + </source-file> + <source-folder style="tree"> + <label>src/main/resources</label> + <location>src/main/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/test/resources</label> + <location>src/test/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/site</label> + <location>src/site</location> + </source-folder> + <source-folder style="tree"> + <label>target</label> + <location>target</location> + </source-folder> + </items> + <context-menu> + <action> + <script>${ant.script}</script> + <label>Refresh Project</label> + <target>refresh-project</target> + </action> + <ide-action name="build"/> + <ide-action name="clean"/> + <ide-action name="rebuild"/> + <ide-action name="javadoc"/> + <ide-action name="run"/> + <ide-action name="test"/> + <action> + <script>${ant.script}</script> + <label>Format Code</label> + <target>jalopy</target> + </action> + </context-menu> + </view> + <subprojects/> + </general-data> + <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2"> + <compilation-unit> + <package-root>src/main/java</package-root> + <classpath mode="compile">${local.repository}/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar:${local.repository}/log4j/log4j/1.2.8/log4j-1.2.8.jar:${local.repository}/commons-beanutils/commons-beanutils/1.4/commons-beanutils-1.4.jar:${local.repository}/commons-lang/commons-lang/2.1/commons-lang-2.1.jar:${local.repository}/commons-collections/commons-collections/3.1/commons-collections-3.1.jar:${local.repository}/org/apache/derby/derby/10.1.1.0/derby-10.1.1.0.jar:${local.repository}/commons-jxpath/commons-jxpath/1.2/commons-jxpath-1.2.jar:${local.repository}/commons-digester/commons-digester/1.6/commons-digester-1.6.jar:${local.repository}/org/apache/jackrabbit/jackrabbit-core/1.0.1/jackrabbit-core-1.0.1.jar:${local.repository}/ant/ant-optional/1.5.1/ant-optional-1.5.1.jar:${local.repository}/lucene/lucene/1.4.3/lucene-1.4.3.jar:${local.repository}/commons-configuration/commons-configuration/1.3/commons-configuration-1.3.jar:${local.repository}/commons-logging/commons-logging/1.0/commons-logging-1.0.jar:${local.repository}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar:${local.repository}/xerces/xercesImpl/2.2.1/xercesImpl-2.2.1.jar:${local.repository}/xerces/xerces/1.2.3/xerces-1.2.3.jar:${local.repository}/xalan/xalan/2.7.0/xalan-2.7.0.jar:${local.repository}/xerces/xmlParserAPIs/2.0.2/xmlParserAPIs-2.0.2.jar:${local.repository}/jdom/jdom/b9/jdom-b9.jar:${local.repository}/javax/servlet/servlet-api/2.2/servlet-api-2.2.jar:${local.repository}/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:${local.repository}/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar:${local.repository}/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar:${local.repository}/org/slf4j/slf4j-log4j12/1.0/slf4j-log4j12-1.0.jar:${local.repository}/geronimo-spec/geronimo-spec-jta/1.0-M1/geronimo-spec-jta-1.0-M1.jar:${local.repository}/jsr170/jcr/1.0/jcr-1.0.jar</classpath> + <built-to>target/classes</built-to> + <source-level>1.5</source-level> + </compilation-unit> + <compilation-unit> + <package-root>src/test/java</package-root> + <unit-tests/> + <classpath mode="compile">target/classes:${local.repository}/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar:${local.repository}/junit/junit/3.8.1/junit-3.8.1.jar:${local.repository}/log4j/log4j/1.2.8/log4j-1.2.8.jar:${local.repository}/commons-beanutils/commons-beanutils/1.4/commons-beanutils-1.4.jar:${local.repository}/commons-lang/commons-lang/2.1/commons-lang-2.1.jar:${local.repository}/commons-collections/commons-collections/3.1/commons-collections-3.1.jar:${local.repository}/org/apache/derby/derby/10.1.1.0/derby-10.1.1.0.jar:${local.repository}/commons-jxpath/commons-jxpath/1.2/commons-jxpath-1.2.jar:${local.repository}/commons-digester/commons-digester/1.6/commons-digester-1.6.jar:${local.repository}/org/apache/jackrabbit/jackrabbit-core/1.0.1/jackrabbit-core-1.0.1.jar:${local.repository}/ant/ant-optional/1.5.1/ant-optional-1.5.1.jar:${local.repository}/lucene/lucene/1.4.3/lucene-1.4.3.jar:${local.repository}/commons-configuration/commons-configuration/1.3/commons-configuration-1.3.jar:${local.repository}/commons-logging/commons-logging/1.0/commons-logging-1.0.jar:${local.repository}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar:${local.repository}/xerces/xercesImpl/2.2.1/xercesImpl-2.2.1.jar:${local.repository}/xerces/xerces/1.2.3/xerces-1.2.3.jar:${local.repository}/xalan/xalan/2.7.0/xalan-2.7.0.jar:${local.repository}/xerces/xmlParserAPIs/2.0.2/xmlParserAPIs-2.0.2.jar:${local.repository}/jdom/jdom/b9/jdom-b9.jar:${local.repository}/javax/servlet/servlet-api/2.2/servlet-api-2.2.jar:${local.repository}/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:${local.repository}/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar:${local.repository}/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar:${local.repository}/org/slf4j/slf4j-log4j12/1.0/slf4j-log4j12-1.0.jar:${local.repository}/geronimo-spec/geronimo-spec-jta/1.0-M1/geronimo-spec-jta-1.0-M1.jar:${local.repository}/jsr170/jcr/1.0/jcr-1.0.jar</classpath> + <built-to>target/test-classes</built-to> + <source-level>1.5</source-level> + </compilation-unit> + </java-data> + </configuration> +</project> Added: trunk/libdb/pom.xml =================================================================== --- trunk/libdb/pom.xml (rev 0) +++ trunk/libdb/pom.xml 2006-10-09 17:49:22 UTC (rev 16) @@ -0,0 +1,141 @@ +<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/maven-v4_0_0.xsd"> +<!--//////////////////////////////////////// + /////////////General//////////////////// + /////////////////////////////////////--> + <modelVersion>4.0.0</modelVersion> + <groupId>org.jlink</groupId> + <artifactId>libdb</artifactId> + <packaging>jar</packaging> + <version>0.0.1-SNAPSHOT</version> + <name>JLink libdb</name> + <url>http://java-link.sf.net/</url> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>commons-configuration</groupId> + <artifactId>commons-configuration</artifactId> + <version>1.3</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.apache.jackrabbit</groupId> + <artifactId>jackrabbit-core</artifactId> + <version>1.0.1</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>jsr170</groupId> + <artifactId>jcr</artifactId> + <version>1.0</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.13</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>commons-configuration</groupId> + <artifactId>commons-configuration</artifactId> + <version>1.3</version> + <scope>compile</scope> + </dependency> + </dependencies> +<!--//////////////////////////////////////// + /////////////Reporting////////////////// + /////////////////////////////////////--> + <reporting> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>jxr-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-pmd-plugin</artifactId> + <configuration> + <rulesets> + <ruleset>/rulesets/basic.xml</ruleset> + <ruleset>/rulesets/braces.xml</ruleset> + <ruleset>/rulesets/codesize.xml</ruleset> + <ruleset>/rulesets/coupling.xml</ruleset> + <ruleset>/rulesets/design.xml</ruleset> + <ruleset>/rulesets/finalizers.xml</ruleset> + <ruleset>/rulesets/imports.xml</ruleset> + <ruleset>/rulesets/javabeans.xml</ruleset> + <ruleset>/rulesets/logging-java.xml</ruleset> + <ruleset>/rulesets/naming.xml</ruleset> + <ruleset>/rulesets/optimizations.xml</ruleset> + <ruleset>/rulesets/strictexception.xml</ruleset> + <ruleset>/rulesets/strings.xml</ruleset> + <ruleset>/rulesets/sunsecure.xml</ruleset> + <ruleset>/rulesets/unusedcode.xml</ruleset> + </rulesets> + <linkXref>true</linkXref> + <sourceEncoding>utf-8</sourceEncoding> + <minimumTokens>100</minimumTokens> + <targetJdk>1.5</targetJdk> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-report-plugin</artifactId> + </plugin> + </plugins> + </reporting> +<!--//////////////////////////////////////// + /////////////Building/////////////////// + /////////////////////////////////////--> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + </plugins> + </build> +<!--//////////////////////////////////////// + /////////////Deploying////////////////// + /////////////////////////////////////--> + <distributionManagement> + <site> + <id>jlink-sf</id> + <url>scp://shell.sf.net/home/groups/j/ja/java-link/htdocs/maven2/libdb</url> + </site> + </distributionManagement> +<!--//////////////////////////////////////// + /////////////Include from root////////// + /////////////////////////////////////--> + <ciManagement> + <system>cruisecontrol</system> + <url>http://welterde.i2p/cruisecontrol/</url> + </ciManagement> + <issueManagement> + <system>sourceforge</system> + <url>http://sourceforge.net/tracker/?group_id=162264</url> + </issueManagement> + <developers> + <developer> + <id>welterde</id> + <email>wel...@ar...</email> + </developer> + </developers> + <scm> + <connection>scm:svn:https://svn.sourceforge.net/svnroot/javalink</connection> + <url>http://svn.sourceforge.net/viewcvs.cgi/java-link/</url> + </scm> +</project> Added: trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManager.java =================================================================== --- trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManager.java (rev 0) +++ trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManager.java 2006-10-09 17:49:22 UTC (rev 16) @@ -0,0 +1,121 @@ +/* + * StorageManager.java + * + * Created on 10. September 2006, 11:13 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.server.libdb; + +import javax.jcr.Repository; +import javax.jcr.RepositoryException; +import org.apache.commons.configuration.Configuration; +import org.apache.log4j.Logger; + +import org.jlink.server.libdb.drivers.Driver; + +/** + * + * @author welterde + */ +public class StorageManager { + //Static Configuration + public static final String ENV_SEP = System.getProperty("file.separator"); + public static final String DB_HOME = System.getProperty("user.home") + + ENV_SEP + ".jlink" + ENV_SEP + "server" + ENV_SEP + "db"; + public static final String DB_CONF = DB_HOME + ENV_SEP + "config.xml"; + + /** Creates a new instance of StorageManager */ + public StorageManager() { + log.debug("Storagemanager created"); + } + + + //Lifecycle + /** + * + * + * + * called when game is started. + */ + public void init(Configuration conf) { + log.info("initing Storagemanger"); + //null check + if(conf == null) + throw new NullPointerException("the config may not be null"); + + // <editor-fold defaultstate="collapsed" desc=" create Driver "> + String driverClass = conf.getString("server.db.driver", "org.jlink." + + "server.libdb.drivers.JackrabbitDriver"); + log.info("creating DatabaseDriver: " + driverClass); + //try to create the driver wanted + try { + //load the class + Class driver = Class.forName(driverClass); + //ok, now create an instance of it + Object obj = driver.newInstance(); + //ok, everything went right, now lets cast it into an Driver and we + //are done here + this.db_driver = (Driver) obj; + + } catch(ClassNotFoundException exc) { + log.fatal("cannot create StorageManager Driver", exc); + //TODO: crash + } catch(InstantiationException exc) { + log.fatal("cannot create StorageManager Driver", exc); + //TODO: crash + } catch(IllegalAccessException exc) { + log.fatal("cannot create StorageManager Driver", exc); + //TODO: crash + } catch(ClassCastException exc) { + log.fatal("cannot create StorageManager Driver", exc); + //TODO: crash + } + // </editor-fold> + + // <editor-fold defaultstate="collapsed" desc=" init Driver "> + try { + String home = null; + String config = null; + + //load the strings from the config, with local defaults + home = conf.getString("server.db.home", "db"); + config = conf.getString("server.db.conf", "db/config.xml"); + this.db_driver.init(config, home); + } catch(RepositoryException exc) { + log.fatal("cannot init driver", exc); + //TODO: crash + } + // </editor-fold> + + } + public void destroy() { + + } + + + + + + + private Repository db_repo = null; + private Driver db_driver = null; + private Configuration conf = null; + private Logger log = Logger.getLogger(StorageManager.class); +} Added: trunk/libdb/src/main/java/org/jlink/server/libdb/drivers/Driver.java =================================================================== --- trunk/libdb/src/main/java/org/jlink/server/libdb/drivers/Driver.java (rev 0) +++ trunk/libdb/src/main/java/org/jlink/server/libdb/drivers/Driver.java 2006-10-09 17:49:22 UTC (rev 16) @@ -0,0 +1,52 @@ +/* + * Driver.java + * + * Created on 10. September 2006, 11:29 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.server.libdb.drivers; + +import java.io.File; +import java.io.IOException; + +import javax.jcr.Repository; +import javax.jcr.RepositoryException; + +/** + * + * @author welterde + */ +public interface Driver { + /** + * Create an Repository. + */ + public Repository init(String config, String home) throws RepositoryException; + + + + public void create(File home) throws RepositoryException; + + public void delete(File home) throws IOException; + + + + public void shutdown(Repository repo) throws RepositoryException; + +} Added: trunk/libdb/src/main/java/org/jlink/server/libdb/drivers/JackrabbitDriver.java =================================================================== --- trunk/libdb/src/main/java/org/jlink/server/libdb/drivers/JackrabbitDriver.java (rev 0) +++ trunk/libdb/src/main/java/org/jlink/server/libdb/drivers/JackrabbitDriver.java 2006-10-09 17:49:22 UTC (rev 16) @@ -0,0 +1,74 @@ +/* + * JackrabbitDriver.java + * + * Created on 10. September 2006, 12:01 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.server.libdb.drivers; + + +import java.io.File; +import java.io.IOException; + + +import javax.jcr.Repository; +import javax.jcr.RepositoryException; + +import org.apache.jackrabbit.core.RepositoryImpl; +import org.apache.jackrabbit.core.config.RepositoryConfig; + +/** + * + * @author welterde + */ +public class JackrabbitDriver implements Driver { + + /** Creates a new instance of JackrabbitDriver */ + public JackrabbitDriver() { + } + + public Repository init(String config, String home) throws RepositoryException { + Repository ret = null; + + //creating config object needed for creation of repo + RepositoryConfig conf = RepositoryConfig.create(config, home); + + //use the conf object to create the repo + ret = RepositoryImpl.create(conf); + + return ret; + } + + public void create(File home) throws RepositoryException { + //TODO: work this out + throw new UnsupportedOperationException("aehm... yeah... you have to configure the jackrabbit yourself"); + } + + public void delete(File home) throws IOException { + //TODO: work this out + throw new UnsupportedOperationException("aehm... yeah... you have also to delete it yourself"); + } + + public void shutdown(Repository repo) throws RepositoryException { + //FIXME: might cause an ClassCastException if this isnt an jackrabbit repo + ((org.apache.jackrabbit.core.RepositoryImpl) repo).shutdown(); + } + +} Property changes on: trunk/libdb/src/site ___________________________________________________________________ Name: svn:ignore + .DS_Store Added: trunk/libdb/src/site/site.xml =================================================================== --- trunk/libdb/src/site/site.xml (rev 0) +++ trunk/libdb/src/site/site.xml 2006-10-09 17:49:22 UTC (rev 16) @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<project name="JLink libdb"> + <bannerRight> + <src>http://sflogo.sourceforge.net/sflogo.php?group_id=162264&type=3</src> + </bannerRight> + <body> + ${reports} + </body> +</project> Modified: trunk/server/nbproject/project.xml =================================================================== --- trunk/server/nbproject/project.xml 2006-10-08 19:29:46 UTC (rev 15) +++ trunk/server/nbproject/project.xml 2006-10-09 17:49:22 UTC (rev 16) @@ -1,134 +1,121 @@ -<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://www.netbeans.org/ns/project/1"> - <type>org.netbeans.modules.ant.freeform</type> - <configuration> - <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> - <name>JLink Server</name> - <properties> - <property name="ant.script">nbproject/mavencall.xml</property> - <property-file>nbproject/project.properties</property-file> - </properties> - <folders> - <source-folder> - <label>src/main/java</label> - <type>java</type> - <location>src/main/java</location> - </source-folder> - <source-folder> - <label>src/test/java</label> - <type>java</type> - <location>src/test/java</location> - </source-folder> - </folders> - <ide-actions> - <action name="build"> - <script>${ant.script}</script> - <target>build</target> - </action> - <action name="clean"> - <script>${ant.script}</script> - <target>clean</target> - </action> - <action name="rebuild"> - <script>${ant.script}</script> - <target>clean</target> - <target>build</target> - </action> - <action name="javadoc"> - <script>${ant.script}</script> - <target>javadoc</target> - </action> - <action name="run"> - <script>${ant.script}</script> - <target>run</target> - </action> - <action name="test"> - <script>${ant.script}</script> - <target>test</target> - </action> - </ide-actions> - <export> - <type>folder</type> - <location>target/classes</location> - <script>${ant.script}</script> - <build-target>build</build-target> - </export> - <export> - <type>folder</type> - <location>target/test-classes</location> - <script>${ant.script}</script> - <build-target>build</build-target> - </export> - <view> - <items> - <source-folder style="packages"> - <label>src/main/java</label> - <location>src/main/java</location> - </source-folder> - <source-folder style="packages"> - <label>src/test/java</label> - <location>src/test/java</location> - </source-folder> - <source-file> - <label>pom</label> - <location>pom.xml</location> - </source-file> - <source-file> - <label>mavencall</label> - <location>nbproject/mavencall.xml</location> - </source-file> - <source-folder style="tree"> - <label>src/main/resources</label> - <location>src/main/resources</location> - </source-folder> - <source-folder style="tree"> - <label>src/test/resources</label> - <location>src/test/resources</location> - </source-folder> - <source-folder style="tree"> - <label>src/site</label> - <location>src/site</location> - </source-folder> - <source-folder style="tree"> - <label>target</label> - <location>target</location> - </source-folder> - </items> - <context-menu> - <action> - <script>${ant.script}</script> - <label>Refresh Project</label> - <target>refresh-project</target> - </action> - <ide-action name="build"/> - <ide-action name="clean"/> - <ide-action name="rebuild"/> - <ide-action name="javadoc"/> - <ide-action name="run"/> - <ide-action name="test"/> - <action> - <script>${ant.script}</script> - <label>Format Code</label> - <target>jalopy</target> - </action> - </context-menu> - </view> - <subprojects/> - </general-data> - <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2"> - <compilation-unit> - <package-root>src/main/java</package-root> - <classpath mode="compile">${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar</classpath> - <built-to>target/classes</built-to> - <source-level>1.5</source-level> - </compilation-unit> - <compilation-unit> - <package-root>src/test/java</package-root> - <unit-tests/> - <classpath mode="compile">target/classes:${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/junit/junit/3.8.1/junit-3.8.1.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar</classpath> - <built-to>target/test-classes</built-to> - <source-level>1.5</source-level> - </compilation-unit> - </java-data> - </configuration> -</project> + <type>org.netbeans.modules.ant.freeform</type> + <configuration> + <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> + <name>JLink Server</name> + <properties> + <property name="ant.script">nbproject/mavencall.xml</property> + <property-file>nbproject/project.properties</property-file> + </properties> + <folders> + <source-folder> + <label>src/main/java</label> + <type>java</type> + <location>src/main/java</location> + </source-folder> + <source-folder> + <label>src/test/java</label> + <type>java</type> + <location>src/test/java</location> + </source-folder> + </folders> + <ide-actions> + <action name="build"> + <script>${ant.script}</script> + <target>build</target> + </action> + <action name="clean"> + <script>${ant.script}</script> + <target>clean</target> + </action> + <action name="rebuild"> + <script>${ant.script}</script> + <target>clean</target> + <target>build</target> + </action> + <action name="javadoc"> + <script>${ant.script}</script> + <target>javadoc</target> + </action> + <action name="run"> + <script>${ant.script}</script> + <target>run</target> + </action> + <action name="test"> + <script>${ant.script}</script> + <target>test</target> + </action> + </ide-actions> + <view> + <items> + <source-file> + <label>pom</label> + <location>pom.xml</location> + </source-file> + <source-file> + <label>mavencall</label> + <location>nbproject/mavencall.xml</location> + </source-file> + <source-folder style="packages"> + <label>src/main/java</label> + <location>src/main/java</location> + </source-folder> + <source-folder style="packages"> + <label>src/test/java</label> + <location>src/test/java</location> + </source-folder> + <source-folder style="tree"> + <label>src/main/resources</label> + <location>src/main/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/test/resources</label> + <location>src/test/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/site</label> + <location>src/site</location> + </source-folder> + <source-folder style="tree"> + <label>target</label> + <location>target</location> + </source-folder> + </items> + <context-menu> + <action> + <script>${ant.script}</script> + <label>Refresh Project</label> + <target>refresh-project</target> + </action> + <ide-action name="build"/> + <ide-action name="clean"/> + <ide-action name="rebuild"/> + <ide-action name="javadoc"/> + <ide-action name="run"/> + <ide-action name="test"/> + <action> + <script>${ant.script}</script> + <label>Format Code</label> + <target>jalopy</target> + </action> + </context-menu> + </view> + <subprojects/> + </general-data> + <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2"> + <compilation-unit> + <package-root>src/main/java</package-root> + <classpath mode="compile">${local.repository}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar:${local.repository}/commons-lang/commons-lang/1.0/commons-lang-1.0.jar:${local.repository}/commons-logging/commons-logging/1.0/commons-logging-1.0.jar:${local.repository}/xerces/xercesImpl/2.2.1/xercesImpl-2.2.1.jar:${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/xerces/xerces/1.2.3/xerces-1.2.3.jar:${local.repository}/commons-beanutils/commons-beanutils/1.4/commons-beanutils-1.4.jar:${local.repository}/xalan/xalan/2.7.0/xalan-2.7.0.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar:${local.repository}/commons-collections/commons-collections/3.1/commons-collections-3.1.jar:${local.repository}/jdom/jdom/b9/jdom-b9.jar:${local.repository}/commons-jxpath/commons-jxpath/1.2/commons-jxpath-1.2.jar:${local.repository}/javax/servlet/servlet-api/2.2/servlet-api-2.2.jar:${local.repository}/commons-digester/commons-digester/1.6/commons-digester-1.6.jar:${local.repository}/ant/ant-optional/1.5.1/ant-optional-1.5.1.jar:${local.repository}/commons-cli/commons-cli/1.0/commons-cli-1.0.jar:${local.repository}/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:${local.repository}/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar:${local.repository}/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar:${local.repository}/commons-configuration/commons-configuration/1.3/commons-configuration-1.3.jar</classpath> + <built-to>target/classes</built-to> + <source-level>1.4</source-level> + </compilation-unit> + <compilation-unit> + <package-root>src/test/java</package-root> + <unit-tests/> + <classpath mode="compile">target/classes:${local.repository}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar:${local.repository}/commons-lang/commons-lang/1.0/commons-lang-1.0.jar:${local.repository}/commons-logging/commons-logging/1.0/commons-logging-1.0.jar:${local.repository}/xerces/xercesImpl/2.2.1/xercesImpl-2.2.1.jar:${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/junit/junit/3.8.1/junit-3.8.1.jar:${local.repository}/xerces/xerces/1.2.3/xerces-1.2.3.jar:${local.repository}/commons-beanutils/commons-beanutils/1.4/commons-beanutils-1.4.jar:${local.repository}/xalan/xalan/2.7.0/xalan-2.7.0.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar:${local.repository}/commons-collections/commons-collections/3.1/commons-collections-3.1.jar:${local.repository}/jdom/jdom/b9/jdom-b9.jar:${local.repository}/commons-jxpath/commons-jxpath/1.2/commons-jxpath-1.2.jar:${local.repository}/javax/servlet/servlet-api/2.2/servlet-api-2.2.jar:${local.repository}/commons-digester/commons-digester/1.6/commons-digester-1.6.jar:${local.repository}/ant/ant-optional/1.5.1/ant-optional-1.5.1.jar:${local.repository}/commons-cli/commons-cli/1.0/commons-cli-1.0.jar:${local.repository}/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:${local.repository}/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar:${local.repository}/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar:${local.repository}/commons-configuration/commons-configuration/1.3/commons-configuration-1.3.jar</classpath> + <built-to>target/test-classes</built-to> + <source-level>1.4</source-level> + </compilation-unit> + </java-data> + </configuration> +</project> \ No newline at end of file Modified: trunk/server/pom.xml =================================================================== --- trunk/server/pom.xml 2006-10-08 19:29:46 UTC (rev 15) +++ trunk/server/pom.xml 2006-10-09 17:49:22 UTC (rev 16) @@ -23,11 +23,29 @@ <scope>compile</scope> </dependency> <dependency> + <groupId>org.jlink</groupId> + <artifactId>libdb</artifactId> + <version>0.0.1-SNAPSHOT</version> + <scope>compile</scope> + </dependency> + <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.13</version> <scope>compile</scope> </dependency> + <dependency> + <groupId>commons-cli</groupId> + <artifactId>commons-cli</artifactId> + <version>1.0</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>commons-configuration</groupId> + <artifactId>commons-configuration</artifactId> + <version>1.3</version> + <scope>compile</scope> + </dependency> </dependencies> <!--//////////////////////////////////////// /////////////Reporting////////////////// Added: trunk/server/src/main/java/org/jlink/server/Main.java =================================================================== --- trunk/server/src/main/java/org/jlink/server/Main.java (rev 0) +++ trunk/server/src/main/java/org/jlink/server/Main.java 2006-10-09 17:49:22 UTC (rev 16) @@ -0,0 +1,198 @@ +/* + * Main.java + * + * Created on 8. Oktober 2006, 11:33 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.server; + +//imports +//imports::own +//imports::own::server +//imports::own::server::jmx +import org.jlink.server.jmx.JMXAgent; + +//imports::sys +//imports::sys::commons-cli +import org.apache.commons.cli.Option; +import org.apache.commons.cli.OptionBuilder; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.GnuParser; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.HelpFormatter; +import org.apache.commons.cli.ParseException; +//import::sys::log4j +import org.apache.log4j.PropertyConfigurator; +import org.apache.log4j.xml.DOMConfigurator; +import org.apache.log4j.BasicConfigurator; +import org.apache.log4j.Logger; +//import::sys::commons-configuration +import org.apache.commons.configuration.Configuration; +import org.apache.commons.configuration.XMLConfiguration; +import org.apache.commons.configuration.ConfigurationException; + +/** + * + * @author welterde + */ +public class Main { + + /** Creates a new instance of Main */ + private Main() { + } + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + String conf_log = null; + String conf_srv = null; + + // <editor-fold defaultstate="collapsed" desc=" parse arguments "> + try { + //create options + // ...configs + Option opt_conf_srv = OptionBuilder.withArgName("config") + .hasArg() + .withDescription("The path to the server configuration") + .withLongOpt("config") + .create('C'); + Option opt_conf_log = OptionBuilder.withArgName("log") + .hasArg() + .withDescription("The path to the log4j configuration") + .withLongOpt("log") + .create('L'); + // ...ops + Option opt_op_help = new Option( "help", "print this message" ); + //asamble + Options opts = new Options(); + opts.addOption(opt_conf_srv); + opts.addOption(opt_conf_log); + opts.addOption(opt_op_help); + //parse + CommandLine cmd = new GnuParser().parse(opts, args); + //process + if(cmd.hasOption("help")) { + new HelpFormatter().printHelp("jlink", opts); + System.exit(0); + } + if(cmd.hasOption('C')) { + conf_srv = cmd.getOptionValue('C'); + } else { + //crash + System.err.println("missing server config, please refer to help"); + System.exit(1); + } + if(cmd.hasOption('L')) { + conf_log = cmd.getOptionValue('L'); + } else { + //crash + System.err.println("missing logging config, please refer to help"); + System.exit(1); + } + } catch(ParseException exc) { + throw new Error("error in cmd", exc); + } + // </editor-fold> + + // <editor-fold defaultstate="collapsed" desc=" init logging "> + //TODO: add existence check + if(conf_log.endsWith("properties") || conf_log.endsWith("cfg")) { + PropertyConfigurator.configure(conf_log); + } else if(conf_log.endsWith("xml")) { + DOMConfigurator.configure(conf_log); + } else { + //VOTE: shall we crash here or use simply BasicConf + BasicConfigurator.configure(); + //TODO: till when vote is over, add log message telling that init logging failed + } + log = Logger.getLogger(Main.class); + log.info("logging started"); + { + Logger sys = Logger.getLogger("jlink.init.sysinfo"); + sys.info("retrieving system information"); + sys.info("java.version: " + System.getProperty("java.version")); + sys.info("java.class.path: "+ System.getProperty("java.class.path")); + sys.info("System.compiler: " + System.getProperty("java.compiler")); + sys.info("os.name: " + System.getProperty("os.name")); + sys.info("os.arch: " + System.getProperty("os.arch")); + sys.info("os.version: " + System.getProperty("os.version")); + sys.info("user.dir: " + System.getProperty("user.dir")); + } + // </editor-fold> + + // <editor-fold defaultstate="collapsed" desc=" load config "> + //TODO: check existance of file + log.info("loading server configuration"); + try { + xconf = new XMLConfiguration(conf_srv); + log.debug("configuration loaded"); + } catch(ConfigurationException exc) { + log.fatal("cannot load server configuration", exc); + System.exit(1); + } + conf = xconf; + + // </editor-fold> + + // <editor-fold defaultstate="collapsed" desc=" startup "> + + // </editor-fold> + + // <editor-fold defaultstate="collapsed" desc=" JMX "> + JMXAgent agent = JMXAgent.getDefault(); + // </editor-fold> + + Core core = new Core(); + + core.start(); + + } + + + + public static void shutdown() { + log.info("shutdown requested"); + //TODO: shutdown everything + log.info("shutdown complete, exiting"); + System.exit(0); + } + + + + public static void confSave() { + //FIX: Threadsave? + log.debug("saving config"); + try { + xconf.save(); + log.trace("config saved"); + } catch (ConfigurationException exc) { + log.warn("couldnt save config", exc); + } + } + public static void confReload() { + //TODO: write this + } + + + private static Configuration conf = null; + private static XMLConfiguration xconf = null; + private static Logger log = null; +} Added: trunk/server/src/main/java/org/jlink/server/MainJMX.java =================================================================== --- trunk/server/src/main/java/org/jlink/server/MainJMX.java (rev 0) +++ trunk/server/src/main/java/org/jlink/server/MainJMX.java 2006-10-09 17:49:22 UTC (rev 16) @@ -0,0 +1,122 @@ +/* + * MainJMX.java + * + * Created on 8. Oktober 2006, 17:03 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.server; +import javax.management.*; +import java.util.Arrays; + +/** + * Dynamic MBean based on StandardMBean + * Class MainJMX + * Server Mainclass Controllbean + * @author welterde + */ +public class MainJMX extends javax.management.StandardMBean implements MainJMXMBean { + + public MainJMX() throws NotCompliantMBeanException { + super(MainJMXMBean.class); + } + + /** + * Next are the methods to compute MBeanInfo. + * You shouldn't update these methods. + */ + protected String getDescription(MBeanInfo info) { + return "Server Mainclass Controllbean"; + } + + protected String getDescription(MBeanAttributeInfo info) { + String description = null; + return description; + } + + protected String getDescription(MBeanOperationInfo op, + MBeanParameterInfo param, + int sequence) { + if (op.getName().equals("shutdown")) { + switch (sequence) { + default : return null; + } + } + return null; + } + + protected String getParameterName(MBeanOperationInfo op, + MBeanParameterInfo param, + int sequence) { + if (op.getName().equals("shutdown")) { + switch (sequence) { + default : return null; + } + } + return null; + } + + protected String getDescription(MBeanOperationInfo info) { + String description = null; + MBeanParameterInfo[] params = info.getSignature(); + String[] signature = new String[params.length]; + for (int i = 0; i < params.length; i++) + signature[i] = params[i].getType(); + String[] methodSignature; + + methodSignature = new String[] { + }; + if (info.getName().equals("shutdown") && Arrays.equals(signature, methodSignature)) { + description = "Operation exposed for management"; + } + + return description; + } + + public MBeanInfo getMBeanInfo() { + MBeanInfo mbinfo = super.getMBeanInfo(); + return new MBeanInfo(mbinfo.getClassName(), + mbinfo.getDescription(), + mbinfo.getAttributes(), + mbinfo.getConstructors(), + mbinfo.getOperations(), + getNotificationInfo()); + } + + public MBeanNotificationInfo[] getNotificationInfo() { + return new MBeanNotificationInfo[] {}; + } + + /** + * Operation exposed for management + */ + public void shutdown() { + Main.shutdown(); + } + + public void configSave() { + Main.confSave(); + } + + public void configReload() { + Main.confReload(); + } +} + + Added: trunk/server/src/main/java/org/jlink/server/MainJMXMBean.java =================================================================== --- trunk/server/src/main/java/org/jlink/server/MainJMXMBean.java (rev 0) +++ trunk/server/src/main/java/org/jlink/server/MainJMXMBean.java 2006-10-09 17:49:22 UTC (rev 16) @@ -0,0 +1,45 @@ +/* + * MainJMXMBean.java + * + * Created on 8. Oktober 2006, 17:03 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.server; + +/** + * Interface MainJMXMBean + * Server Mainclass Controllbean + * @author welterde + */ +public interface MainJMXMBean +{ + /** + * Operation exposed for management + */ + public void shutdown(); + + + public void configSave(); + + + public void configReload(); +} + + Modified: trunk/server/src/main/java/org/jlink/server/jmx/JMXAgent.java =================================================================== --- trunk/server/src/main/java/org/jlink/server/jmx/JMXAgent.java 2006-10-08 19:29:46 UTC (rev 15) +++ trunk/server/src/main/java/org/jlink/server/jmx/JMXAgent.java 2006-10-09 17:49:22 UTC (rev 16) @@ -25,12 +25,19 @@ //import //import::own +//import::own::server +import org.jlink.server.MainJMX; +//import::own::server::libdb +import org.jlink.server.libdb.StorageManagerJMX; //import::sys //import::sys::jmx import javax.management.ObjectName; import javax.management.MBeanServer; import java.lang.management.ManagementFactory; +//import::sys::log4j +import org.apache.log4j.Logger; + /** * JMX agent class. * @author tassilo @@ -40,6 +47,22 @@ * Instantiate and register your MBeans. */ public void init() throws Exception { + log.info("registering jmx objects"); + //Main::JMX::add() + { + log.debug("registering MainJMX"); + ObjectName name = new ObjectName("org.jlink.server:type=MainJMX"); + MainJMX obj = new MainJMX(); + this.mbs.registerMBean(obj, name); + log.debug("done"); + } +// { +// log.debug("registering StorageManagerJMX"); +// ObjectName name = new ObjectName("org.jlink.server.libdb:type=StorageManagerJMX"); +// StorageManagerJMX obj = new StorageManagerJMX(); +// this.mbs.registerMBean(obj, name); +// log.debug("done"); +// } //Core::JMX::add() //Database::JMX::add() @@ -73,6 +96,9 @@ private final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); // Singleton instance private static JMXAgent singleton; + + + private Logger log = Logger.getLogger(JMXAgent.class); } Modified: trunk/server/src/main/java/org/jlink/server/jmx/run.properties =================================================================== --- trunk/server/src/main/java/org/jlink/server/jmx/run.properties 2006-10-08 19:29:46 UTC (rev 15) +++ trunk/server/src/main/java/org/jlink/server/jmx/run.properties 2006-10-09 17:49:22 UTC (rev 16) @@ -244,7 +244,7 @@ # # For a non-default password file location use the foll... [truncated message content] |
From: <wel...@us...> - 2006-10-24 17:40:00
|
Revision: 17 http://svn.sourceforge.net/java-link/?rev=17&view=rev Author: welterde0 Date: 2006-10-24 09:47:32 -0700 (Tue, 24 Oct 2006) Log Message: ----------- pushed newest changes into repo updated PROJECTS file(forgot to update, when libdb was added) removed some local System-dependencies updated StorageManager(removed old code, and removed need for the server.db) Client::NET(commented NetworkManager out, i think it was mising) updated Main to include getter for Core and an instruction to save before shutting down Server::JMX(added method for the Modules to register their JMX-Stuff) fixed site.xml of Server||Share Share::NET(added reusability for the LLConfiguration) Share::NET(fixed some design mistackes on LL) Server::Core(rewritten it from scratch) Modified Paths: -------------- trunk/PROJECTS trunk/client/nbproject/project.properties trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManager.java trunk/server/nbproject/project.properties trunk/server/nbproject/project.xml trunk/server/src/main/java/org/jlink/ServerNetwork.java trunk/server/src/main/java/org/jlink/server/Main.java trunk/server/src/main/java/org/jlink/server/jmx/JMXAgent.java trunk/server/src/site/site.xml trunk/share/src/main/java/org/jlink/net/ll/LLConfiguration.java trunk/share/src/main/java/org/jlink/net/ll/LLConfigurationException.java trunk/share/src/main/java/org/jlink/net/ll/LLConnector.java trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConfiguration.java trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConnector.java trunk/share/src/main/java/org/jlink/net/ll/xml/XMLFactory.java trunk/share/src/site/site.xml Added Paths: ----------- trunk/server/src/main/java/org/jlink/server/Core.java Removed Paths: ------------- trunk/server/src/main/java/org/jlink/server/net/NetworkBackend.java Property Changed: ---------------- trunk/ trunk/client/ trunk/client/nbproject/ trunk/client/src/ trunk/client/src/main/ trunk/client/src/main/java/ trunk/client/src/main/java/org/ trunk/client/src/main/java/org/jlink/ trunk/client/src/main/java/org/jlink/frontend/ trunk/client/src/main/java/org/jlink/frontend/system/ trunk/server/ trunk/server/nbproject/ trunk/server/src/ trunk/server/src/main/ trunk/server/src/main/java/ trunk/server/src/main/java/org/ trunk/server/src/main/java/org/jlink/ trunk/server/src/main/java/org/jlink/server/ trunk/share/ trunk/share/nbproject/ trunk/share/src/ trunk/share/src/main/ trunk/share/src/main/assembly/ Property changes on: trunk ___________________________________________________________________ Name: svn:ignore + .DS_Store Modified: trunk/PROJECTS =================================================================== --- trunk/PROJECTS 2006-10-09 17:49:22 UTC (rev 16) +++ trunk/PROJECTS 2006-10-24 16:47:32 UTC (rev 17) @@ -1,12 +1,13 @@ ################################################### ######################PROJECTS##################### ################################################### -1.Documentation +1 Documentation -2.Client +2 Client -3.Server +3 Server +3.1 libdb -4.Share +4 Share -5.Themes \ No newline at end of file +5 Themes \ No newline at end of file Property changes on: trunk/client ___________________________________________________________________ Name: svn:ignore + .DS_Store Property changes on: trunk/client/nbproject ___________________________________________________________________ Name: svn:ignore + private Modified: trunk/client/nbproject/project.properties =================================================================== --- trunk/client/nbproject/project.properties 2006-10-09 17:49:22 UTC (rev 16) +++ trunk/client/nbproject/project.properties 2006-10-24 16:47:32 UTC (rev 17) @@ -2,4 +2,3 @@ #Sat May 13 22:20:34 CEST 2006 local.repository=/home/tassilo/.m2/repository mvn.path=mvn -project.directory=/home/tassilo/Documents/dev/jlink/feature_maven2/client Property changes on: trunk/client/src ___________________________________________________________________ Name: svn:ignore + .DS_Store Property changes on: trunk/client/src/main ___________________________________________________________________ Name: svn:ignore + .DS_Store Property changes on: trunk/client/src/main/java ___________________________________________________________________ Name: svn:ignore + .DS_Store Property changes on: trunk/client/src/main/java/org ___________________________________________________________________ Name: svn:ignore + .DS_Store Property changes on: trunk/client/src/main/java/org/jlink ___________________________________________________________________ Name: svn:ignore + .DS_Store Property changes on: trunk/client/src/main/java/org/jlink/frontend ___________________________________________________________________ Name: svn:ignore + .DS_Store Property changes on: trunk/client/src/main/java/org/jlink/frontend/system ___________________________________________________________________ Name: svn:ignore + .DS_Store Modified: trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManager.java =================================================================== --- trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManager.java 2006-10-09 17:49:22 UTC (rev 16) +++ trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManager.java 2006-10-24 16:47:32 UTC (rev 17) @@ -35,11 +35,6 @@ * @author welterde */ public class StorageManager { - //Static Configuration - public static final String ENV_SEP = System.getProperty("file.separator"); - public static final String DB_HOME = System.getProperty("user.home") + - ENV_SEP + ".jlink" + ENV_SEP + "server" + ENV_SEP + "db"; - public static final String DB_CONF = DB_HOME + ENV_SEP + "config.xml"; /** Creates a new instance of StorageManager */ public StorageManager() { @@ -61,7 +56,7 @@ throw new NullPointerException("the config may not be null"); // <editor-fold defaultstate="collapsed" desc=" create Driver "> - String driverClass = conf.getString("server.db.driver", "org.jlink." + + String driverClass = conf.getString("driver", "org.jlink." + "server.libdb.drivers.JackrabbitDriver"); log.info("creating DatabaseDriver: " + driverClass); //try to create the driver wanted @@ -95,8 +90,8 @@ String config = null; //load the strings from the config, with local defaults - home = conf.getString("server.db.home", "db"); - config = conf.getString("server.db.conf", "db/config.xml"); + home = conf.getString("home", "db"); + config = conf.getString("conf", "db/config.xml"); this.db_driver.init(config, home); } catch(RepositoryException exc) { log.fatal("cannot init driver", exc); Property changes on: trunk/server ___________________________________________________________________ Name: svn:ignore + .DS_Store Property changes on: trunk/server/nbproject ___________________________________________________________________ Name: svn:ignore + private Modified: trunk/server/nbproject/project.properties =================================================================== --- trunk/server/nbproject/project.properties 2006-10-09 17:49:22 UTC (rev 16) +++ trunk/server/nbproject/project.properties 2006-10-24 16:47:32 UTC (rev 17) @@ -1,5 +1,5 @@ #The netbeans freeform property file -#Mon May 15 20:20:00 CEST 2006 -local.repository=/home/tassilo/.m2/repository +#Mon Oct 09 20:16:43 CEST 2006 +local.repository=/Users/welterde/.m2/repository mvn.path=mvn -project.directory=/home/tassilo/Documents/dev/jlink/feature_maven2/server + Modified: trunk/server/nbproject/project.xml =================================================================== --- trunk/server/nbproject/project.xml 2006-10-09 17:49:22 UTC (rev 16) +++ trunk/server/nbproject/project.xml 2006-10-24 16:47:32 UTC (rev 17) @@ -1,121 +1,134 @@ +<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://www.netbeans.org/ns/project/1"> - <type>org.netbeans.modules.ant.freeform</type> - <configuration> - <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> - <name>JLink Server</name> - <properties> - <property name="ant.script">nbproject/mavencall.xml</property> - <property-file>nbproject/project.properties</property-file> - </properties> - <folders> - <source-folder> - <label>src/main/java</label> - <type>java</type> - <location>src/main/java</location> - </source-folder> - <source-folder> - <label>src/test/java</label> - <type>java</type> - <location>src/test/java</location> - </source-folder> - </folders> - <ide-actions> - <action name="build"> - <script>${ant.script}</script> - <target>build</target> - </action> - <action name="clean"> - <script>${ant.script}</script> - <target>clean</target> - </action> - <action name="rebuild"> - <script>${ant.script}</script> - <target>clean</target> - <target>build</target> - </action> - <action name="javadoc"> - <script>${ant.script}</script> - <target>javadoc</target> - </action> - <action name="run"> - <script>${ant.script}</script> - <target>run</target> - </action> - <action name="test"> - <script>${ant.script}</script> - <target>test</target> - </action> - </ide-actions> - <view> - <items> - <source-file> - <label>pom</label> - <location>pom.xml</location> - </source-file> - <source-file> - <label>mavencall</label> - <location>nbproject/mavencall.xml</location> - </source-file> - <source-folder style="packages"> - <label>src/main/java</label> - <location>src/main/java</location> - </source-folder> - <source-folder style="packages"> - <label>src/test/java</label> - <location>src/test/java</location> - </source-folder> - <source-folder style="tree"> - <label>src/main/resources</label> - <location>src/main/resources</location> - </source-folder> - <source-folder style="tree"> - <label>src/test/resources</label> - <location>src/test/resources</location> - </source-folder> - <source-folder style="tree"> - <label>src/site</label> - <location>src/site</location> - </source-folder> - <source-folder style="tree"> - <label>target</label> - <location>target</location> - </source-folder> - </items> - <context-menu> - <action> - <script>${ant.script}</script> - <label>Refresh Project</label> - <target>refresh-project</target> - </action> - <ide-action name="build"/> - <ide-action name="clean"/> - <ide-action name="rebuild"/> - <ide-action name="javadoc"/> - <ide-action name="run"/> - <ide-action name="test"/> - <action> - <script>${ant.script}</script> - <label>Format Code</label> - <target>jalopy</target> - </action> - </context-menu> - </view> - <subprojects/> - </general-data> - <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2"> - <compilation-unit> - <package-root>src/main/java</package-root> - <classpath mode="compile">${local.repository}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar:${local.repository}/commons-lang/commons-lang/1.0/commons-lang-1.0.jar:${local.repository}/commons-logging/commons-logging/1.0/commons-logging-1.0.jar:${local.repository}/xerces/xercesImpl/2.2.1/xercesImpl-2.2.1.jar:${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/xerces/xerces/1.2.3/xerces-1.2.3.jar:${local.repository}/commons-beanutils/commons-beanutils/1.4/commons-beanutils-1.4.jar:${local.repository}/xalan/xalan/2.7.0/xalan-2.7.0.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar:${local.repository}/commons-collections/commons-collections/3.1/commons-collections-3.1.jar:${local.repository}/jdom/jdom/b9/jdom-b9.jar:${local.repository}/commons-jxpath/commons-jxpath/1.2/commons-jxpath-1.2.jar:${local.repository}/javax/servlet/servlet-api/2.2/servlet-api-2.2.jar:${local.repository}/commons-digester/commons-digester/1.6/commons-digester-1.6.jar:${local.repository}/ant/ant-optional/1.5.1/ant-optional-1.5.1.jar:${local.repository}/commons-cli/commons-cli/1.0/commons-cli-1.0.jar:${local.repository}/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:${local.repository}/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar:${local.repository}/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar:${local.repository}/commons-configuration/commons-configuration/1.3/commons-configuration-1.3.jar</classpath> - <built-to>target/classes</built-to> - <source-level>1.4</source-level> - </compilation-unit> - <compilation-unit> - <package-root>src/test/java</package-root> - <unit-tests/> - <classpath mode="compile">target/classes:${local.repository}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar:${local.repository}/commons-lang/commons-lang/1.0/commons-lang-1.0.jar:${local.repository}/commons-logging/commons-logging/1.0/commons-logging-1.0.jar:${local.repository}/xerces/xercesImpl/2.2.1/xercesImpl-2.2.1.jar:${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/junit/junit/3.8.1/junit-3.8.1.jar:${local.repository}/xerces/xerces/1.2.3/xerces-1.2.3.jar:${local.repository}/commons-beanutils/commons-beanutils/1.4/commons-beanutils-1.4.jar:${local.repository}/xalan/xalan/2.7.0/xalan-2.7.0.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar:${local.repository}/commons-collections/commons-collections/3.1/commons-collections-3.1.jar:${local.repository}/jdom/jdom/b9/jdom-b9.jar:${local.repository}/commons-jxpath/commons-jxpath/1.2/commons-jxpath-1.2.jar:${local.repository}/javax/servlet/servlet-api/2.2/servlet-api-2.2.jar:${local.repository}/commons-digester/commons-digester/1.6/commons-digester-1.6.jar:${local.repository}/ant/ant-optional/1.5.1/ant-optional-1.5.1.jar:${local.repository}/commons-cli/commons-cli/1.0/commons-cli-1.0.jar:${local.repository}/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:${local.repository}/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar:${local.repository}/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar:${local.repository}/commons-configuration/commons-configuration/1.3/commons-configuration-1.3.jar</classpath> - <built-to>target/test-classes</built-to> - <source-level>1.4</source-level> - </compilation-unit> - </java-data> - </configuration> -</project> \ No newline at end of file + <type>org.netbeans.modules.ant.freeform</type> + <configuration> + <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> + <name>JLink Server</name> + <properties> + <property name="ant.script">nbproject/mavencall.xml</property> + <property-file>nbproject/project.properties</property-file> + </properties> + <folders> + <source-folder> + <label>src/main/java</label> + <type>java</type> + <location>src/main/java</location> + </source-folder> + <source-folder> + <label>src/test/java</label> + <type>java</type> + <location>src/test/java</location> + </source-folder> + </folders> + <ide-actions> + <action name="build"> + <script>${ant.script}</script> + <target>build</target> + </action> + <action name="clean"> + <script>${ant.script}</script> + <target>clean</target> + </action> + <action name="rebuild"> + <script>${ant.script}</script> + <target>clean</target> + <target>build</target> + </action> + <action name="javadoc"> + <script>${ant.script}</script> + <target>javadoc</target> + </action> + <action name="run"> + <script>${ant.script}</script> + <target>run</target> + </action> + <action name="test"> + <script>${ant.script}</script> + <target>test</target> + </action> + </ide-actions> + <export> + <type>folder</type> + <location>target/classes</location> + <script>${ant.script}</script> + <build-target>build</build-target> + </export> + <export> + <type>folder</type> + <location>target/test-classes</location> + <script>${ant.script}</script> + <build-target>build</build-target> + </export> + <view> + <items> + <source-folder style="packages"> + <label>src/main/java</label> + <location>src/main/java</location> + </source-folder> + <source-folder style="packages"> + <label>src/test/java</label> + <location>src/test/java</location> + </source-folder> + <source-file> + <label>pom</label> + <location>pom.xml</location> + </source-file> + <source-file> + <label>mavencall</label> + <location>nbproject/mavencall.xml</location> + </source-file> + <source-folder style="tree"> + <label>src/main/resources</label> + <location>src/main/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/test/resources</label> + <location>src/test/resources</location> + </source-folder> + <source-folder style="tree"> + <label>src/site</label> + <location>src/site</location> + </source-folder> + <source-folder style="tree"> + <label>target</label> + <location>target</location> + </source-folder> + </items> + <context-menu> + <action> + <script>${ant.script}</script> + <label>Refresh Project</label> + <target>refresh-project</target> + </action> + <ide-action name="build"/> + <ide-action name="clean"/> + <ide-action name="rebuild"/> + <ide-action name="javadoc"/> + <ide-action name="run"/> + <ide-action name="test"/> + <action> + <script>${ant.script}</script> + <label>Format Code</label> + <target>jalopy</target> + </action> + </context-menu> + </view> + <subprojects/> + </general-data> + <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2"> + <compilation-unit> + <package-root>src/main/java</package-root> + <classpath mode="compile">${local.repository}/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar:${local.repository}/commons-beanutils/commons-beanutils/1.4/commons-beanutils-1.4.jar:${local.repository}/yan/jfunutil/5.0/jfunutil-5.0.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar:${local.repository}/commons-collections/commons-collections/3.1/commons-collections-3.1.jar:${local.repository}/org/apache/derby/derby/10.1.1.0/derby-10.1.1.0.jar:${local.repository}/commons-jxpath/commons-jxpath/1.2/commons-jxpath-1.2.jar:${local.repository}/org/apache/jackrabbit/jackrabbit-core/1.0.1/jackrabbit-core-1.0.1.jar:${local.repository}/commons-digester/commons-digester/1.6/commons-digester-1.6.jar:${local.repository}/ant/ant-optional/1.5.1/ant-optional-1.5.1.jar:${local.repository}/lucene/lucene/1.4.3/lucene-1.4.3.jar:${local.repository}/commons-cli/commons-cli/1.0/commons-cli-1.0.jar:${local.repository}/org/jlink/libdb/0.0.1-SNAPSHOT/libdb-0.0.1-SNAPSHOT.jar:${local.repository}/commons-configuration/commons-configuration/1.3/commons-configuration-1.3.jar:${local.repository}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar:${local.repository}/commons-lang/commons-lang/1.0/commons-lang-1.0.jar:${local.repository}/commons-logging/commons-logging/1.0/commons-logging-1.0.jar:${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/xerces/xercesImpl/2.2.1/xercesImpl-2.2.1.jar:${local.repository}/xerces/xerces/1.2.3/xerces-1.2.3.jar:${local.repository}/xalan/xalan/2.7.0/xalan-2.7.0.jar:${local.repository}/yan/yan/5.0/yan-5.0.jar:${local.repository}/xerces/xmlParserAPIs/2.0.2/xmlParserAPIs-2.0.2.jar:${local.repository}/jdom/jdom/b9/jdom-b9.jar:${local.repository}/javax/servlet/servlet-api/2.2/servlet-api-2.2.jar:${local.repository}/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:${local.repository}/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar:${local.repository}/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar:${local.repository}/geronimo-spec/geronimo-spec-jta/1.0-M1/geronimo-spec-jta-1.0-M1.jar:${local.repository}/org/slf4j/slf4j-log4j12/1.0/slf4j-log4j12-1.0.jar:${local.repository}/jsr170/jcr/1.0/jcr-1.0.jar</classpath> + <built-to>target/classes</built-to> + <source-level>1.5</source-level> + </compilation-unit> + <compilation-unit> + <package-root>src/test/java</package-root> + <unit-tests/> + <classpath mode="compile">target/classes:${local.repository}/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar:${local.repository}/junit/junit/3.8.1/junit-3.8.1.jar:${local.repository}/commons-beanutils/commons-beanutils/1.4/commons-beanutils-1.4.jar:${local.repository}/yan/jfunutil/5.0/jfunutil-5.0.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar:${local.repository}/commons-collections/commons-collections/3.1/commons-collections-3.1.jar:${local.repository}/org/apache/derby/derby/10.1.1.0/derby-10.1.1.0.jar:${local.repository}/commons-jxpath/commons-jxpath/1.2/commons-jxpath-1.2.jar:${local.repository}/org/apache/jackrabbit/jackrabbit-core/1.0.1/jackrabbit-core-1.0.1.jar:${local.repository}/commons-digester/commons-digester/1.6/commons-digester-1.6.jar:${local.repository}/ant/ant-optional/1.5.1/ant-optional-1.5.1.jar:${local.repository}/lucene/lucene/1.4.3/lucene-1.4.3.jar:${local.repository}/commons-cli/commons-cli/1.0/commons-cli-1.0.jar:${local.repository}/org/jlink/libdb/0.0.1-SNAPSHOT/libdb-0.0.1-SNAPSHOT.jar:${local.repository}/commons-configuration/commons-configuration/1.3/commons-configuration-1.3.jar:${local.repository}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar:${local.repository}/commons-lang/commons-lang/1.0/commons-lang-1.0.jar:${local.repository}/commons-logging/commons-logging/1.0/commons-logging-1.0.jar:${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/xerces/xercesImpl/2.2.1/xercesImpl-2.2.1.jar:${local.repository}/xerces/xerces/1.2.3/xerces-1.2.3.jar:${local.repository}/xalan/xalan/2.7.0/xalan-2.7.0.jar:${local.repository}/yan/yan/5.0/yan-5.0.jar:${local.repository}/xerces/xmlParserAPIs/2.0.2/xmlParserAPIs-2.0.2.jar:${local.repository}/jdom/jdom/b9/jdom-b9.jar:${local.repository}/javax/servlet/servlet-api/2.2/servlet-api-2.2.jar:${local.repository}/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:${local.repository}/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar:${local.repository}/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar:${local.repository}/geronimo-spec/geronimo-spec-jta/1.0-M1/geronimo-spec-jta-1.0-M1.jar:${local.repository}/org/slf4j/slf4j-log4j12/1.0/slf4j-log4j12-1.0.jar:${local.repository}/jsr170/jcr/1.0/jcr-1.0.jar</classpath> + <built-to>target/test-classes</built-to> + <source-level>1.5</source-level> + </compilation-unit> + </java-data> + </configuration> +</project> Property changes on: trunk/server/src ___________________________________________________________________ Name: svn:ignore + .DS_Store Property changes on: trunk/server/src/main ___________________________________________________________________ Name: svn:ignore + .DS_Store Property changes on: trunk/server/src/main/java ___________________________________________________________________ Name: svn:ignore + .DS_Store Property changes on: trunk/server/src/main/java/org ___________________________________________________________________ Name: svn:ignore + .DS_Store Property changes on: trunk/server/src/main/java/org/jlink ___________________________________________________________________ Name: svn:ignore + .DS_Store Modified: trunk/server/src/main/java/org/jlink/ServerNetwork.java =================================================================== --- trunk/server/src/main/java/org/jlink/ServerNetwork.java 2006-10-09 17:49:22 UTC (rev 16) +++ trunk/server/src/main/java/org/jlink/ServerNetwork.java 2006-10-24 16:47:32 UTC (rev 17) @@ -28,7 +28,6 @@ import java.io.IOException; import org.jlink.Options; //import::own::net -import org.jlink.server.net.NetworkBackend; import org.jlink.net.ConnectionHandler; import org.jlink.net.ConnectionListener; import org.jlink.net.Message; @@ -62,11 +61,13 @@ ret.log.debug("Network::createParts()"); try { ret.log.debug("trying to listen on Port: " + Options.NETWORK_LISTEN_PORT); - ret.mod_back = NetworkBackend.listen(ret, Options.NETWORK_LISTEN_PORT); + //TODO: something to put here ret.log.debug("ok we're listening"); - } catch (IOException ex) { - ret.log.error("Cannot listen", ex); - throw new RuntimeException("cannot listen", ex); + //} catch (IOException ex) { + // ret.log.error("Cannot listen", ex); + //throw new RuntimeException("cannot listen", ex); + } finally { + } @@ -152,7 +153,6 @@ //Composite// ///////////// private ServerCore mod_core = null; - private NetworkBackend mod_back = null; private Logger log = null; //////////////////// Property changes on: trunk/server/src/main/java/org/jlink/server ___________________________________________________________________ Name: svn:ignore + .DS_Store Added: trunk/server/src/main/java/org/jlink/server/Core.java =================================================================== --- trunk/server/src/main/java/org/jlink/server/Core.java (rev 0) +++ trunk/server/src/main/java/org/jlink/server/Core.java 2006-10-24 16:47:32 UTC (rev 17) @@ -0,0 +1,124 @@ +/* + * Core.java + * + * Created on 8. Oktober 2006, 18:30 + * + * JLink: An Introversion Uplink Clone with multiplayer support. + * Copyright (C) 2006 Tassilo Schweyer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.jlink.server; + +//import::own +//import::own::server +import org.jlink.server.Main; +import org.jlink.server.jmx.JMXAgent; +//import::own::server::libdb +import org.jlink.server.libdb.StorageManager; +import org.jlink.server.libdb.StorageManagerJMX; +//import::sys +//import::sys::commons-configuration +import org.apache.commons.configuration.Configuration; +//import::sys::log4j +import org.apache.log4j.Logger; + +/** + * + * @author welterde + */ +public class Core implements Runnable { + + /** Creates a new instance of Core */ + public Core() { + log.debug("Core created"); + } + + public void init(Configuration conf) { + log.info("initing Core"); + if(conf == null) + throw new NullPointerException("the config may not be null"); + //init StorageManager + { + try { + log.info("creating StorageManager"); + Configuration comp_conf = conf.subset("server.db"); + this.app_storage = new StorageManager(); + this.app_storage.init(comp_conf); + this.jmx_storage = new StorageManagerJMX(this.app_storage); + JMXAgent.getDefault().register("org.jlink.server.libdb:type=StorageManagerJMX", this.jmx_storage); + log.debug("done"); + } catch(Exception exc) { + log.error("creation failed, ignoring(wish me luck)", exc); + //TODO: split problems into StorageManger and JMX + } + } + } + + + + public void start() { + log.info("starting core..."); + this.thread.start(); + log.debug("core started"); + } + public void run() { + log.debug("waiting for lock to run"); + synchronized(runLock) { + log.debug("got lock"); + while(true) { + if(this.doStop) + break; + try { + Thread.sleep(10); + } catch(Exception exc) { + log.error("unknown Exception cought", exc); + } catch(Error err) { + log.error("unknown Error caught", err); + } finally { + + } + } + } + } + public void stop() { + this.doStop = true; + } + public void shutdown() { + stop(); + + } + + + + + //Composite getter + public StorageManager getStorage() { + return this.app_storage; + } + + + private Logger log = Logger.getLogger(Core.class); + private Thread thread = new Thread(this); + private Object runLock = "lock009ij"; + + private boolean doStop = false; + + //Composite stuff + public StorageManager app_storage = null; + public StorageManagerJMX jmx_storage = null; + +} Modified: trunk/server/src/main/java/org/jlink/server/Main.java =================================================================== --- trunk/server/src/main/java/org/jlink/server/Main.java 2006-10-09 17:49:22 UTC (rev 16) +++ trunk/server/src/main/java/org/jlink/server/Main.java 2006-10-24 16:47:32 UTC (rev 17) @@ -170,6 +170,7 @@ public static void shutdown() { log.info("shutdown requested"); + confSave(); //TODO: shutdown everything log.info("shutdown complete, exiting"); System.exit(0); @@ -188,11 +189,18 @@ } } public static void confReload() { + log.info("hit unimplemented method"); //TODO: write this } + //Core Access + public static Core getCore() { + return app_core; + } + private static Configuration conf = null; private static XMLConfiguration xconf = null; private static Logger log = null; + private static Core app_core = null; } Modified: trunk/server/src/main/java/org/jlink/server/jmx/JMXAgent.java =================================================================== --- trunk/server/src/main/java/org/jlink/server/jmx/JMXAgent.java 2006-10-09 17:49:22 UTC (rev 16) +++ trunk/server/src/main/java/org/jlink/server/jmx/JMXAgent.java 2006-10-24 16:47:32 UTC (rev 17) @@ -34,6 +34,8 @@ import javax.management.ObjectName; import javax.management.MBeanServer; import java.lang.management.ManagementFactory; +import javax.management.OperationsException; +import javax.management.MBeanRegistrationException; //import::sys::log4j import org.apache.log4j.Logger; @@ -56,23 +58,23 @@ this.mbs.registerMBean(obj, name); log.debug("done"); } -// { -// log.debug("registering StorageManagerJMX"); -// ObjectName name = new ObjectName("org.jlink.server.libdb:type=StorageManagerJMX"); -// StorageManagerJMX obj = new StorageManagerJMX(); -// this.mbs.registerMBean(obj, name); -// log.debug("done"); -// } - //Core::JMX::add() - //Database::JMX::add() + } + + public void register(String name, Object obj) { + //TODO: (low) add check for logging level + log.debug("registering JMX object name: " + name); + try { + ObjectName oname = new ObjectName(name); + this.mbs.registerMBean(obj, oname); + log.debug("registration complete"); + } catch(OperationsException exc) { + log.warn("couldnt register JMX object ", exc); + } catch(MBeanRegistrationException exc) { + log.warn("couldnt register JMX object ", exc); + } - //Frontend::JMX::add() - - //Network::JMX::add() - } - /** * Returns an agent singleton. */ Deleted: trunk/server/src/main/java/org/jlink/server/net/NetworkBackend.java =================================================================== --- trunk/server/src/main/java/org/jlink/server/net/NetworkBackend.java 2006-10-09 17:49:22 UTC (rev 16) +++ trunk/server/src/main/java/org/jlink/server/net/NetworkBackend.java 2006-10-24 16:47:32 UTC (rev 17) @@ -1,145 +0,0 @@ -/* - * NetworkBackend.java - * - * Created on 2. März 2006, 22:45 - * - * JLink: An Introversion Uplink Clone with multiplayer support. - * Copyright (C) 2006 Tassilo Schweyer - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -package org.jlink.server.net; - -//import -//import::own -import org.jlink.Options; -import org.jlink.ServerNetwork; -//import::own::net -import org.jlink.net.ConnectionHandler; -import org.jlink.net.Message; -//import::own::net::msgs -import org.jlink.net.msgs.ConnectionStarting; -import org.jlink.net.msgs.ConnectionAccepted; -//import::sys -import org.apache.log4j.Logger; -import org.apache.log4j.NDC; -//import::sys::io -import java.io.IOException; -//import::sys::net -import java.net.Socket; -import java.net.ServerSocket; - - -/** - * - * @author tassilo - */ -public class NetworkBackend { - - public static NetworkBackend listen(ServerNetwork net, int port) throws IOException { - NetworkBackend ret = null; - ret = new NetworkBackend(); - ret.log = Logger.getLogger("jlink.net.backend"); - ret.log.info("NetworkBackend::listen(" + port + ")"); - - ret.mod_net = net; - //creating Socket - ret.log.debug("ServerSocket::create(port)"); - ret.conSock = new ServerSocket(port); - ret.log.debug("SS::create(port)=> true"); - - //starting Thread - final NetworkBackend t = ret; - ret.thread = new Thread() { - public void run() { - t.runNB(); - } - }; - ret.thread.setDaemon(true); - ret.thread.setName("network-runner"); - ret.thread.start(); - - return ret; - } - - - private NetworkBackend() { - } - - - private void runNB() { - //wait some time to get the creator time to start - try { - Thread.sleep(2000); - } catch(Exception e) { - //should not happen, ignore it - } - int c_err = Options.NETWORKBACK_C_ERR; - try { - while(true) { - try { - this.run(); - c_err++; - if(c_err > (3 * Options.NETWORKBACK_C_ERR)) - c_err = Options.NETWORKBACK_C_ERR; - } catch(Exception e) { - log.error("NetworkBackend::catchException", e); - c_err--; - if(c_err < 0) { - log.fatal("Error Count got too big => self-kill"); - throw new Error("c_err < 0"); - } - } - } - } catch(Throwable t) { - log.debug("Thread ended with Throwable", t); - this.cleanup(); - } - } - private void run() throws Exception { - NDC.clear(); - log.info("waiting for connection"); - Socket cur = this.conSock.accept(); - this.conCount++; - NDC.push("" + this.conCount); - log.info("got Connection from " + cur.getInetAddress()); - NDC.push("init"); - log.debug("creating ConnectionHandler"); - ConnectionHandler h = ConnectionHandler.connect(cur); - log.debug("waiting for ConnectionStart"); - Message in0 = h.reciveMessage(); - log.debug("got Message, answering"); - h.sendMessage(new ConnectionAccepted()); - log.debug("registering Connection"); - this.mod_net.conRegister(conCount, h); - - NDC.pop(); - //put the connection somewhere - NDC.pop(); - } - private void cleanup() { - - } - - //////////////////////// - ///internal Variables/// - //////////////////////// - private ServerSocket conSock = null; - private int conCount = 0; - private Logger log = null; - private Thread thread = null; - private ServerNetwork mod_net = null; -} Modified: trunk/server/src/site/site.xml =================================================================== --- trunk/server/src/site/site.xml 2006-10-09 17:49:22 UTC (rev 16) +++ trunk/server/src/site/site.xml 2006-10-24 16:47:32 UTC (rev 17) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<project name="JLink Client"> +<project name="JLink Server"> <bannerRight> <src>http://sflogo.sourceforge.net/sflogo.php?group_id=162264&type=3</src> </bannerRight> Property changes on: trunk/share ___________________________________________________________________ Name: svn:ignore + .DS_Store Property changes on: trunk/share/nbproject ___________________________________________________________________ Name: svn:ignore + private Property changes on: trunk/share/src ___________________________________________________________________ Name: svn:ignore + .DS_Store Property changes on: trunk/share/src/main ___________________________________________________________________ Name: svn:ignore + .DS_Store Property changes on: trunk/share/src/main/assembly ___________________________________________________________________ Name: svn:ignore + .DS_Store Modified: trunk/share/src/main/java/org/jlink/net/ll/LLConfiguration.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/ll/LLConfiguration.java 2006-10-09 17:49:22 UTC (rev 16) +++ trunk/share/src/main/java/org/jlink/net/ll/LLConfiguration.java 2006-10-24 16:47:32 UTC (rev 17) @@ -36,5 +36,8 @@ public String getDescription(int id, Locale l); public String getDescription(int id); - public void setValue(int id, String val); + public void setValue(int id, String val) throws LLConfigurationException; + + //operations + public void reset(); } Modified: trunk/share/src/main/java/org/jlink/net/ll/LLConfigurationException.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/ll/LLConfigurationException.java 2006-10-09 17:49:22 UTC (rev 16) +++ trunk/share/src/main/java/org/jlink/net/ll/LLConfigurationException.java 2006-10-24 16:47:32 UTC (rev 17) @@ -43,4 +43,8 @@ public LLConfigurationException(String msg) { super(msg); } + + public LLConfigurationException(String msg, Throwable t) { + super(msg, t); + } } Modified: trunk/share/src/main/java/org/jlink/net/ll/LLConnector.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/ll/LLConnector.java 2006-10-09 17:49:22 UTC (rev 16) +++ trunk/share/src/main/java/org/jlink/net/ll/LLConnector.java 2006-10-24 16:47:32 UTC (rev 17) @@ -34,7 +34,9 @@ public void recive(LLEvent[] evts) throws LLConnectionException; public boolean isAlive(); - public void close() throws LLConnectionException; - public long ping() throws LLConnectionException; + public int ping() throws LLConnectionException; + + public void connect() throws LLConnectionException; + public void disconnect() throws LLConnectionException; } Modified: trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConfiguration.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConfiguration.java 2006-10-09 17:49:22 UTC (rev 16) +++ trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConfiguration.java 2006-10-24 16:47:32 UTC (rev 17) @@ -25,6 +25,7 @@ import java.util.Locale; import org.jlink.net.ll.LLConfiguration; +import org.jlink.net.ll.LLConfigurationException; /** * @@ -37,45 +38,113 @@ } public String[] getNames() { - return this.dat_names; + return null; } public String getDefault(int id) { - return this.dat_default[id]; + //bypass, if id is non valid + if(id > 1 || id < 0) + return null; + //The result, which will be returned later + String ret = null; + //get the right default value + if(id == 0) + ret = this.prop_hostname_default; + else + ret = this.prop_hostport_default; + //return it + return ret; } public String getValue(int id) { - return this.dat_values[id]; + //NOTE: C&P from getDefault(int id) + // without the default thingy + //bypass, if id is non valid + if(id > 1 || id < 0) + return null; + //The result, which will be returned later + String ret = null; + //get the right default value + if(id == 0) + ret = this.prop_hostname; + else + ret = this.prop_hostport; + //return it + return ret; } - public String getDescription(int id, final Locale l) { + public String getDescription(int id, Locale l) { + //Dirty-Hack: the Local is ignored, cause there actually no translations return this.getDescription(id); } public String getDescription(int id) { - return this.dat_descs[id]; + //NOTE: C&P from getDefault(int id) + // with the descriptons + //bypass, if id is non valid + if(id > 1 || id < 0) + return null; + //The result, which will be returned later + String ret = null; + //get the right default value + if(id == 0) + ret = this.prop_hostname_desc; + else + ret = this.prop_hostport_desc; + //return it + return ret; } - public void setValue(int id, String val) { - this.dat_values[id] = val; + public void setValue(int id, String val) throws LLConfigurationException { + //bypass, if id is non valid + if(id > 1 || id < 0) + return; + //check for non-null value + if(val == null) + throw new NullPointerException("Value may not be null"); + //validate & set the value + if(id == 0) { + //check, if the hostname has zero-chars + if(val.equals("")) + throw new LLConfigurationException("The hostname may not be zero-lengthted"); + this.prop_hostname = val; + } else { + //cast into an number + int p = 0; + try { + p = Integer.parseInt(val); + } catch(NumberFormatException exc) { + new LLConfigurationException("The Port may only be an number", exc); + } + //check port boundary + if(p < 1) + throw new LLConfigurationException("The port may not be smaller than 1"); + if(p > 65536) + throw new LLConfigurationException("The port may not be bigger than 65536"); + //set the value + this.prop_hostport = val; + } } + + public void reset() { + this.prop_hostname = this.prop_hostname_default; + this.prop_hostport = this.prop_hostport_default; + } - private String[] dat_names = new String[] { - "Host", - "Port", - "compress" - }; - private String[] dat_default = new String[] { - "localhost", - "4236", - "true" - }; - private String[] dat_values = new String[3]; - private String[] dat_descs = new String[] { - "The Hostname of the remote host", - "The Port of the remote host", - "Should the Data be compressed(true/false)" - }; + ////////////// + //Properties + ////////////// + + //ID:0 + private String prop_hostname = "localhost"; + private String prop_hostname_default = "localhost"; + private String prop_hostname_name = "Hostname"; + private String prop_hostname_desc = "The name of the host, you want to connect to"; + //ID:1 + private String prop_hostport = "3742"; + private String prop_hostport_default = "3742"; + private String prop_hostport_name = "Port"; + private String prop_hostport_desc = "The port of the host, you want to connect to"; } Modified: trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConnector.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConnector.java 2006-10-09 17:49:22 UTC (rev 16) +++ trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConnector.java 2006-10-24 16:47:32 UTC (rev 17) @@ -36,31 +36,57 @@ public class XMLConnector implements LLConnector { /** Creates a new instance of XMLConnector */ - public XMLConnector(LLConfiguration conf) throws LLConfigurationException { + XMLConnector(String host, int port) { + //really basic checkings, should never happen, if so then bug + if(host == null) + throw new NullPointerException(); + this.config_host = host; + this.config_port = port; } - + public void send(LLEvent evt) throws LLConnectionException { } - + public void send(LLEvent[] evts) throws LLConnectionException { } - + public LLEvent recive() throws LLConnectionException { return null; } - + public void recive(LLEvent[] evts) throws LLConnectionException { } - + public boolean isAlive() { return true; } + + public int ping() throws LLConnectionException { + return 0; + } - public void close() throws LLConnectionException { + public void connect() throws LLConnectionException { + //bypass, if connect already has been called + if(this.status_connected) + return; } - public long ping() throws LLConnectionException { - return 0L; + public void disconnect() throws LLConnectionException { + //bypass, if connect has never been called + if(!this.status_connected) + return; + //try to ping remote host, if there is an Exception } + + + + + private boolean status_connected = false;//means the own state, not if it is really connect + + ////////////////// + //Configuration + ////////////////// + private String config_host = ""; + private int config_port = 0; } Modified: trunk/share/src/main/java/org/jlink/net/ll/xml/XMLFactory.java =================================================================== --- trunk/share/src/main/java/org/jlink/net/ll/xml/XMLFactory.java 2006-10-09 17:49:22 UTC (rev 16) +++ trunk/share/src/main/java/org/jlink/net/ll/xml/XMLFactory.java 2006-10-24 16:47:32 UTC (rev 17) @@ -40,17 +40,39 @@ } public LLConfiguration getConfig() { - return new XMLConfiguration(); + //if there isnt already an config, create it + if(this.conf == null) + this.conf = new XMLConfiguration(); + return this.conf; } public void setConfig(LLConfiguration conf) throws LLConfigurationException { + //first check for not null + if(conf == null) + throw new NullPointerException("config may not be null"); + XMLConfiguration xconf = null; + //try to cast to it into an XMLConfiguration + try { + xconf = (XMLConfiguration) conf; + } catch(ClassCastException exc) { + //if this happens, someone is trying something nasty with us + throw new LLConfigurationException("didnt get an XMLConfiguration", exc); + } + this.conf = xconf; } public void resetConfig() { + //bypass, if there is no config doesnt exist + if(this.conf == null) + return; + this.conf.reset(); } - public LLConnector create() throws LLConnectionException, LLConfigurationException { + public LLConnector create() throws LLConfigurationException { return null; } + + private XMLConfiguration conf = null; + } Modified: trunk/share/src/site/site.xml =================================================================== --- trunk/share/src/site/site.xml 2006-10-09 17:49:22 UTC (rev 16) +++ trunk/share/src/site/site.xml 2006-10-24 16:47:32 UTC (rev 17) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<project name="JLink Client"> +<project name="JLink Share"> <bannerRight> <src>http://sflogo.sourceforge.net/sflogo.php?group_id=162264&type=3</src> </bannerRight> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |