first hello-world project
This commit is contained in:
parent
ed4b6dd072
commit
1cd9c13791
5 changed files with 113 additions and 0 deletions
0
create-project.sh
Normal file → Executable file
0
create-project.sh
Normal file → Executable file
32
helloworld/README.md
Normal file
32
helloworld/README.md
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
# helloworld
|
||||||
|
|
||||||
|
Projeto Maven criado automaticamente com Java 25 e JUnit 5.
|
||||||
|
|
||||||
|
## Requisitos
|
||||||
|
|
||||||
|
- Java 25
|
||||||
|
- Maven
|
||||||
|
|
||||||
|
## Como compilar
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mvn compile
|
||||||
|
```
|
||||||
|
|
||||||
|
## Como executar
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mvn exec:java -Dexec.mainClass="com.gabeefranco.App"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Como executar os testes
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mvn test
|
||||||
|
```
|
||||||
|
|
||||||
|
## Como gerar o pacote
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mvn package
|
||||||
|
```
|
||||||
58
helloworld/pom.xml
Normal file
58
helloworld/pom.xml
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||||
|
https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>com.gabeefranco</groupId>
|
||||||
|
<artifactId>helloworld</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.release>25</maven.compiler.release>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- JUnit Jupiter para testes unitários -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
<artifactId>junit-jupiter</artifactId>
|
||||||
|
<version>5.10.0</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<!-- Compilação com Java 25 -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.11.0</version>
|
||||||
|
<configuration>
|
||||||
|
<release>25</release>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!-- Execução dos testes JUnit -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>3.1.2</version>
|
||||||
|
<configuration>
|
||||||
|
<useModulePath>false</useModulePath>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!-- Execução da classe principal -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
10
helloworld/src/main/java/com/gabeefranco/App.java
Normal file
10
helloworld/src/main/java/com/gabeefranco/App.java
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.gabeefranco;
|
||||||
|
|
||||||
|
public class App {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println(
|
||||||
|
"Hello, world! Projeto helloworld criado com sucesso."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
13
helloworld/src/test/java/com/gabeefranco/AppTest.java
Normal file
13
helloworld/src/test/java/com/gabeefranco/AppTest.java
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.gabeefranco;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
class AppTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testApp() {
|
||||||
|
assertTrue(true, "Teste básico de funcionamento.");
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue