diff options
| author | Kamal Wickramanayake <kamal@inbox.lk> | 2026-02-14 19:47:00 +0530 |
|---|---|---|
| committer | Kamal Wickramanayake <kamal@inbox.lk> | 2026-02-14 19:47:00 +0530 |
| commit | 78107abae06645b580063f2885d97c1f513886e0 (patch) | |
| tree | 3f28b11a9fdf075938fe142aa5c1aa520adbb645 /maven | |
| parent | 2acae77eaa61c6dd9db69a19fc71114369cfa232 (diff) | |
Added hello world maven project
Diffstat (limited to 'maven')
| -rw-r--r-- | maven/01-hello-world/.gitignore | 1 | ||||
| -rw-r--r-- | maven/01-hello-world/.mvn/jvm.config | 0 | ||||
| -rw-r--r-- | maven/01-hello-world/.mvn/maven.config | 0 | ||||
| -rw-r--r-- | maven/01-hello-world/README | 3 | ||||
| -rw-r--r-- | maven/01-hello-world/pom.xml | 90 | ||||
| -rw-r--r-- | maven/01-hello-world/src/main/java/lk/ac/pdn/ceit/fullstack/App.java | 10 | ||||
| -rw-r--r-- | maven/01-hello-world/src/test/java/lk/ac/pdn/ceit/fullstack/AppTest.java | 19 |
7 files changed, 123 insertions, 0 deletions
diff --git a/maven/01-hello-world/.gitignore b/maven/01-hello-world/.gitignore new file mode 100644 index 0000000..2f7896d --- /dev/null +++ b/maven/01-hello-world/.gitignore @@ -0,0 +1 @@ +target/ diff --git a/maven/01-hello-world/.mvn/jvm.config b/maven/01-hello-world/.mvn/jvm.config new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/maven/01-hello-world/.mvn/jvm.config diff --git a/maven/01-hello-world/.mvn/maven.config b/maven/01-hello-world/.mvn/maven.config new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/maven/01-hello-world/.mvn/maven.config diff --git a/maven/01-hello-world/README b/maven/01-hello-world/README new file mode 100644 index 0000000..09f0963 --- /dev/null +++ b/maven/01-hello-world/README @@ -0,0 +1,3 @@ +This was generated using the below command: + + mvn archetype:generate diff --git a/maven/01-hello-world/pom.xml b/maven/01-hello-world/pom.xml new file mode 100644 index 0000000..1ed93ef --- /dev/null +++ b/maven/01-hello-world/pom.xml @@ -0,0 +1,90 @@ +<?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>lk.ac.pdn.ceit.fullstack</groupId> + <artifactId>hello-world</artifactId> + <version>1.0-SNAPSHOT</version> + + <name>hello-world</name> + <!-- FIXME change it to the project's website --> + <url>http://www.example.com</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.release>17</maven.compiler.release> + </properties> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.junit</groupId> + <artifactId>junit-bom</artifactId> + <version>5.11.0</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <scope>test</scope> + </dependency> + <!-- Optionally: parameterized tests support --> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-params</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + + <build> + <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) --> + <plugins> + <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle --> + <plugin> + <artifactId>maven-clean-plugin</artifactId> + <version>3.4.0</version> + </plugin> + <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging --> + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <version>3.3.1</version> + </plugin> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.13.0</version> + </plugin> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <version>3.3.0</version> + </plugin> + <plugin> + <artifactId>maven-jar-plugin</artifactId> + <version>3.4.2</version> + </plugin> + <plugin> + <artifactId>maven-install-plugin</artifactId> + <version>3.1.2</version> + </plugin> + <plugin> + <artifactId>maven-deploy-plugin</artifactId> + <version>3.1.2</version> + </plugin> + <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle --> + <plugin> + <artifactId>maven-site-plugin</artifactId> + <version>3.12.1</version> + </plugin> + <plugin> + <artifactId>maven-project-info-reports-plugin</artifactId> + <version>3.6.1</version> + </plugin> + </plugins> + </pluginManagement> + </build> +</project> diff --git a/maven/01-hello-world/src/main/java/lk/ac/pdn/ceit/fullstack/App.java b/maven/01-hello-world/src/main/java/lk/ac/pdn/ceit/fullstack/App.java new file mode 100644 index 0000000..f4d6847 --- /dev/null +++ b/maven/01-hello-world/src/main/java/lk/ac/pdn/ceit/fullstack/App.java @@ -0,0 +1,10 @@ +package lk.ac.pdn.ceit.fullstack; + +/** + * Hello world! + */ +public class App { + public static void main(String[] args) { + System.out.println("Hello World!"); + } +} diff --git a/maven/01-hello-world/src/test/java/lk/ac/pdn/ceit/fullstack/AppTest.java b/maven/01-hello-world/src/test/java/lk/ac/pdn/ceit/fullstack/AppTest.java new file mode 100644 index 0000000..ef0bdb5 --- /dev/null +++ b/maven/01-hello-world/src/test/java/lk/ac/pdn/ceit/fullstack/AppTest.java @@ -0,0 +1,19 @@ +package lk.ac.pdn.ceit.fullstack; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.Test; + +/** + * Unit test for simple App. + */ +public class AppTest { + + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() { + assertTrue(true); + } +} |
