E56E updater to Eclipse Krazo. · SouJava-Rio/soujava-rio-labs@0206f15 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0206f15

Browse files
committed
updater to Eclipse Krazo.
1 parent fea85f8 commit 0206f15

File tree

28 files changed

+471
-139
lines changed

28 files changed

+471
-139
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM openjdk:8u171-jdk-alpine
2+
3+
ADD /target/*.jar /opt/demo.jar
4+
5+
EXPOSE 8080
6+
ENTRYPOINT ["java", "-jar", "/opt/demo.jar", "-Djava.net.preferIPv4Stack=true"]
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Exemplo MVC-SPEC-FORM
2+
3+
## Tech Stack
4+
* Java 8
5+
* Maven 3(Versão mínima)
6+
* Micro-Profile
7+
* Docker
8+
* Wildfly-Swarm
9+
* Payara-Micro
10+
11+
## Executando o projeto
12+
13+
* Payara-micro
14+
mvn clean install -P payara payara-micro:bundle && mvn -P payara payara-micro:start
15+
16+
ou java -jar *.jar dentro da pasta target/
17+
18+
* Wildfly-Swarm
19+
20+
mvn clean package -P wildfly - para gerar o uber-Jar
21+
22+
java -jar *.jar dentro da pasta target/
23+
24+
URL -> http://localhost:8080/
25+
26+
# Docker
27+
28+
No local do Dockerfile executar :
29+
30+
## BUILD
31+
32+
sudo docker build -t MVC-demo .
33+
34+
logo depois :
35+
36+
## executar
37+
38+
sudo docker run --name demo -p 8080:8080 -h localhost MVC-demo
39+
40+
acesse a URL -> http://localhost:8080/
41+
42+
## Para e remover o Container
43+
44+
sudo docker stop demo
45+
46+
sudo docker rm demo
47+
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
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/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>br.org.soujava.rio</groupId>
5+
<artifactId>MVC-FORM</artifactId>
6+
<packaging>war</packaging>
7+
<version>0.0.1-SNAPSHOT</version>
8+
<name>MVC-FORM Maven Webapp</name>
9+
<url>http://maven.apache.org</url>
10+
11+
<organization>
12+
<name>SouJava { Rio }</name>
13+
<url>http://soujava-rio.github.io</url>
14+
</organization>
15+
16+
<properties>
17+
<maven.compiler.source>1.8</maven.compiler.source>
18+
<maven.compiler.target>1.8</maven.compiler.target>
19+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
20+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
21+
<failOnMissingWebXml>false</failOnMissingWebXml>
22+
<version.payara>1.0.1</version.payara>
23+
<version.swarm>2017.12.1</version.swarm>
24+
<ozark.version>1.0.0-SNAPSHOT</ozark.version>
25+
<ozark.jersey>1.0.0-SNAPSHOT</ozark.jersey>
26+
<ozark.resteasy>1.0.0-SNAPSHOT</ozark.resteasy>
27+
<mvc.version>1.0-SNAPSHOT</mvc.version>
28+
</properties>
29+
30+
<developers>
31+
<developer>
32+
<name>Daniel Dias</name>
33+
<email>daniel.dias@soujava.org.br</email>
34+
<organization>SouJava { Rio }</organization>
35+
</developer>
36+
</developers>
37+
38+
<dependencyManagement>
39+
<dependencies>
40+
<dependency>
41+
<groupId>org.wildfly.swarm</groupId>
42+
<artifactId>bom-all</artifactId>
43+
<version>${version.swarm}</version>
44+
<scope>import</scope>
45+
<type>pom</type>
46+
</dependency>
47+
</dependencies>
48+
</dependencyManagement>
49+
50+
<dependencies>
51+
<dependency>
52+
<groupId>javax.mvc</groupId>
53+
<artifactId>javax.mvc-api</artifactId>
54+
<version>${mvc.version}</version>
55+
</dependency>
56+
57+
<dependency>
58+
<groupId>org.mvc-spec.ozark</groupId>
59+
<artifactId>ozark-core</artifactId>
60+
<version>${ozark.version}</version>
61+
</dependency>
62+
63+
<dependency>
64+
<groupId>org.eclipse.microprofile</groupId>
65+
<artifactId>microprofile</artifactId>
66+
<version>2.0.1</version>
67+
<type>pom</type>
68+
<scope>provided</scope>
69+
</dependency>
70+
71+
<dependency>
72+
<groupId>org.projectlombok</groupId>
73+
<artifactId>lombok</artifactId>
74+
<version>1.16.14</version>
75+
<scope>provided</scope>
76+
</dependency>
77+
78+
</dependencies>
79+
80+
<build>
81+
<finalName>MVC-Post-Redirect-Get</finalName>
82+
</build>
83+
84+
<profiles>
85+
<profile>
86+
<id>payara</id>
87+
<build>
88+
<plugins>
89+
<plugin>
90+
<groupId>fish.payara.maven.plugins</groupId>
91+
<artifactId>payara-micro-maven-plugin</artifactId>
92+
<version>${version.payara}</version>
93+
<executions>
94+
<execution>
95+
<goals>
96+
<goal>bundle</goal>
97+
<goal>start</goal>
98+
</goals>
99+
</execution>
100+
</executions>
101+
<configuration>
102+
<useUberJar>true</useUberJar>
103+
<deployWar>false</deployWar>
104+
<daemon>false</daemon>
105+
<payaraVersion>5.183</payaraVersion>
106+
</configuration>
107+
</plugin>
108+
</plugins>
109+
</build>
110+
<dependencies>
111+
<dependency>
112+
<groupId>org.mvc-spec.ozark</groupId>
113+
<artifactId>ozark-jersey</artifactId>
114+
<version>${ozark.jersey}</version>
115+
</dependency>
116+
</dependencies>
117+
</profile>
118+
119+
<profile>
120+
<id>wildfly</id>
121+
<build>
122+
<plugins>
123+
<plugin>
124+
<groupId>org.wildfly.swarm</groupId>
125+
<artifactId>wildfly-swarm-plugin</artifactId>
126+
<version>${version.swarm}</version>
127+
<executions>
128+
<execution>
129+
<goals>
130+
<goal>package</goal>
131+
</goals>
132+
</execution>
133+
</executions>
134+
</plugin>
135+
</plugins>
136+
</build>
137+
<dependencies>
138+
<dependency>
139+
<groupId>org.mvc-spec.ozark</groupId>
140+
<artifactId>ozark-resteasy</artifactId>
141+
<version>${ozark.resteasy}</version>
142+
</dependency>
143+
</dependencies>
144+
</profile>
145+
</profiles>
146+
147+
<repositories>
148+
<repository>
149+
<id>snapshots-repo</id>
150+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
151+
<releases>
152+
<enabled>false</enabled>
153+
</releases>
154+
<snapshots>
155+
<enabled>true</enabled>
156+
</snapshots>
157+
</repository>
158+
</repositories>
159+
</project>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/sh
2+
3+
echo "
4+
5+
███████╗ ██████╗ ██╗ ██╗ ██╗ █████╗ ██╗ ██╗ █████╗
6+
██╔════╝██╔═══██╗██║ ██║ ██║██╔══██╗██║ ██║██╔══██╗
7+
███████╗██║ ██║██║ ██║ ██║███████║██║ ██║███████║
8+
╚════██║██║ ██║██║ ██║██ ██║██╔══██║╚██╗ ██╔╝██╔══██║
9+
███████║╚██████╔╝╚██████╔╝╚█████╔╝██║ ██║ ╚████╔╝ ██║ ██║
10+
╚══════╝ ╚═════╝ ╚═════╝ ╚════╝ ╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝
11+
12+
"
13+
14+
echo Fazendo build.....
15+
16+
printf "\n"
17+
18+
docker build -t soujavario/mvcform .
19+
20+
21+
printf "\n"
22+
2 5C7A 3+
echo Build finalizado.
24+
25+
$SHELL
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
3+
echo "
4+
5+
███████╗ ██████╗ ██╗ ██╗ ██╗ █████╗ ██╗ ██╗ █████╗
6+
██╔════╝██╔═══██╗██║ ██║ ██║██╔══██╗██║ ██║██╔══██╗
7+
███████╗██║ ██║██║ ██║ ██║███████║██║ ██║███████║
8+
╚════██║██║ ██║██║ ██║██ ██║██╔══██║╚██╗ ██╔╝██╔══██║
9+
███████║╚██████╔╝╚██████╔╝╚█████╔╝██║ ██║ ╚████╔╝ ██║ ██║
10+
╚══════╝ ╚═════╝ ╚═════╝ ╚════╝ ╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝
11+
12+
"
13+
14+
echo Executando a aplicação.....
15+
16+
printf "\n"
17+
18+
docker run --name soujava soujavario/mvcform:latest
19+
20+
21+
printf "\n"
22+
23+
$SHELL
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/sh
2+
3+
echo "
4+
5+
███████╗ ██████╗ ██╗ ██╗ ██╗ █████╗ ██╗ ██╗ █████╗
6+
██╔════╝██╔═══██╗██║ ██║ ██║██╔══██╗██║ ██║██╔══██╗
7+
███████╗██║ ██║██║ ██║ ██║███████║██║ ██║███████║
8+
╚════██║██║ ██║██║ ██║██ ██║██╔══██║╚██╗ ██╔╝██╔══██║
9+
███████║╚██████╔╝╚██████╔╝╚█████╔╝██║ ██║ ╚████╔╝ ██║ ██║
10+
╚══════╝ ╚═════╝ ╚═════╝ ╚════╝ ╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝
11+
12+
"
13+
14+
echo Fazendo build do projeto....
15+
16+
printf "\n"
17+
18+
#trocar para a sua instalação
19+
20+
export JAVA_HOME=/home/daniel/desenvolvimento/jdk8u162-b12_openj9-0.8.0
21+
export PATH=${JAVA_HOME}/bin:${PATH}
22+
export MAVEN_HOME=/home/daniel/desenvolvimento/apache-maven-3.5.4
23+
export PATH=${MAVEN_HOME}/bin:${PATH}
24+
25+
mvn clean package payara-micro:bundle
26+
27+
printf "\n"
28+
29+
echo Build finalizado.
30+
31+
$SHELL
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0"?>
2+
<beans bean-discovery-mode="all" version="1.1"
3+
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
4+
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/beans_1_1.xsd"/>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<%@ page language="java" contentType="text/html; charset=UTF-8"
2+
pageEncoding="UTF-8"%>
3+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
4+
<html>
5+
<head>
6+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7+
<title>MVC-FORM</title>
8+
</head>
9+
<body>
10+
<h1>Parabéns por chegar aqui ${jug.nome} .</h1>
11+
</body>
12+
</html>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
2+
<!DOCTYPE html>
3+
<html>
4+
<head>
5+
<meta charset="UTF-8">
6+
<title>MVC-FORM</title>
7+
</head>
8+
<body>
9+
<form action="app/form" method="post">
10+
<label for="nome">Nome:</label>
11+
<input id="nome" placeholder="Digite o seu Nome" type="text" name="nome"/>
12+
<input type="submit" value="salvar"/>
13+
</form>
14+
</body&g AF46 t;
15+
</html>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
3+
echo "
4+
5+
███████╗ ██████╗ ██╗ ██╗ ██╗ █████╗ ██╗ ██╗ █████╗
6+
██╔════╝██╔═══██╗██║ ██║ ██║██╔══██╗██║ ██║██╔══██╗
7+
███████╗██║ ██║██║ ██║ ██║███████║██║ ██║███████║
8+
╚════██║██║ ██║██║ ██║██ ██║██╔══██║╚██╗ ██╔╝██╔══██║
9+
███████║╚██████╔╝╚██████╔╝╚█████╔╝██║ ██║ ╚████╔╝ ██║ ██║
10+
╚══════╝ ╚═════╝ ╚═════╝ ╚════╝ ╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝
11+
12+
"
13+
14+
echo Executando a aplicação.....
15+
16+
printf "\n"
17+
18+
docker stop $(docker ps -aq) && docker rm $(docker ps -aq)
19+
20+
21+
printf "\n"
22+
23+
$SHELL

0 commit comments

Comments
 (0)
0