Skip to content

Commit

Permalink
Merge pull request dirkriehle#60 from dirkriehle/wahlzeit-20-integration
Browse files Browse the repository at this point in the history
Wahlzeit 20 integration
  • Loading branch information
dirkriehle committed Oct 12, 2015
2 parents 740113f + 4ec4456 commit 266f3d0
Show file tree
Hide file tree
Showing 326 changed files with 10,775 additions and 10,892 deletions.
23 changes: 0 additions & 23 deletions .classpath

This file was deleted.

11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/bin/
/build
/web/data/photos
/web/WEB-INF/classes
/classes
/src/main/webapp/WEB-INF/lib/
/.settings/
*.iml
.gradle
.idea
.project
.classpath
36 changes: 0 additions & 36 deletions .project

This file was deleted.

12 changes: 0 additions & 12 deletions .settings/.jsdtscope

This file was deleted.

7 changes: 0 additions & 7 deletions .settings/org.eclipse.jdt.core.prefs

This file was deleted.

9 changes: 0 additions & 9 deletions .settings/org.eclipse.wst.common.component

This file was deleted.

10 changes: 0 additions & 10 deletions .settings/org.eclipse.wst.common.project.facet.core.xml

This file was deleted.

1 change: 0 additions & 1 deletion .settings/org.eclipse.wst.jsdt.ui.superType.container

This file was deleted.

1 change: 0 additions & 1 deletion .settings/org.eclipse.wst.jsdt.ui.superType.name

This file was deleted.

1 change: 0 additions & 1 deletion FIXME.txt

This file was deleted.

60 changes: 60 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Wahlzeit: Open Source Software for Photo Rating Sites



## PART I: INTRODUCTION

Wahlzeit is an open source web application that lets users upload photos and rate photos of other users on a 1..10 scale. Users get to present their best photos and learn what other users thought of theirs.

Wahlzeit is used to teach agile methods and open source software development at the Professorship of Open Source Software at the Friedrich-Alexander-University of Erlangen-Nürnberg.

It is an easy-to-learn yet complete Java web application that is available under the GNU Affero Public License v3 license, see the [LICENSE.txt](/LICENSE.txt) file.

Starting Wahlzeit 2.0, Wahlzeit is a Google App Engine app. It can be run on your local machine or be deployed to Google App Engine for broader availability.

For more information, please see http://github.com/dirkriehle/wahlzeit and http://osr.cs.fau.de.



## PART II: WAHLZEIT SETUP

### Set-up development for Wahlzeit

1. Create your own repository by forking Wahlzeit from dirkriehle to *yourname*
2. Install **Java JDK**, set **JAVA_HOME**, and install **git**
3. On the command line, create or choose a project directory and go there
4. Run ```git clone https://github.com/yourname/wahlzeit.git```


### Run Wahlzeit on your local machine
1. On the command line, ```cd wahlzeit```
2. Run ```./gradlew appengineRun```
3. Wait until all gradle and project dependencies have been downloaded and the local instance has been started
4. Open [http://localhost:8080](http://localhost:8080) to try out Wahlzeit on your machine


### Debug Wahlzeit on your local machine
1. Run Wahlzeit on your local machine (see above)
2. Create a remote java debug configuration in your IDE with host **localhost** and port **8000** (not 8080)


### Deploy Wahlzeit to Google App Engine

**Create a Google App Engine instance:**
1. If you don't have one yet, create a Google account (required)
2. Go to https://console.developers.google.com and login with your Google account
3. In the developers console, select ```create a project```
1. Choose a project name, called below *yourproj*
2. Accept the terms of service, for better or worse

**Configure your repository and deploy Wahlzeit**
1. Configure your project:
1. Open the file [/src/main/webapp/WEB-INF/appengine-web.xml](/src/main/webapp/WEB-INF/appengine-web.xml)
2. Replace the project name with *yourproj*: \<application\>yourproj\</application\>
3. Save and close the appengine-web.xml
2. Run ```./gradlew appengineUpdate```
3. If a browser window pops up and asks for permission, accept it
4. Copy the code from the browser window to your gradle console
5. If everything works out, you will find your project at https://yourproj.appspot.com

Done!
70 changes: 0 additions & 70 deletions README.txt

This file was deleted.

63 changes: 63 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'appengine'

buildscript {
ext {
gaeVersion = '1.9.24'
}
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.appengine:gradle-appengine-plugin:' + gaeVersion
}
}

// check if JAVA_HOME is set, otherwise build tasks will fail
gradle.taskGraph.whenReady {
graph ->
if (System.env.'JAVA_HOME' == null) {
throw new GradleException("JAVA_HOME not set. Please set it, otherwise this task can not be executed.")
}
else {
println "JAVA_HOME = " + System.env.'JAVA_HOME'
}
}

repositories {
mavenCentral()
}

dependencies {
appengineSdk 'com.google.appengine:appengine-java-sdk:' + gaeVersion

compile 'com.google.appengine:appengine-api-1.0-sdk:' + gaeVersion
compile 'com.google.appengine.tools:appengine-gcs-client:0.4.4'
compile 'com.googlecode.objectify:objectify:5.1.5'
compile 'javax.servlet:servlet-api:2.5' // GAE works with only with 2.5
compile 'commons-fileupload:commons-fileupload:1.2'

// testing dependencies
testCompile 'com.google.appengine:appengine-testing:' + gaeVersion
testCompile 'com.google.appengine:appengine-api-stubs:' + gaeVersion
testCompile 'com.google.appengine:appengine-api-labs:' + gaeVersion
testCompile 'com.google.appengine:appengine-tools-sdk:1.9.24'
testCompile 'junit:junit:4.+'
testCompile 'org.mockito:mockito-core:1.10.19'
}

test {
// adjust this filter to your needs
}

appengine {
httpPort = 8080
downloadSdk = true
jvmFlags = ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000']

appcfg {
oauth2 = true
noCookies = false
}
}
2 changes: 1 addition & 1 deletion docs/html-header.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
- Copyright (c) 2006-2009 by Dirk Riehle, http://dirkriehle.com
- Copyright (c) 2006-2015 by Dirk Riehle, http://dirkriehle.com
-
- This file is part of the Wahlzeit rating application.
-
Expand Down
2 changes: 1 addition & 1 deletion docs/java-header.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006-2009 by Dirk Riehle, http://dirkriehle.com
* Copyright (c) 2006-2015 by Dirk Riehle, http://dirkriehle.com
*
* This file is part of the Wahlzeit rating application.
*
Expand Down
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Tue Jun 09 15:30:42 CEST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-bin.zip
Loading

0 comments on commit 266f3d0

Please sign in to comment.