Skip to content

Commit 250f1b4

Browse files
author
Jan Mikolajczak
committed
Initialize api stub
0 parents  commit 250f1b4

File tree

9 files changed

+385
-0
lines changed

9 files changed

+385
-0
lines changed

.gitignore

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
2+
# Created by https://www.gitignore.io/api/intellij+all
3+
4+
### Intellij+all ###
5+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
6+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
7+
8+
# User-specific stuff:
9+
.idea/**/workspace.xml
10+
.idea/**/tasks.xml
11+
.idea/dictionaries
12+
13+
# Sensitive or high-churn files:
14+
.idea/**/dataSources/
15+
.idea/**/dataSources.ids
16+
.idea/**/dataSources.xml
17+
.idea/**/dataSources.local.xml
18+
.idea/**/sqlDataSources.xml
19+
.idea/**/dynamic.xml
20+
.idea/**/uiDesigner.xml
21+
22+
# Gradle:
23+
.idea/**/gradle.xml
24+
.idea/**/libraries
25+
26+
# CMake
27+
cmake-build-debug/
28+
29+
# Mongo Explorer plugin:
30+
.idea/**/mongoSettings.xml
31+
32+
## File-based project format:
33+
*.iws
34+
35+
## Plugin-specific files:
36+
37+
# IntelliJ
38+
/out/
39+
40+
# mpeltonen/sbt-idea plugin
41+
.idea_modules/
42+
43+
# JIRA plugin
44+
atlassian-ide-plugin.xml
45+
46+
# Cursive Clojure plugin
47+
.idea/replstate.xml
48+
49+
# Crashlytics plugin (for Android Studio and IntelliJ)
50+
com_crashlytics_export_strings.xml
51+
crashlytics.properties
52+
crashlytics-build.properties
53+
fabric.properties
54+
55+
### Intellij+all Patch ###
56+
# Ignores the whole idea folder
57+
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
58+
59+
.idea/
60+
61+
# End of https://www.gitignore.io/api/intellij+all

Aviary.iml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="WEB_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$" />
6+
<orderEntry type="inheritedJdk" />
7+
<orderEntry type="sourceFolder" forTests="false" />
8+
</component>
9+
</module>

aviary-api/.gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
hotspot.log
2+
*.iml
3+
*.ipr
4+
*.iws
5+
.gradle/
6+
build/
7+
target/
8+
classes/
9+
/var
10+
pom.xml.versionsBackup
11+
test-output/
12+
/atlassian-ide-plugin.xml
13+
.idea
14+
.DS_Store
15+
.classpath
16+
.settings
17+
.project
18+
temp-testng-customsuite.xml
19+
test-output
20+
.externalToolBuilders
21+
*~

