Skip to content

Commit 466bd40

Browse files
committed
Setup projeto java feito
1 parent e4a94a4 commit 466bd40

8 files changed

Lines changed: 94 additions & 1 deletion

File tree

.devcontainer/devcontainer.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/java
3+
{
4+
"name": "Java",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/java:1-21-bullseye",
7+
8+
"features": {
9+
"ghcr.io/devcontainers/features/java:1": {
10+
"version": "none",
11+
"installMaven": "true",
12+
"installGradle": "false"
13+
},
14+
"ghcr.io/devcontainers-extra/features/ant-sdkman:2": {}
15+
}
16+
17+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
18+
// "forwardPorts": [],
19+
20+
// Use 'postCreateCommand' to run commands after the container is created.
21+
// "postCreateCommand": "java -version",
22+
23+
// Configure tool-specific properties.
24+
// "customizations": {},
25+
26+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
27+
// "remoteUser": "root"
28+
}

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for more information:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
# https://containers.dev/guide/dependabot
6+
7+
version: 2
8+
updates:
9+
- package-ecosystem: "devcontainers"
10+
directory: "/"
11+
schedule:
12+
interval: weekly

pom.xml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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
4+
http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.exemplo</groupId>
8+
<artifactId>meu-projeto-java</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<properties>
12+
<maven.compiler.source>17</maven.compiler.source>
13+
<maven.compiler.target>17</maven.compiler.target>
14+
</properties>
15+
16+
<dependencies>
17+
<!-- Dependência do JNA -->
18+
<dependency>
19+
<groupId>net.java.dev.jna</groupId>
20+
<artifactId>jna</artifactId>
21+
<version>5.13.0</version>
22+
</dependency>
23+
24+
<!-- (Opcional) Plataforma nativa do JNA -->
25+
<dependency>
26+
<groupId>net.java.dev.jna</groupId>
27+
<artifactId>jna-platform</artifactId>
28+
<version>5.13.0</version>
29+
</dependency>
30+
31+
<!-- Outras dependências do seu projeto podem ir aqui -->
32+
</dependencies>
33+
34+
<build>
35+
<plugins>
36+
<!-- Plugin de compilação padrão -->
37+
<plugin>
38+
<groupId>org.apache.maven.plugins</groupId>
39+
<artifactId>maven-compiler-plugin</artifactId>
40+
<version>3.11.0</version>
41+
<configuration>
42+
<source>${maven.compiler.source}</source>
43+
<target>${maven.compiler.target}</target>
44+
</configuration>
45+
</plugin>
46+
</plugins>
47+
</build>
48+
</project>

Main.java renamed to src/main/java/com/exemplo/Main.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package com.exemplo;
2+
13
import com.sun.jna.Library;
24
import com.sun.jna.Native;
35
import java.util.Scanner;
@@ -151,7 +153,7 @@ public static void main(String[] args) {
151153
}
152154
}
153155

154-
scanner.close();
156+
//scanner.close();
155157
}
156158

157159

1.88 KB
Binary file not shown.
2.53 KB
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
artifactId=meu-projeto-java
2+
groupId=com.exemplo
3+
version=1.0-SNAPSHOT
1.65 KB
Binary file not shown.

0 commit comments

Comments
 (0)