Skip to content

Commit 2549644

Browse files
author
Nils Eckert
committed
Initial Project
1 parent e3ff6a1 commit 2549644

32 files changed

+1229
-10
lines changed

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
*.class
2-
3-
# Package Files #
4-
*.jar
5-
*.war
6-
*.ear
1+
target
2+
.settings
3+
.classpath
4+
.project
5+
.factorypath
6+
.faces-config.xml.jsfdia

README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.textile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
h1. Dining Developers Dilema
2+
3+
h2. Setup JBoss
4+
5+
h3. Datasource
6+
7+
* Deploy mysql-connector.jar
8+
* Goto JBoss Admin Interface
9+
** Add Datasource
10+
** Name: reportingDS
11+
** JNDI-Name java:/dddDS
12+
** URL: jdbc:mysql://localhost/ddd
13+
** Enable Datasource

config/jdbc.properties

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Needed by Hibernate3 Maven Plugin defined in pom.xml
2+
hibernate.connection.username=root
3+
hibernate.connection.password=root
4+
hibernate.connection.url=jdbc:mysql://localhost/ddd
5+
hibernate.connection.driver_class=com.mysql.jdbc.Driver
6+
7+
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect

database/000001.sql

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
-- Init. DB Setup
2+
3+
create table developers (
4+
id bigint not null auto_increment,
5+
email varchar(255),
6+
name varchar(255) not null,
7+
passowrd varchar(255) not null,
8+
username varchar(255) not null unique,
9+
primary key (id)
10+
) ENGINE=InnoDB;
11+
12+
create table locations (
13+
id bigint not null auto_increment,
14+
name varchar(255) not null,
15+
primary key (id)
16+
) ENGINE=InnoDB;
17+
18+
create table votes (
19+
id bigint not null auto_increment,
20+
vote integer not null,
21+
developer_id bigint not null,
22+
location_id bigint not null,
23+
primary key (id),
24+
unique (developer_id, location_id)
25+
) ENGINE=InnoDB;
26+
27+
alter table votes add index FK6B30AC9268074A3 (location_id),
28+
add constraint FK6B30AC9268074A3
29+
foreign key (location_id) references locations (id);
30+
31+
alter table votes
32+
add index FK6B30AC94FBE2B91 (developer_id),
33+
add constraint FK6B30AC94FBE2B91
34+
foreign key (developer_id) references developers (id);
35+
36+
INSERT INTO developers (name, username, email, passowrd) VALUES ('Nils', 'neckert', '[email protected]', SHA1( 'neckert'));
37+
INSERT INTO developers (name, username, email, passowrd) VALUES ('Benjamin', 'basbach', '[email protected]', SHA1( 'basbach'));
38+
INSERT INTO developers (name, username, email, passowrd) VALUES ('Markus', 'mfischer', '[email protected]', SHA1( 'mfischer'));
39+
INSERT INTO developers (name, username, email, passowrd) VALUES ('Michel', 'mzedler', '[email protected]', SHA1( 'mzedler'));
40+
41+

pom.xml

Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
6+
<groupId>org.dindevdel</groupId>
7+
<artifactId>ddd</artifactId>
8+
<version>1.0-SNAPSHOT</version>
9+
10+
<properties>
11+
<hbm2ddl.create>true</hbm2ddl.create>
12+
<hbm2ddl.export>false</hbm2ddl.export>
13+
<hbm2ddl.format>true</hbm2ddl.format>
14+
<hbm2ddl.drop>false</hbm2ddl.drop>
15+
<hbm2ddl.update>true</hbm2ddl.update>
16+
</properties>
17+
18+
<scm>
19+
<connection>scm:git:https://bitbucket.org/neckert/reporting.git</connection>
20+
<developerConnection>scm:git:https://bitbucket.org/neckert/reporting.git</developerConnection>
21+
</scm>
22+
23+
<build>
24+
<plugins>
25+
<plugin>
26+
<artifactId>maven-compiler-plugin</artifactId>
27+
<configuration>
28+
<encoding>UTF-8</encoding>
29+
<source>1.7</source>
30+
<target>1.7</target>
31+
</configuration>
32+
</plugin>
33+
<plugin>
34+
<groupId>org.codehaus.mojo</groupId>
35+
<artifactId>hibernate3-maven-plugin</artifactId>
36+
<configuration>
37+
<components>
38+
<component>
39+
<name>hbm2ddl</name>
40+
<implementation>annotationconfiguration</implementation>
41+
</component>
42+
</components>
43+
<componentProperties>
44+
<drop>${hbm2ddl.drop}</drop>
45+
<create>${hbm2ddl.create}</create>
46+
<export>${hbm2ddl.export}</export>
47+
<update>${hbm2ddl.update}</update>
48+
<format>${hbm2ddl.format}</format>
49+
<propertyfile>config/jdbc.properties</propertyfile>
50+
<scan-classes>true</scan-classes>
51+
<skip>${maven.test.skip}</skip>
52+
</componentProperties>
53+
</configuration>
54+
<dependencies>
55+
<dependency>
56+
<groupId>mysql</groupId>
57+
<artifactId>mysql-connector-java</artifactId>
58+
<version>5.1.13</version>
59+
</dependency>
60+
</dependencies>
61+
</plugin>
62+
<plugin>
63+
<groupId>org.bsc.maven</groupId>
64+
<artifactId>maven-processor-plugin</artifactId>
65+
<executions>
66+
<execution>
67+
<id>process</id>
68+
<goals>
69+
<goal>process</goal>
70+
</goals>
71+
<phase>generate-sources</phase>
72+
<configuration>
73+
</configuration>
74+
</execution>
75+
</executions>
76+
<dependencies>
77+
<dependency>
78+
<groupId>org.hibernate</groupId>
79+
<artifactId>hibernate-jpamodelgen</artifactId>
80+
<version>1.1.1.Final</version>
81+
<scope>compile</scope>
82+
</dependency>
83+
</dependencies>
84+
</plugin>
85+
<plugin>
86+
<groupId>org.codehaus.mojo</groupId>
87+
<artifactId>build-helper-maven-plugin</artifactId>
88+
<version>1.1</version>
89+
<executions>
90+
<execution>
91+
<id>add-source</id>
92+
<phase>generate-sources</phase>
93+
<goals>
94+
<goal>add-source</goal>
95+
</goals>
96+
<configuration>
97+
<sources>
98+
<source>target/generated-sources/apt</source>
99+
</sources>
100+
</configuration>
101+
</execution>
102+
</executions>
103+
</plugin>
104+
</plugins>
105+
<pluginManagement>
106+
<plugins>
107+
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
108+
<plugin>
109+
<groupId>org.eclipse.m2e</groupId>
110+
<artifactId>lifecycle-mapping</artifactId>
111+
<version>1.0.0</version>
112+
<configuration>
113+
<lifecycleMappingMetadata>
114+
<pluginExecutions>
115+
<pluginExecution>
116+
<pluginExecutionFilter>
117+
<groupId>
118+
org.codehaus.mojo
119+
</groupId>
120+
<artifactId>
121+
hibernate3-maven-plugin
122+
</artifactId>
123+
<versionRange>
124+
[2.2,)
125+
</versionRange>
126+
<goals>
127+
<goal>hbm2ddl</goal>
128+
</goals>
129+
</pluginExecutionFilter>
130+
<action>
131+
<ignore></ignore>
132+
</action>
133+
</pluginExecution>
134+
<pluginExecution>
135+
<pluginExecutionFilter>
136+
<groupId>org.bsc.maven</groupId>
137+
<artifactId>
138+
maven-processor-plugin
139+
</artifactId>
140+
<versionRange>
141+
[2.0.5,)
142+
</versionRange>
143+
<goals>
144+
<goal>process</goal>
145+
</goals>
146+
</pluginExecutionFilter>
147+
<action>
148+
<ignore></ignore>
149+
</action>
150+
</pluginExecution>
151+
<pluginExecution>
152+
<pluginExecutionFilter>
153+
<groupId>
154+
org.codehaus.mojo
155+
</groupId>
156+
<artifactId>
157+
build-helper-maven-plugin
158+
</artifactId>
159+
<versionRange>
160+
[1.1,)
161+
</versionRange>
162+
<goals>
163+
<goal>add-source</goal>
164+
</goals>
165+
</pluginExecutionFilter>
166+
<action>
167+
<ignore></ignore>
168+
</action>
169+
</pluginExecution>
170+
</pluginExecutions>
171+
</lifecycleMappingMetadata>
172+
</configuration>
173+
</plugin>
174+
</plugins>
175+
</pluginManagement>
176+
</build>
177+
178+
<dependencies>
179+
<dependency>
180+
<groupId>org.glassfish.web</groupId>
181+
<artifactId>el-impl</artifactId>
182+
<scope>runtime</scope>
183+
<!-- FIXME this version should be in the Weld API BOM -->
184+
<version>2.2.1-b05</version>
185+
<exclusions>
186+
<exclusion>
187+
<groupId>javax.el</groupId>
188+
<artifactId>el-api</artifactId>
189+
</exclusion>
190+
</exclusions>
191+
</dependency>
192+
193+
<!-- Provided -->
194+
<dependency>
195+
<groupId>javax</groupId>
196+
<artifactId>javaee-api</artifactId>
197+
<version>6.0</version>
198+
<scope>provided</scope>
199+
</dependency>
200+
<dependency>
201+
<groupId>org.slf4j</groupId>
202+
<artifactId>slf4j-api</artifactId>
203+
<version>1.6.4</version>
204+
<type>jar</type>
205+
<scope>compile</scope>
206+
</dependency>
207+
<dependency>
208+
<groupId>org.primefaces</groupId>
209+
<artifactId>primefaces</artifactId>
210+
<version>3.4.1</version>
211+
</dependency>
212+
<dependency>
213+
<groupId>org.apache.commons</groupId>
214+
<artifactId>commons-lang3</artifactId>
215+
<version>3.1</version>
216+
</dependency>
217+
<dependency>
218+
<groupId>org.apache.shiro</groupId>
219+
<artifactId>shiro-web</artifactId>
220+
<version>1.2.1</version>
221+
</dependency>
222+
223+
<!-- Test -->
224+
<dependency>
225+
<groupId>junit</groupId>
226+
<artifactId>junit</artifactId>
227+
<version>4.8.1</version>
228+
<scope>test</scope>
229+
</dependency>
230+
<dependency>
231+
<groupId>org.mockito</groupId>
232+
<artifactId>mockito-all</artifactId>
233+
<version>1.9.0</version>
234+
<scope>test</scope>
235+
</dependency>
236+
<dependency>
237+
<groupId>org.slf4j</groupId>
238+
<artifactId>slf4j-simple</artifactId>
239+
<version>1.6.4</version>
240+
<scope>test</scope>
241+
</dependency>
242+
</dependencies>
243+
244+
<repositories>
245+
<repository>
246+
<id>prime-repo</id>
247+
<name>PrimeFaces Maven Repository</name>
248+
<url>http://repository.primefaces.org</url>
249+
<layout>default</layout>
250+
</repository>
251+
</repositories>
252+
<packaging>war</packaging>
253+
</project>

0 commit comments

Comments
 (0)