Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Genesys Backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
15
Issues
15
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Backend
Commits
09317eff
Commit
09317eff
authored
Mar 25, 2015
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build a jetty-base zip
parent
71f35c32
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
186 additions
and
31 deletions
+186
-31
assembly/assembly-jetty.xml
assembly/assembly-jetty.xml
+23
-0
assembly/jetty/resources/genesys.properties
assembly/jetty/resources/genesys.properties
+20
-0
assembly/jetty/start.d/deploy.ini
assembly/jetty/start.d/deploy.ini
+1
-0
assembly/jetty/start.d/http.ini
assembly/jetty/start.d/http.ini
+19
-0
assembly/jetty/start.d/jsp.ini
assembly/jetty/start.d/jsp.ini
+14
-0
assembly/jetty/start.d/jstl.ini
assembly/jetty/start.d/jstl.ini
+8
-0
assembly/jetty/start.ini
assembly/jetty/start.ini
+45
-0
assembly/jetty/webapps/genesys2-server.d/override-web.xml
assembly/jetty/webapps/genesys2-server.d/override-web.xml
+18
-0
assembly/jetty/webapps/genesys2-server.xml
assembly/jetty/webapps/genesys2-server.xml
+9
-0
pom.xml
pom.xml
+20
-28
src/main/java/org/genesys2/spring/config/SpringDataBaseConfig.java
...java/org/genesys2/spring/config/SpringDataBaseConfig.java
+4
-0
src/main/resources/application.properties
src/main/resources/application.properties
+2
-0
src/main/resources/spring/hibernate.properties
src/main/resources/spring/hibernate.properties
+0
-1
src/main/resources/spring/spring.properties
src/main/resources/spring/spring.properties
+1
-0
src/test/resources/spring/hibernate-mysql.properties
src/test/resources/spring/hibernate-mysql.properties
+0
-1
src/test/resources/spring/hibernate.properties
src/test/resources/spring/hibernate.properties
+0
-1
src/test/resources/spring/spring-database.properties
src/test/resources/spring/spring-database.properties
+1
-0
src/test/resources/spring/spring.properties
src/test/resources/spring/spring.properties
+1
-0
No files found.
assembly/assembly-jetty.xml
0 → 100644
View file @
09317eff
<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>
assembly/jetty/resources/genesys.properties
0 → 100644
View file @
09317eff
#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}
assembly/jetty/start.d/deploy.ini
0 → 100644
View file @
09317eff
--module
=
deploy
assembly/jetty/start.d/http.ini
0 → 100644
View file @
09317eff
# ---------------------------------------
# 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
assembly/jetty/start.d/jsp.ini
0 → 100644
View file @
09317eff
# ---------------------------------------
# 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
assembly/jetty/start.d/jstl.ini
0 → 100644
View file @
09317eff
# ---------------------------------------
# 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
assembly/jetty/start.ini
0 → 100644
View file @
09317eff
#
# 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
assembly/jetty/webapps/genesys2-server.d/override-web.xml
0 → 100644
View file @
09317eff
<?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>
assembly/jetty/webapps/genesys2-server.xml
0 → 100644
View file @
09317eff
<?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>
pom.xml
View file @
09317eff
...
...
@@ -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>
...
...
src/main/java/org/genesys2/spring/config/SpringDataBaseConfig.java
View file @
09317eff
...
...
@@ -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
;
}
...
...
src/main/resources/application.properties
View file @
09317eff
...
...
@@ -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}
src/main/resources/spring/hibernate.properties
View file @
09317eff
#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
...
...
src/main/resources/spring/spring.properties
View file @
09317eff
...
...
@@ -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
...
...
src/test/resources/spring/hibernate-mysql.properties
View file @
09317eff
#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
...
...
src/test/resources/spring/hibernate.properties
View file @
09317eff
#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
...
...
src/test/resources/spring/spring-database.properties
View file @
09317eff
...
...
@@ -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
...
...
src/test/resources/spring/spring.properties
View file @
09317eff
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment