Skip to content

Commit

Permalink
updating examples to the most recent dev. helidon (#20)
Browse files Browse the repository at this point in the history
* updating examples to the most recent dev. helidon

Signed-off-by: Maxim Nesen <[email protected]>
  • Loading branch information
senivam authored Sep 20, 2023
1 parent e77bf12 commit 12c23cc
Show file tree
Hide file tree
Showing 234 changed files with 7,879 additions and 672 deletions.
2 changes: 1 addition & 1 deletion examples/config/basics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.3-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.config</groupId>
Expand Down
2 changes: 1 addition & 1 deletion examples/config/changes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.3-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.config</groupId>
Expand Down
2 changes: 1 addition & 1 deletion examples/config/git/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.3-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.config</groupId>
Expand Down
2 changes: 1 addition & 1 deletion examples/config/mapping/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.3-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.config</groupId>
Expand Down
2 changes: 1 addition & 1 deletion examples/config/metadata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.3-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.config</groupId>
Expand Down
2 changes: 1 addition & 1 deletion examples/config/overrides/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.3-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.config</groupId>
Expand Down
2 changes: 1 addition & 1 deletion examples/config/profiles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.3-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.config</groupId>
Expand Down
2 changes: 1 addition & 1 deletion examples/config/sources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.3-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples.config</groupId>
Expand Down
2 changes: 1 addition & 1 deletion examples/cors/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.3-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.helidon.examples</groupId>
Expand Down
2 changes: 1 addition & 1 deletion examples/dbclient/jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.3-SNAPSHOT</version>
<relativePath/>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion examples/dbclient/mongodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.3-SNAPSHOT</version>
<relativePath/>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion examples/dbclient/pokemons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-se</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.3-SNAPSHOT</version>
<relativePath/>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,18 @@ public void update(Routing.Rules rules) {
*/
private void index(ServerRequest request, ServerResponse response) {
response.headers().contentType(MediaType.TEXT_PLAIN);
response.send("Pokemon JDBC Example:\n"
+ " GET /type - List all pokemon types\n"
+ " GET /pokemon - List all pokemons\n"
+ " GET /pokemon/{id} - Get pokemon by id\n"
+ " GET /pokemon/name/{name} - Get pokemon by name\n"
+ " POST /pokemon - Insert new pokemon:\n"
+ " {\"id\":<id>,\"name\":<name>,\"type\":<type>}\n"
+ " PUT /pokemon - Update pokemon\n"
+ " {\"id\":<id>,\"name\":<name>,\"type\":<type>}\n"
+ " DELETE /pokemon/{id} - Delete pokemon with specified id\n");
response.send("""
Pokemon JDBC Example:
GET /type - List all pokemon types
GET /pokemon - List all pokemons
GET /pokemon/{id} - Get pokemon by id
GET /pokemon/name/{name} - Get pokemon by name
POST /pokemon - Insert new pokemon:
{"id":<id>,"name":<name>,"type":<type>}
PUT /pokemon - Update pokemon
{"id":<id>,"name":<name>,"type":<type>}
DELETE /pokemon/{id} - Delete pokemon with specified id
""");
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019, 2023 Oracle and/or its affiliates.
# Copyright (c) 2019, 2021 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions examples/employee-app/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/*
45 changes: 45 additions & 0 deletions examples/employee-app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Copyright (c) 2019, 2023 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# 1st stage, build the app
FROM maven:3.6.3-openjdk-17-slim as build

WORKDIR /helidon

# Create a first layer to cache the "Maven World" in the local repository.
# Incremental docker builds will always resume after that, unless you update
# the pom
ADD pom.xml .
RUN mvn package -Dmaven.test.skip

# Do the Maven build!
# Incremental docker builds will resume here when you change sources
ADD src src
RUN mvn package -DskipTests

RUN echo "done!"

# 2nd stage, build the runtime image
FROM openjdk:17-jdk-slim
WORKDIR /helidon

# Copy the binary built in the 1st stage
COPY --from=build /helidon/target/helidon-examples-employee-app.jar ./
COPY --from=build /helidon/target/libs ./libs

CMD ["java", "-jar", "helidon-examples-employee-app.jar"]

EXPOSE 8080
Loading

0 comments on commit 12c23cc

Please sign in to comment.