Commit deaf423f authored by Liang Ding's avatar Liang Ding

Fix #335

parent 022f41cb
...@@ -203,7 +203,7 @@ public class InitService { ...@@ -203,7 +203,7 @@ public class InitService {
final RuntimeEnv runtimeEnv = Latkes.getRuntimeEnv(); final RuntimeEnv runtimeEnv = Latkes.getRuntimeEnv();
if (RuntimeEnv.LOCAL == runtimeEnv || RuntimeEnv.BAE == runtimeEnv) { if (RuntimeEnv.LOCAL == runtimeEnv) {
LOGGER.log(Level.INFO, "B3log Solo is running on [" + runtimeEnv + "] environment, database [{0}], creates all tables", LOGGER.log(Level.INFO, "B3log Solo is running on [" + runtimeEnv + "] environment, database [{0}], creates all tables",
Latkes.getRuntimeDatabase()); Latkes.getRuntimeDatabase());
final List<CreateTableResult> createTableResults = JdbcRepositories.initAllTables(); final List<CreateTableResult> createTableResults = JdbcRepositories.initAllTables();
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
<slf4j.version>1.7.5</slf4j.version> <slf4j.version>1.7.5</slf4j.version>
<org.b3log.latke.version>0.5.0-SNAPSHOT</org.b3log.latke.version> <org.b3log.latke.version>0.5.0-SNAPSHOT</org.b3log.latke.version>
<org.b3log.latke-gae.version>0.5.0-SNAPSHOT</org.b3log.latke-gae.version> <org.b3log.latke-gae.version>0.5.0-SNAPSHOT</org.b3log.latke-gae.version>
<org.b3log.latke-bae.version>0.5.0-SNAPSHOT</org.b3log.latke-bae.version>
<org.b3log.latke-repository-mysql.version>0.5.0-SNAPSHOT</org.b3log.latke-repository-mysql.version> <org.b3log.latke-repository-mysql.version>0.5.0-SNAPSHOT</org.b3log.latke-repository-mysql.version>
<org.b3log.latke-repository-h2.version>0.5.0-SNAPSHOT</org.b3log.latke-repository-h2.version> <org.b3log.latke-repository-h2.version>0.5.0-SNAPSHOT</org.b3log.latke-repository-h2.version>
...@@ -172,12 +171,6 @@ ...@@ -172,12 +171,6 @@
<version>${org.b3log.latke-gae.version}</version> <version>${org.b3log.latke-gae.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.b3log</groupId>
<artifactId>latke-bae</artifactId>
<version>${org.b3log.latke-bae.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.b3log</groupId> <groupId>org.b3log</groupId>
<artifactId>latke-repository-mysql</artifactId> <artifactId>latke-repository-mysql</artifactId>
......
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>solo-bae</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
encoding/<project>=UTF-8
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.6
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<installed facet="java" version="1.6"/>
</faceted-project>
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>rebuild</actionName>
<goals>
<goal>clean</goal>
<goal>install</goal>
</goals>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
</action>
<action>
<actionName>build</actionName>
<goals>
<goal>install</goal>
</goals>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
</action>
<action>
<actionName>build-with-dependencies</actionName>
<basedir>..</basedir>
<reactor>also-make</reactor>
<goals>
<goal>install</goal>
</goals>
</action>
</actions>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Description: B3log Solo BAE POM.
Version: 1.0.1.6, Oct 29, 2013
Author: Liang Ding
-->
<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.b3log</groupId>
<artifactId>solo-bae</artifactId>
<packaging>war</packaging>
<name>B3log Solo (BAE)</name>
<description>
B3log Solo Baidu App Engine war.
</description>
<parent>
<groupId>org.b3log</groupId>
<artifactId>solo-war</artifactId>
<version>0.6.5</version>
</parent>
<properties>
<servlet-api.version>2.5</servlet-api.version>
</properties>
<dependencies>
<dependency>
<groupId>org.b3log</groupId>
<artifactId>latke</artifactId>
<exclusions>
<!-- Javamail for local -->
<exclusion>
<artifactId>mail</artifactId>
<groupId>javax.mail</groupId>
</exclusion>
<!-- GAE container is not JBoss -->
<exclusion>
<groupId>org.jboss</groupId>
<artifactId>jboss-vfs</artifactId>
</exclusion>
<!-- Database Connections Pool for local-->
<exclusion>
<groupId>com.jolbox</groupId>
<artifactId>bonecp</artifactId>
</exclusion>
<exclusion>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
</exclusion>
<!-- H2 database for local -->
<exclusion>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet-api.version}</version>
</dependency>
<dependency>
<groupId>org.b3log</groupId>
<artifactId>latke-bae</artifactId>
</dependency>
<dependency>
<groupId>org.b3log</groupId>
<artifactId>latke-repository-mysql</artifactId>
<exclusions>
<!-- Database Connections Pool for local-->
<exclusion>
<groupId>com.jolbox</groupId>
<artifactId>bonecp</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>../src/main/resources</directory>
<excludes>
<exclude>etc/</exclude>
<exclude>log4j.properties</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>com.mycila.maven-license-plugin</groupId>
<artifactId>maven-license-plugin</artifactId>
<configuration>
<header>../../src/main/resources/etc/header.txt</header>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<finalName>b3log-solo-bae</finalName>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="web" name="Web">
<configuration>
<descriptors>
<deploymentDescriptor name="context.xml" url="file://$MODULE_DIR$/../src/main/webapp/META-INF/context.xml" />
<deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/../src/main/webapp/WEB-INF/web.xml" />
</descriptors>
<webroots>
<root url="file://$MODULE_DIR$/../src/main/webapp" relative="/" />
</webroots>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.5.10" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.5.10" level="project" />
<orderEntry type="library" name="Maven: org.b3log:latke:0.5.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: javax.enterprise:cdi-api:1.0" level="project" />
<orderEntry type="library" name="Maven: org.jboss.interceptor:jboss-interceptor-api:1.1" level="project" />
<orderEntry type="library" name="Maven: javax.annotation:jsr250-api:1.0" level="project" />
<orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.5" level="project" />
<orderEntry type="library" name="Maven: javax.el:el-api:1.0" level="project" />
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.19" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:1.4" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.5" level="project" />
<orderEntry type="library" name="Maven: javassist:javassist:3.12.1.GA" level="project" />
<orderEntry type="library" name="Maven: javax.servlet:servlet-api:2.5" level="project" />
<orderEntry type="library" name="Maven: org.b3log:latke-bae:0.5.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.b3log:latke-repository-mysql:0.5.0-SNAPSHOT" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.1.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:3.8.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.beanshell:bsh:2.0b4" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.yaml:snakeyaml:1.6" level="project" />
<orderEntry type="module" module-name="solo-core" />
<orderEntry type="library" name="Maven: org.jsoup:jsoup:1.5.2" level="project" />
<orderEntry type="library" name="Maven: org.tautua.markdownpapers:markdownpapers-core:1.3.2" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.7.5" level="project" />
<orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" />
</component>
</module>
#
# Copyright (c) 2009, 2010, 2011, 2012, 2013, B3log Team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Description: B3log Latke configurations. Configures the section "Server" carefully.
# Version: 1.0.1.2, Oct 31, 2013
# Author: Liang Ding
#
#### Server ####
# Configures the followings before deploy
serverScheme=http
serverHost=localhost
serverPort=8080
staticServerScheme=http
staticServerHost=localhost
staticServerPort=8080
# Note: The context path and static path should be "" if deploy app on ROOT. For other cases, starts with '/'
# and not ends with '/', for example, /blog
contextPath=
staticPath=
#### IoC ####
# See https://github.com/b3log/b3log-latke/issues/17 for more details
scanPath=org.b3log.solo
#### Runtime Environment ####
runtimeEnv=BAE
#### Runtime Mode ####
runtimeMode=DEVELOPMENT
#runtimeMode=PRODUCTION
#### Cache Implementation ####
# Note: If the runtime environment is LOCAL, the cache will be 'LOCAL' always
#cache=LOCAL
cache=BAE
#### User Service Implementation ####
userService=LOCAL
#### Static resource version ####
staticResourceVersion=201310311200
\ No newline at end of file
#
# Copyright (c) 2009, 2010, 2011, 2012, 2013, B3log Team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Description: B3log Solo local environment configurations. Configures this file
# if B3log Solo runs on a standard Servlet container or Baidu App Engine,
# it is unnecessary to care this file if B3log Solo runs on Google App Engine.
# Version: 1.0.2.3, Apr 1, 2013
# Author: Liang Ding
#
#### Runtime Database (RuntimeDatabase) ####
runtimeDatabase=MYSQL
#### JDBC database Configurations ####
jdbc.driver=com.mysql.jdbc.Driver
jdbc.URL=jdbc:mysql://localhost:3306/b3log?useUnicode=yes&characterEncoding=UTF-8
jdbc.username=root
jdbc.password=
# database connection pool
# Note: If the runtime environment is BAE, the pool will be 'none' always
jdbc.pool=none
# The minConnCnt MUST larger or equal to 3
jdbc.minConnCnt=3
jdbc.maxConnCnt=10
# Be care to change the transaction isolation
jdbc.transactionIsolation=READ_COMMITTED
# The specific table name prefix
jdbc.tablePrefix=b3_solo
#
# Copyright (c) 2009, 2010, 2011, 2012, 2013, B3log Team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Description: B3log Solo logging configurations for BAE.
# Version: 1.0.0.2, Oct 29, 2013
# Author: Liang Ding
#
log4j.rootLogger=WARN, stdout, bae
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%-5p]-[%d{yyyy-MM-dd HH:mm:ss}]-[%c:%L]: %m%n
log4j.appender.bae=com.baidu.bae.api.baelog.BaeAppender
log4j.appender.bae.layout=org.apache.log4j.PatternLayout
log4j.appender.bae.layout.ConversionPattern=[%-5p]-[%d{yyyy-MM-dd HH:mm:ss}]-[%c:%L]: %m%n
log4j.logger.org.b3log.solo=WARN
log4j.logger.org.b3log.latke=ERROR
log4j.logger.org.b3log.latke.util.freemarker.Templates=ERROR
...@@ -32,7 +32,6 @@ jdbc.username=root ...@@ -32,7 +32,6 @@ jdbc.username=root
jdbc.password= jdbc.password=
# database connection pool # database connection pool
# Note: If the runtime environment is BAE, the pool will be 'none' always
#jdbc.pool=BoneCP #jdbc.pool=BoneCP
jdbc.pool=c3p0 jdbc.pool=c3p0
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
<modules> <modules>
<module>gae</module> <module>gae</module>
<module>bae</module>
<module>mysql</module> <module>mysql</module>
<module>h2</module> <module>h2</module>
</modules> </modules>
......
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2009, 2010, 2011, 2012, 2013, B3log Team
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Description: Web deployment descriptor on BAE. See
http://developer.baidu.com/wiki/index.php?title=%E5%B8%AE%E5%8A%A9%E6%96%87%E6%A1%A3%E9%A6%96%E9%A1%B5/%E4%BA%91%E7%8E%AF%E5%A2%83/JAVA%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E9%85%8D%E7%BD%AE
for more details.
Version: 1.0.0.0, Aug 27, 2012
Author: Liang Ding
-->
<du-web-app xmlns="http://bae.baidu.com/java/1.0">
<sessions-enabled>true</sessions-enabled>
<system-properties>
<property name="java.util.logging.level" value="FINEST"/>
</system-properties>
<static-files>
<exclude path="/**.html" />
</static-files>
</du-web-app>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment