Skip to content

Commit

Permalink
0.2.3 リリース
Browse files Browse the repository at this point in the history
  • Loading branch information
koda-masaru committed Dec 31, 2014
1 parent 679eb51 commit 49a30bd
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>redcomet</groupId>
<artifactId>knowledge</artifactId>
<packaging>war</packaging>
<version>0.2.2</version>
<version>0.2.3</version>
<name>webapp for knowledge</name>
<url>https://support-project.org/</url>

Expand All @@ -17,7 +17,7 @@
<dependency>
<groupId>redcomet</groupId>
<artifactId>web</artifactId>
<version>0.2.1</version>
<version>0.2.2</version>
</dependency>

<dependency>
Expand Down
1 change: 0 additions & 1 deletion src/main/java/redcomet/knowledge/config/AppConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,4 @@ public void setIndexPath(String indexPath) {
this.indexPath = indexPath;
}


}
1 change: 1 addition & 0 deletions src/main/resources/appconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<time_zone>Asia/Tokyo</time_zone>
<indexPath>{user.home}/.knowledge/index/</indexPath>
<tmpPath>{user.home}/.knowledge/tmp/</tmpPath>
<databasePath>{user.home}/.knowledge/db/</databasePath>
<uploadMaxMBSize>5</uploadMaxMBSize>
</app>

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/connection.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connectionConfig>
<driverClass>org.h2.Driver</driverClass>
<URL>jdbc:h2:{user.home}/.knowledge/knowledge_db</URL>
<URL>jdbc:h2:tcp://localhost/./knowledge_db</URL>
<user>sa</user>
<password></password>
<schema>public</schema>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/log4j.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

<!-- Root Logger: Other -->
<root>
<priority value="DEBUG" />
<priority value="INFO" />
<appender-ref ref="APP_STDOUT" />
</root>

Expand Down
3 changes: 3 additions & 0 deletions src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

<display-name>knowledge</display-name>

<listener>
<listener-class>redcomet.web.listener.H2DBManagerListener</listener-class>
</listener>
<listener>
<listener-class>redcomet.knowledge.deploy.InitializationListener</listener-class>
</listener>
Expand Down
20 changes: 20 additions & 0 deletions src/test/java/redcomet/knowledge/tool/AddSampleDatas.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

import org.h2.tools.Server;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;

import redcomet.common.config.ConfigLoader;
import redcomet.common.config.INT_FLAG;
import redcomet.common.log.Log;
import redcomet.common.log.LogFactory;
import redcomet.knowledge.deploy.InitDB;
import redcomet.ormapping.common.DBUserPool;
import redcomet.ormapping.tool.dao.InitializeDao;
import redcomet.web.config.AppConfig;
import redcomet.web.config.GroupRoleType;
import redcomet.web.dao.GroupsDao;
import redcomet.web.dao.UserGroupsDao;
Expand All @@ -37,6 +40,12 @@ public class AddSampleDatas {
private static Log LOG = LogFactory.getLog(AddSampleDatas.class);

public static void main(String[] args) throws Exception {
AppConfig appConfig = ConfigLoader.load(AppConfig.APP_CONFIG, AppConfig.class);
String[] parms = {"-tcp", "-baseDir", appConfig.getDatabasePath()};

Server server = Server.createTcpServer(parms);
server.start();

// 内部的には、日付はGMTとして扱う
TimeZone zone = TimeZone.getTimeZone("GMT");
TimeZone.setDefault(zone);
Expand All @@ -50,6 +59,17 @@ public static void main(String[] args) throws Exception {
addSampleDatas.doInitialize();

AddSampleKnowledge.main(args);


server.stop();
// int count = 0;
// while(true) {
// Thread.sleep(1000);
// count++;
// if (count > 300) {
// break;
// }
// }
}

public void createTables() {
Expand Down

0 comments on commit 49a30bd

Please sign in to comment.