Skip to content

Commit 51bb4da

Browse files
committed
update
1 parent 9f9bcde commit 51bb4da

File tree

11 files changed

+292
-41
lines changed

11 files changed

+292
-41
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"opc": "bc84982facad2db59af9af88bef0f205a95b36df75ac3c8497a60d2f6ade816c",
3+
"oraclepaas": "cd0f7b9ccde0549075838a5b4d6f1b258062407062ad6896341a836dc981f514"
4+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# configure the Oracle infrastructure classic
2+
provider "opc" {
3+
user = "SEU E-MAIL DA CONTA ORACLE CLOUD"
4+
password = "SEU PASSWORD DA CONTA ORACLE CLOUD"
5+
identity_domain = "ID DO ORACLE IDENTiTY DOMAIN"
6+
storage_endpoint = "https://SEUIDENTITYDOMAIN.SUAREGION.storage.oraclecloud.com"
7+
storage_service_id = "NOME IDENTITY DOMANIN USADO PARA ENTRA NA ORACLE CLOUD"
8+
}
9+
10+
#Configure the Oracle Cloud Platform provider
11+
provider "oraclepaas" {
12+
user = "SEU E-MAIL DA CONTA ORACLE CLOUD"
13+
password = "SEU PASSWORD DA CONTA ORACLE CLOUD"
14+
identity_domain = "ID DO ORACLE IDENTiTY DOMAIN"
15+
application_endpoint = "https://apaas.us.oraclecloud.com"
16+
}
17+
18+
# Passo para criar um Storage Container
19+
20+
# cria um container
21+
resource "opc_storage_container" "my-apps" {
22+
name = "my-apps"
23+
}
24+
25+
# cria um objeto dentro do container
26+
# aqui ele copia o helidon-sample.zip e armazena no container chamado my-apps
27+
resource "opc_storage_object" "helidon-java-app" {
28+
name = "helidon-sample.zip"
29+
container = "${opc_storage_container.my-apps.name}"
30+
file = "helidon-sample.zip"
31+
etag = "${md5(file("helidon-sample.zip"))}"
32+
content_type = "application/zip;charset=UTF-8"
33+
}
34+
35+
# Passo para criar um Application Container
36+
resource "oraclepaas_application_container" "helidon-java-app" {
37+
name = "EventApp" # nome do app
38+
runtime = "java"
39+
archive_url = "${opc_storage_container.my-apps.name}/${opc_storage_object.helidon-java-app.name}" #localizaçaõ do objeto do Storage
40+
subscription_type = "HOURLY"
41+
42+
deployment {
43+
memory = "1G"
44+
instances = 1
45+
}
46+
}
47+
48+
output "web_url" {
49+
value = "${oraclepaas_application_container.helidon-java-app.web_url}/event"
50+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"runtime":{"majorVersion":"10"},
3+
"command":"java -jar helidon-sample.jar"
4+
}
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>br.org.soujava.rio</groupId>
6+
<artifactId>helidon.se.demo</artifactId>
7+
<version>0.0.1-SNAPSHOT</version>
8+
<name>helidon-se-demo</name>
9+
<description>demo of helidon se </description>
10+
11+
<properties>
12+
<helidon.version>0.11.0</helidon.version>
13+
<maven.compiler.source>11</maven.compiler.source>
14+
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
15+
<mainClass>org.jboss.weld.environment.se.StartMain</mainClass>
16+
<libs.classpath.prefix>libs</libs.classpath.prefix>
17+
<copied.libs.dir>${project.build.directory}/${libs.classpath.prefix}</copied.libs.dir>
18+
<weld.version>3.0.5.Final</weld.version>
19+
<deltaspike.version>1.9.0</deltaspike.version>
20+
</properties>
21+
22+
<!-- Dependencias para Helidon e deltaspike-->
23+
<dependencyManagement>
24+
<dependencies>
25+
<dependency>
26+
<groupId>io.helidon</groupId>
27+
<artifactId>helidon-bom</artifactId>
28+
<version>${helidon.version}</version>
29+
<type>pom</type>
30+
<scope>import</scope>
31+
</dependency>
32+
33+
<dependency>
34+
<groupId>org.apache.deltaspike.distribution</groupId>
35+
<artifactId>distributions-bom</artifactId>
36+
<version>${deltaspike.version}</version>
37+
<type>pom</type>
38+
<scope>import</scope>
39+
</dependency>
40+
</dependencies>
41+
</dependencyManagement>
42+
43+
<!-- Dependencias para Helidon-->
44+
<dependencies>
45+
<dependency>
46+
<groupId>io.helidon.bundles</groupId>
47+
<artifactId>helidon-bundles-webserver</artifactId>
48+
</dependency>
49+
<dependency>
50+
<groupId>io.helidon.config</groupId>
51+
<artifactId>helidon-config-yaml</artifactId>
52+
</dependency>
53+
54+
<!-- CDI-->
55+
<dependency>
56+
<groupId>org.jboss.weld.se</groupId>
57+
<artifactId>weld-se-shaded</artifactId>
58+
<version>${weld.version}</version>
59+
<type>jar</type>
60+
</dependency>
61+
62+
<!-- H2 DataBase-->
63+
<dependency>
64+
<groupId>com.h2database</groupId>
65+
<artifactId>h2</artifactId>
66+
<version>1.4.187</version>
67+
</dependency>
68+
69+
<dependency>
70+
<groupId>org.hibernate</groupId>
71+
<artifactId>hibernate-entitymanager</artifactId>
72+
<version>5.2.8.Final</version>
73+
</dependency>
74+
<dependency>
75+
<groupId>org.apache.deltaspike.modules</groupId>
76+
<artifactId>deltaspike-data-module-api</artifactId>
77+
<scope>compile</scope>
78+
</dependency>
79+
<dependency>
80+
<groupId>org.apache.deltaspike.modules</groupId>
81+
<artifactId>deltaspike-data-module-impl</artifactId>
82+
<scope>runtime</scope>
83+
</dependency>
84+
<dependency>
85+
<groupId>org.apache.deltaspike.cdictrl</groupId>
86+
<artifactId>deltaspike-cdictrl-api</artifactId>
87+
<scope>compile</scope>
88+
</dependency>
89+
90+
<!-- Necessario para o Java 10-->
91+
<dependency>
92+
<groupId>javax.xml.bind</groupId>
93+
<artifactId>jaxb-api</artifactId>
94+
<version>2.2.11</version>
95+
</dependency>
96+
<dependency>
97+
<groupId>com.sun.xml.bind</groupId>
98+
<artifactId>jaxb-core</artifactId>
99+
<version>2.2.11</version>
100+
</dependency>
101+
<dependency>
102+
<groupId>com.sun.xml.bind</groupId>
103+
<artifactId>jaxb-impl</artifactId>
104+
<version>2.2.11</version>
105+
</dependency>
106+
107+
</dependencies>
108+
109+
<build>
110+
<finalName>helidon-sample</finalName>
111+
<pluginManagement>
112+
<plugins>
113+
<plugin>
114+
<groupId>org.apache.maven.plugins</groupId>
115+
<artifactId>maven-jar-plugin</artifactId>
116+
<version>2.5</version>
117+
<configuration>
118+
<archive>
119+
<manifest>
120+
<addClasspath>true</addClasspath>
121+
<classpathPrefix>${libs.classpath.prefix}</classpathPrefix>
122+
<mainClass>${mainClass}</mainClass>
123+
</manifest>
124+
</archive>
125+
</configuration>
126+
</plugin>
127+
</plugins>
128+
</pluginManagement>
129+
<plugins>
130+
<plugin>
131+
<groupId>org.apache.maven.plugins</groupId>
132+
<artifactId>maven-dependency-plugin</artifactId>
133+
<executions>
134+
<execution>
135+
<id>copy-dependencies</id>
136+
<phase>prepare-package</phase>
137+
<goals>
138+
<goal>copy-dependencies</goal>
139+
</goals>
140+
<configuration>
141+
<outputDirectory>${copied.libs.dir}</outputDirectory>
142+
<overWriteReleases>false</overWriteReleases>
143+
<overWriteSnapshots>false</overWriteSnapshots>
144+
<overWriteIfNewer>true</overWriteIfNewer>
145+
<overWriteIfNewer>true</overWriteIfNewer>
146+
<includeScope>runtime</includeScope>
147+
<excludeScope>test</excludeScope>
148+
</configuration>
149+
</execution>
150+
</executions>
151+
</plugin>
152+
</plugins>
153+
</build>
154+
</project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0"?>
2+
<beans bean-discovery-mode="all" version="2.0"
3+
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
6+
http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"/>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0"
4+
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
5+
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
6+
7+
<persistence-unit name="event-demo" transaction-type="RESOURCE_LOCAL">
8+
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
9+
<class>br.org.soujava.rio.helidon.model.Event</class>
10+
11+
<properties>
12+
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/>
13+
<property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:soujava;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE" />
14+
<property name="javax.persistence.jdbc.user" value="sa"/>
15+
<property name="javax.persistence.jdbc.password" value="sa"/>
16+
<property name="hibernate.show_sql" value="true"/>
17+
<property name="hibernate.format_sql" value="true"/>
18+
<property name="hibernate.hbm2ddl.auto" value="update"/>
19+
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
20+
</properties>
21+
</persistence-unit>
22+
23+
</persistence>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
3+
export JAVA_HOME=CAMINHO-PARA-O-JDK10
4+
export PATH=${JAVA_HOME}/bin:${PATH}
5+
export MAVEN_HOME=CAMINHO-PARA-O-MAVEN
6+
export PATH=${MAVEN_HOME}/bin:${PATH}
7+
export TERRAFORM_HOME=CAMINHO-PARA-O-TERRAFORM
8+
export PATH=$TERRAFORM_HOME:$PATH
9+
10+
mvn clean package
11+
12+
cp manifest.json target/
13+
14+
cd target/
15+
16+
zip -g helidon-sample.zip libs/*.jar helidon-sample.jar manifest.json
17+
18+
rm manifest.json
19+
20+
cd ..
21+
22+
mv ./target/helidon-sample.zip ./
23+
24+
echo 'EXECUTANDO O TERRAFORM'
25+
26+
terraform init -input=false
27+
28+
terraform apply -input=false -auto-approve
29+
30+
$SHELL

microframeworks/helidion-se/helidon-se/pom.xml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<description>demo of helidon se </description>
1010

1111
<properties>
12-
<helidon.version>0.11.0</helidon.version>
12+
<helidon.version>1.0.0</helidon.version>
1313
<maven.compiler.source>11</maven.compiler.source>
1414
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
1515
<mainClass>org.jboss.weld.environment.se.StartMain</mainClass>
@@ -19,7 +19,7 @@
1919
<deltaspike.version>1.9.0</deltaspike.version>
2020
</properties>
2121

22-
<!-- Dependencias para Helidon e deltaspike-->
22+
<!-- Dependencias para Helidon e deltaspike -->
2323
<dependencyManagement>
2424
<dependencies>
2525
<dependency>
@@ -40,26 +40,28 @@
4040
</dependencies>
4141
</dependencyManagement>
4242

43-
<!-- Dependencias para Helidon-->
43+
<!-- Dependencias para Helidon -->
4444
<dependencies>
4545
<dependency>
4646
<groupId>io.helidon.bundles</groupId>
4747
<artifactId>helidon-bundles-webserver</artifactId>
4848
</dependency>
4949
<dependency>
50-
<groupId>io.helidon.config</groupId>
51-
<artifactId>helidon-config-yaml</artifactId>
50+
<groupId>io.helidon.media.jsonb</groupId>
51+
<artifactId>helidon-media-jsonb-server</artifactId>
5252
</dependency>
5353

54-
<!-- CDI-->
54+
55+
<!-- CDI -->
5556
<dependency>
5657
<groupId>org.jboss.weld.se</groupId>
5758
<artifactId>weld-se-shaded</artifactId>
5859
<version>${weld.version}</version>
5960
<type>jar</type>
6061
</dependency>
6162

62-
<!-- H2 DataBase-->
63+
64+
<!-- H2 DataBase -->
6365
<dependency>
6466
<groupId>com.h2database</groupId>
6567
<artifactId>h2</artifactId>
@@ -81,13 +83,12 @@
8183
<artifactId>deltaspike-data-module-impl</artifactId>
8284
<scope>runtime</scope>
8385
</dependency>
84-
<dependency>
85-
<groupId>org.apache.deltaspike.cdictrl</groupId>
86-
<artifactId>deltaspike-cdictrl-api</artifactId>
87-
<scope>compile</scope>
88-
</dependency>
86+
<!-- <dependency> <groupId>org.apache.deltaspike.cdictrl</groupId>
87+
<artifactId>deltaspike-cdictrl-api</artifactId> <scope>compile</scope> </dependency>
88+
<dependency> <groupId>org.apache.deltaspike.cdictrl</groupId> <artifactId>deltaspike-cdictrl-weld</artifactId>
89+
<scope>runtime</scope> </dependency> -->
8990

90-
<!-- Necessario para o Java 10-->
91+
<!-- Necessario para o Java 10 -->
9192
<dependency>
9293
<groupId>javax.xml.bind</groupId>
9394
<artifactId>jaxb-api</artifactId>

0 commit comments

Comments
 (0)