aviary-api/README.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
App Engine Java Kotlin Servlet 3.1 with Java8
2+
===
3+
4+
## Sample Servlet 3.1 written in Kotlin for use with App Engine Java8 Standard.
5+
6+
See the [Google App Engine standard environment documentation][ae-docs] for more
7+
detailed instructions.
8+
9+
[ae-docs]: https://cloud.google.com/appengine/docs/java/
10+
11+
* [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
12+
* [Maven](https://maven.apache.org/download.cgi) (at least 3.5)
13+
* [Google Cloud SDK](https://cloud.google.com/sdk/) (aka gcloud command line tool)
14+
15+
## Setup
16+
17+
* Download and initialize the [Cloud SDK](https://cloud.google.com/sdk/)
18+
19+
`gcloud init`
20+
21+
* Create an App Engine app within the current Google Cloud Project
22+
23+
`gcloud app create`
24+
25+
## Maven
26+
### Running locally
27+
28+
`mvn appengine:run`
29+
30+
To use vist: http://localhost:8080/
31+
32+
### Deploying
33+
34+
`mvn appengine:deploy`
35+
36+
To use vist: https://aviary-130922.appspot.com
37+
38+
## Testing
39+
40+
`mvn verify`
41+
42+
As you add / modify the source code (`src/main/java/...`) it's very useful to add [unit testing](https://cloud.google.com/appengine/docs/java/tools/localunittesting)
43+
to (`src/main/test/...`). The following resources are quite useful:
44+
45+
* [Junit4](http://junit.org/junit4/)
46+
* [Mockito](http://mockito.org/)
47+
* [Truth](http://google.github.io/truth/)
48+
49+
50+
For further information, consult the
51+
[Java App Engine](https://developers.google.com/appengine/docs/java/overview) documentation.

aviary-api/nbactions.xml

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright 2017 Google Inc.
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
-->
14+
<actions>
15+
<action>
16+
<actionName>CUSTOM-appengine:devserver</actionName>
17+
<displayName>appengine:devserver</displayName>
18+
<goals>
19+
<goal>appengine:devserver</goal>
20+
</goals>
21+
</action>
22+
<action>
23+
<actionName>CUSTOM-appengine:update</actionName>
24+
<displayName>appengine:update</displayName>
25+
<goals>
26+
<goal>appengine:update</goal>
27+
</goals>
28+
</action>
29+
<action>
30+
<actionName>CUSTOM-appengine:rollback</actionName>
31+
<displayName>appengine:rollback</displayName>
32+
<goals>
33+
<goal>appengine:rollback</goal>
34+
</goals>
35+
</action>
36+
<action>
37+
<actionName>CUSTOM-appengine:update_cron</actionName>
38+
<displayName>appengine:update_cron</displayName>
39+
<goals>
40+
<goal>appengine:update_cron</goal>
41+
</goals>
42+
</action>
43+
<action>
44+
<actionName>CUSTOM-appengine:update_dos</actionName>
45+
<displayName>appengine:update_dos</displayName>
46+
<goals>
47+
<goal>appengine:update_dos</goal>
48+
</goals>
49+
</action>
50+
<action>
51+
<actionName>CUSTOM-appengine:update_indexes</actionName>
52+
<displayName>appengine:update_indexes</displayName>
53+
<goals>
54+
<goal>appengine:update_indexes</goal>
55+
</goals>
56+
</action>
57+
<action>
58+
<actionName>CUSTOM-appengine:update_queues</actionName>
59+
<displayName>appengine:update_queues</displayName>
60+
<goals>
61+
<goal>appengine:update_queues</goal>
62+
</goals>
63+
</action>
64+
<action>
65+
<actionName>run</actionName>
66+
<packagings>
67+
<packaging>war</packaging>
68+
<packaging>ear</packaging>
69+
<packaging>ejb</packaging>
70+
</packagings>
71+
<goals>
72+
<goal>appengine:devserver</goal>
73+
</goals>
74+
<properties>
75+
<netbeans.deploy>true</netbeans.deploy>
76+
</properties>
77+
</action>
78+
</actions>

aviary-api/pom.xml

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
Unless required by applicable law or agreed to in writing, software
8+
distributed under the License is distributed on an "AS IS" BASIS,
9+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
See the License for the specific language governing permissions and
11+
limitations under the License.
12+
-->
13+
<project xmlns="http://maven.apache.org/POM/4.0.0"
14+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
15+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
16+
17+
<modelVersion>4.0.0</modelVersion>
18+
<packaging>war</packaging>
19+
<version>1.0-SNAPSHOT</version>
20+
21+
<groupId>eu.bluehawkqs</groupId>
22+
<artifactId>aviary-api</artifactId>
23+
24+
<dependencies>
25+
<dependency>
26+
<groupId>com.google.appengine</groupId>
27+
<artifactId>appengine-api-1.0-sdk</artifactId>
28+
<version>1.9.54</version>
29+
</dependency>
30+
<dependency>
31+
<groupId>jstl</groupId>
32+
<artifactId>jstl</artifactId>
33+
<version>1.2</version>
34+
</dependency>
35+
<dependency>
36+
<groupId>javax.servlet</groupId>
37+
<artifactId>javax.servlet-api</artifactId>
38+
<version>3.1.0</version>
39+
<type>jar</type>
40+
</dependency>
41+
<dependency>
42+
<groupId>org.jetbrains.kotlin</groupId>
43+
<artifactId>kotlin-stdlib</artifactId>
44+
<version>1.1.3-2</version>
45+
</dependency>
46+
</dependencies>
47+
48+
<build>
49+
<outputDirectory>target/${project.artifactId}-${project.version}/WEB-INF/classes</outputDirectory>
50+
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
51+
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
52+
<plugins>
53+
<plugin>
54+
<artifactId>kotlin-maven-plugin</artifactId>
55+
<groupId>org.jetbrains.kotlin</groupId>
56+
<version>1.1.3-2</version>
57+
<configuration/>
58+
<executions>
59+
<execution>
60+
<id>compile</id>
61+
<phase>compile</phase>
62+
<goals>
63+
<goal>compile</goal>
64+
</goals>
65+
</execution>
66+
<execution>
67+
<id>test-compile</id>
68+
<phase>test-compile</phase>
69+
<goals>
70+
<goal>test-compile</goal>
71+
</goals>
72+
</execution>
73+
</executions>
74+
</plugin>
75+
<plugin>
76+
<groupId>org.apache.maven.plugins</groupId>
77+
<artifactId>maven-war-plugin</artifactId>
78+
<version>2.3</version>
79+
<configuration>
80+
<archiveClasses>true</archiveClasses>
81+
<failOnMissingWebXml>false</failOnMissingWebXml>
82+
</configuration>
83+
</plugin>
84+
<!-- [START cloudplugin] -->
85+
<plugin>
86+
<groupId>com.google.cloud.tools</groupId>
87+
<artifactId>appengine-maven-plugin</artifactId>
88+
<version>1.3.1</version>
89+
<configuration>
90+
</configuration>
91+
</plugin>
92+
<!-- [END cloudplugin] -->
93+
<plugin>
94+
<artifactId>maven-compiler-plugin</artifactId>
95+
<version>3.6.1</version>
96+
<configuration>
97+
<source>1.8</source>
98+
<target>1.8</target>
99+
</configuration>
100+
</plugin>
101+
</plugins>
102+
</build>
103+
104+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package eu.bluehawkqs.aviary.api.controllers
2+
3+
import javax.servlet.annotation.WebServlet
4+
import javax.servlet.http.HttpServlet
5+
import javax.servlet.http.HttpServletRequest
6+
import javax.servlet.http.HttpServletResponse
7+
8+
@WebServlet(name = "Hello", value = "/")
9+
class HomeController : HttpServlet() {
10+
override fun doGet(req: HttpServletRequest, res: HttpServletResponse) {
11+
res.writer.write("Hello, World! I am a Servlet 3.1 running on Java8 App Engine Standard, and written in Kotlin...")
12+
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2017 Google Inc.
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
-->
14+
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
15+
<application>aviary-130922</application>
16+
<version>api-master</version>
17+
<threadsafe>true</threadsafe>
18+
<runtime>java8</runtime>
19+
<module>default</module>
20+
<system-properties>
21+
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
22+
</system-properties>
23+
</appengine-web-app>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2017 Google Inc.
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.
11+
12+
# A default java.util.logging configuration.
13+
# (All App Engine logging is through java.util.logging by default).
14+
#
15+
# To use this configuration, copy it into your application's WEB-INF
16+
# folder and add the following to your appengine-web.xml:
17+
#
18+
# <system-properties>
19+
# <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
20+
# </system-properties>
21+
#
22+
23+
# Set the default logging level for all loggers to WARNING
24+
.level = WARNING

0 commit comments

Comments
 (0)