Add source

This commit is contained in:
Lunny Xiao 2024-05-05 16:33:50 +08:00
parent 8409a49e62
commit e671a86747
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
5 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,21 @@
name: Java CI with Maven
on:
push:
branches:
- main
jobs:
build_and_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn test

1
.gitignore vendored
View File

@ -24,3 +24,4 @@
hs_err_pid*
replay_pid*
target

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}

17
pom.xml Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
</project>

View File

@ -0,0 +1,7 @@
package com.example;
public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}