Commit 09317eff authored by Matija Obreza's avatar Matija Obreza

Build a jetty-base zip

parent 71f35c32
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>jetty</id>
<formats>
<format>zip</format>
</formats>
<baseDirectory>${project.build.finalName}-jetty</baseDirectory>
<files>
<file>
<source>${project.build.directory}/${project.build.finalName}.war</source>
<destName>webapps/genesys2-server.war</destName>
<fileMode>0644</fileMode>
</file>
</files>
<fileSets>
<fileSet>
<directory>assembly/jetty/</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>
</assembly>
#DB connection properties
#Persistent HSQLDB
db.path=./data/genesys/hsql/genesys
db.url=jdbc:hsqldb:file:${db.path};sql.syntax_mys=true
db.driverClassName=org.hsqldb.jdbc.JDBCDriver
db.username=sa
db.password=
db.showSql=false
db.hbm2ddl=true
hibernate.dialect=org.hibernate.dialect.HSQLDialect
base.hostname=${base.host}:8082
# Directories
lucene.indexDir=./data/genesys/lucene/
download.files.dir=./data/genesys/tmp
cdn.server=${base.hostname}
# ---------------------------------------
# Module: http
--module=http
### HTTP Connector Configuration
## HTTP port to listen on
jetty.port=8082
## HTTP idle timeout in milliseconds
http.timeout=30000
## HTTP Socket.soLingerTime in seconds. (-1 to disable)
# http.soLingerTime=-1
## Parameters to control the number and priority of acceptors and selectors
# http.selectors=1
# http.acceptors=1
# http.selectorPriorityDelta=0
# http.acceptorPriorityDelta=0
# ---------------------------------------
# Module: jsp
--module=jsp
# JSP Configuration
# Select JSP implementation, choices are
# glassfish : The reference implementation
# default in jetty <= 9.1
# apache : The apache version
# default jetty >= 9.2
jsp-impl=apache
# To use a non-jdk compiler for JSP compilation when using glassfish uncomment next line
# -Dorg.apache.jasper.compiler.disablejsr199=true
# ---------------------------------------
# Module: jstl
--module=jstl
# JSTL Configuration
# The glassfish jsp-impl includes JSTL by default and this module
# is not required to activate it.
# The apache jsp-impl does not include JSTL by default and this module
# is required to put JSTL on the container classpath
#
# Example of providing a demo configuration, using a ${jetty.base}
#
# Additional ini files are in demo-base/start.d
#
# ---------------------------------------
# Module: server
--module=server
##
## Server Threading Configuration
##
# minimum number of threads
threads.min=10
# maximum number of threads
threads.max=200
# thread idle timeout in milliseconds
threads.timeout=60000
# buffer size for output
jetty.output.buffer.size=32768
# request header buffer size
jetty.request.header.size=8192
# response header buffer size
jetty.response.header.size=8192
# should jetty send the server version header?
jetty.send.server.version=true
# should jetty send the date header?
jetty.send.date.header=false
# What host to listen on (leave commented to listen on all interfaces)
#jetty.host=myhost.com
# Dump the state of the Jetty server, components, and webapps after startup
jetty.dump.start=false
# Dump the state of the Jetty server, before stop
jetty.dump.stop=false
# Enable delayed dispatch optimisation
jetty.delayDispatchUntilContent=false
# ---------------------------------------
# Module: resources
--module=resources
# ---------------------------------------
# Module: servlets
--module=servlets
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<!-- This web.xml format file is an override file that is applied to the test webapp AFTER
it has been configured by the default descriptor and the WEB-INF/web.xml descriptor -->
<!-- Add or override context init parameter -->
<context-param>
<param-name>spring.profiles.active</param-name>
<param-value>dev</param-value>
</context-param>
</web-app>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.eclipse.org/configure.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/</Set>
<Set name="war"><Property name="jetty.webapps" default="."/>/genesys2-server.war</Set>
<Set name="extractWAR">true</Set>
<Set name="copyWebDir">false</Set>
<Set name="overrideDescriptor"><Property name="jetty.webapps" default="."/>/genesys2-server.d/override-web.xml</Set>
</Configure>
......@@ -71,7 +71,7 @@
<jsp-api.version>2.1</jsp-api.version>
<hibernate.version>4.3.6.Final</hibernate.version>
<hsqldb.version>2.3.1</hsqldb.version>
<hsqldb.version>2.3.2</hsqldb.version>
<ehcache.version>2.7.4</ehcache.version>
<slf4j.version>1.7.7</slf4j.version>
......@@ -99,26 +99,7 @@
<war.name>genesys2</war.name>
</properties>
<repositories>
<repository>
<id>central</id>
<url>http://repo.maven.apache.org/maven2</url>
</repository>
<!-- <repository> <id>JBOSS</id> <url>http://repository.jboss.org/nexus/content/groups/public</url>
</repository> <repository> <id>ibiblio.mirrors</id> <name>ibiblio.mirrors</name>
<url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url> </repository> -->
<!-- <repository> <id>spring-social-google</id> <name>Spring Social Google</name>
<url>http://gabiaxel.github.io/maven/</url> </repository> -->
<!-- <repository> <id>sonatype-oss</id> <url>https://oss.sonatype.org/content/groups/public</url>
</repository> <repository> <id>releases</id> <name>Releases</name> <url>https://oss.sonatype.org/content/repositories/releases</url>
</repository> -->
</repositories>
<!-- <pluginRepositories> <pluginRepository> <id>sonatype mirror</id> <url>http://search.maven.org/remotecontent?filepath=</url>
</pluginRepository> </pluginRepositories> -->
<dependencies>
<!--Test dependencies -->
<dependency>
<groupId>junit</groupId>
......@@ -305,7 +286,6 @@
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>${hsqldb.version}</version>
<scope>test</scope>
</dependency>
<dependency>
......@@ -418,13 +398,7 @@
<version>0.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
<version>${jetty.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
......@@ -647,6 +621,24 @@
</aggregations>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<descriptors>
<descriptor>assembly/assembly-jetty.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
......
......@@ -58,6 +58,9 @@ public class SpringDataBaseConfig {
@Value("${db.hbm2ddl}")
private boolean dbGenerateDdl;
@Value("${hibernate.dialect}")
private String hibernateDialect;
@Bean
public DataSource dataSource() {
......@@ -106,6 +109,7 @@ public class SpringDataBaseConfig {
private Properties jpaProperties() throws Exception {
Properties jpaProp = new Properties();
jpaProp.load(getClass().getResourceAsStream("/spring/hibernate.properties"));
jpaProp.put("hibernate.dialect", hibernateDialect);
return jpaProp;
}
......
......@@ -22,5 +22,7 @@ paginator.default.maxPage=4
#Admin
default.admin.email=admin@example.com
build.version=${project.version}
build.artifactId=${project.artifactId}
build.name=${project.artifactId}-${buildNumber}
build.revision=${buildNumber}
#Hibernate specific properties
javax.persistence.sharedCache.mode=ENABLE_SELECTIVE
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
hibernate.connection.charSet=utf8
hibernate.connection.autocommit=false
hibernate.jdbc.fetch_size=25
......
......@@ -27,6 +27,7 @@ db.username=root
db.password=
db.showSql=false
db.hbm2ddl=false
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
c3p0.acquireIncrement=1
c3p0.minPoolSize=1
......
#Hibernate specific properties
javax.persistence.sharedCache.mode=ENABLE_SELECTIVE
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
hibernate.connection.charSet=utf8
hibernate.connection.autocommit=false
hibernate.jdbc.fetch_size=25
......
#Hibernate specific properties
javax.persistence.sharedCache.mode=ENABLE_SELECTIVE
hibernate.dialect=org.hibernate.dialect.HSQLDialect
hibernate.connection.charSet=utf8
hibernate.connection.autocommit=false
hibernate.jdbc.fetch_size=25
......
......@@ -25,6 +25,7 @@ db.username=root
db.password=
db.showSql=true
db.hbm2ddl=true
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
# reCAPTCHA API
captcha.privateKey=A
......
......@@ -29,6 +29,7 @@ db.username = sa
db.password =
db.showSql=false
db.hbm2ddl=true
hibernate.dialect=org.hibernate.dialect.HSQLDialect
# reCAPTCHA API
captcha.privateKey=A
......
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