diff --git a/build.xml b/build.xml index 912cb04..3984849 100644 --- a/build.xml +++ b/build.xml @@ -1,29 +1,115 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + - + + + + - + - + + + - + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + diff --git a/lib/commons-lang3-3.12.0.jar b/lib/commons-lang3-3.12.0.jar new file mode 100644 index 0000000..4d434a2 Binary files /dev/null and b/lib/commons-lang3-3.12.0.jar differ diff --git a/lib/gson-2.10.1.jar b/lib/gson-2.10.1.jar new file mode 100644 index 0000000..a88c5bd Binary files /dev/null and b/lib/gson-2.10.1.jar differ diff --git a/lib/project.properties b/lib/project.properties new file mode 100644 index 0000000..da36851 --- /dev/null +++ b/lib/project.properties @@ -0,0 +1,14 @@ +# Library definitions for ant-sample project +# This file defines reusable library references that can be used across the project + +# Apache Commons Lang3 - Utility library +libs.commons-lang3.classpath=\ + ${base}/commons-lang3-3.12.0.jar +libs.commons-lang3.displayName=Apache Commons Lang3 +libs.commons-lang3.javadoc= + +# Google Gson - JSON processing +libs.gson.classpath=\ + ${base}/gson-2.10.1.jar +libs.gson.displayName=Google Gson +libs.gson.javadoc= diff --git a/manifest.mf b/manifest.mf new file mode 100644 index 0000000..06d010e --- /dev/null +++ b/manifest.mf @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 +Main-Class: piona.Main diff --git a/src/piona/Main.java b/src/piona/Main.java index c0b6cb6..b8bc7f2 100644 --- a/src/piona/Main.java +++ b/src/piona/Main.java @@ -1,7 +1,11 @@ package piona; +import org.apache.commons.lang3.StringUtils; +import com.google.gson.Gson; +import com.google.gson.JsonObject; + /** - * Main class. + * Main class - demonstrates dependency management. */ public class Main { @@ -13,6 +17,18 @@ public class Main { public static void main(String[] args) { HelloWorld hw = new HelloWorld(); System.out.println(hw); + + // Demonstrate Apache Commons Lang3 usage + String reversed = StringUtils.reverse("Hello from dependencies!"); + System.out.println("Reversed string: " + reversed); + + // Demonstrate Gson usage + Gson gson = new Gson(); + JsonObject json = new JsonObject(); + json.addProperty("application", "ant-sample"); + json.addProperty("message", "Dependencies are working!"); + json.addProperty("timestamp", System.currentTimeMillis()); + System.out.println("JSON output: " + gson.toJson(json)); } }