diff --git a/.gitignore b/.gitignore
index f28849c..3686705 100644
--- a/.gitignore
+++ b/.gitignore
@@ -253,18 +253,26 @@ PhotoAlbum/wwwroot/uploads/*
*.log
# Maven
-target/
-
-# Package files (except lib directory dependencies)
+**/target/
+pom.xml.tag
+pom.xml.releaseBackup
+pom.xml.versionsBackup
+pom.xml.next
+release.properties
+dependency-reduced-pom.xml
+buildNumber.properties
+.mvn/timing.properties
+.mvn/wrapper/maven-wrapper.jar
+
+# Package files
*.war
*.ear
*.zip
*.tar.gz
*.rar
-# JAR files (but keep lib/ directory JARs for Ant project)
+# JAR files (Maven will manage dependencies)
*.jar
-!lib/*.jar
# IDE
.idea/
diff --git a/README.md b/README.md
index b10a897..c6a4663 100644
--- a/README.md
+++ b/README.md
@@ -4,8 +4,8 @@ A simple photo gallery web application built with pure Servlet/JSP and H2 in-mem
## Prerequisites
-- Java 8+
-- Apache Ant 1.9+
+- Java 11+
+- Apache Maven 3.6+
- Application Server: Tomcat 8.5+ / GlassFish 7 / WebSphere Liberty 25.x
## Quick Start
@@ -13,28 +13,28 @@ A simple photo gallery web application built with pure Servlet/JSP and H2 in-mem
### 1. Build
```bash
-ant war
+mvn clean package
```
### 2. Deploy (choose one)
**GlassFish:**
```bash
-cp dist/photo-album.war $GLASSFISH_HOME/glassfish/domains/domain1/autodeploy/
+cp target/photo-album.war $GLASSFISH_HOME/glassfish/domains/domain1/autodeploy/
$GLASSFISH_HOME/bin/asadmin start-domain
# Access: http://localhost:8080/photo-album/
```
**WebSphere Liberty:**
```bash
-cp dist/photo-album.war $WLP_HOME/usr/servers/defaultServer/dropins/
+cp target/photo-album.war $WLP_HOME/usr/servers/defaultServer/dropins/
$WLP_HOME/bin/server run defaultServer
# Access: http://localhost:9080/photo-album/
```
**Tomcat:**
```bash
-cp dist/photo-album.war $CATALINA_HOME/webapps/
+cp target/photo-album.war $CATALINA_HOME/webapps/
$CATALINA_HOME/bin/catalina.sh run
# Access: http://localhost:8080/photo-album/
```
@@ -61,4 +61,4 @@ $CATALINA_HOME/bin/catalina.sh stop
- Jakarta Servlet 6.0 / JSP 3.1 / JSTL 3.0
- Pure JDBC (no ORM)
- H2 2.2.224 in-memory database (auto-initialized)
-- Apache Ant 1.9+ build
+- Apache Maven 3.6+ build
diff --git a/build.xml b/build.xml
deleted file mode 100644
index 7829101..0000000
--- a/build.xml
+++ /dev/null
@@ -1,138 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/jar-files.md b/jar-files.md
new file mode 100644
index 0000000..73b3311
--- /dev/null
+++ b/jar-files.md
@@ -0,0 +1,34 @@
+# JAR Files Analysis
+
+This document tracks the analysis of all JAR files in the project and their availability in Maven Central Repository.
+
+## JAR Files Status
+
+- [x] **commons-fileupload-1.5.jar** - Exists in Maven central repository
+ - GroupId: commons-fileupload
+ - ArtifactId: commons-fileupload
+ - Version: 1.5
+ - Added to pom.xml
+
+- [x] **commons-io-2.11.0.jar** - Exists in Maven central repository
+ - GroupId: commons-io
+ - ArtifactId: commons-io
+ - Version: 2.11.0
+ - Added to pom.xml
+
+- [x] **h2-2.2.224.jar** - Exists in Maven central repository
+ - GroupId: com.h2database
+ - ArtifactId: h2
+ - Version: 2.2.224
+ - Added to pom.xml
+
+- [x] **jakarta.servlet-api-6.0.0.jar** - Exists in Maven central repository
+ - GroupId: jakarta.servlet
+ - ArtifactId: jakarta.servlet-api
+ - Version: 6.0.0
+ - Scope: provided (provided by servlet container)
+ - Added to pom.xml
+
+## Summary
+
+All 4 JAR files are available in Maven Central Repository and have been added to pom.xml as Maven dependencies. No system-scoped dependencies are required.
diff --git a/lib/commons-fileupload-1.5.jar b/lib/commons-fileupload-1.5.jar
deleted file mode 100644
index 5e60875..0000000
Binary files a/lib/commons-fileupload-1.5.jar and /dev/null differ
diff --git a/lib/commons-io-2.11.0.jar b/lib/commons-io-2.11.0.jar
deleted file mode 100644
index be507d9..0000000
Binary files a/lib/commons-io-2.11.0.jar and /dev/null differ
diff --git a/lib/h2-2.2.224.jar b/lib/h2-2.2.224.jar
deleted file mode 100644
index ff1997a..0000000
Binary files a/lib/h2-2.2.224.jar and /dev/null differ
diff --git a/lib/jakarta.servlet-api-6.0.0.jar b/lib/jakarta.servlet-api-6.0.0.jar
deleted file mode 100644
index d15c10c..0000000
Binary files a/lib/jakarta.servlet-api-6.0.0.jar and /dev/null differ
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..126205e
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,79 @@
+
+
+ 4.0.0
+
+ com.photoalbum
+ photo-album
+ 1.0.0
+ war
+
+ Photo Album Application
+ A simple photo gallery application using Servlet/JSP
+
+
+ UTF-8
+ 11
+ 11
+
+
+
+
+
+ jakarta.servlet
+ jakarta.servlet-api
+ 6.0.0
+ provided
+
+
+
+
+ commons-fileupload
+ commons-fileupload
+ 1.5
+
+
+
+
+ commons-io
+ commons-io
+ 2.11.0
+
+
+
+
+ com.h2database
+ h2
+ 2.2.224
+
+
+
+
+ photo-album
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.1
+
+ 11
+ 11
+ UTF-8
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-war-plugin
+ 3.4.0
+
+ false
+
+
+
+
+
diff --git a/src/com/photoalbum/dao/PhotoDAO.java b/src/main/java/com/photoalbum/dao/PhotoDAO.java
similarity index 100%
rename from src/com/photoalbum/dao/PhotoDAO.java
rename to src/main/java/com/photoalbum/dao/PhotoDAO.java
diff --git a/src/com/photoalbum/model/Photo.java b/src/main/java/com/photoalbum/model/Photo.java
similarity index 100%
rename from src/com/photoalbum/model/Photo.java
rename to src/main/java/com/photoalbum/model/Photo.java
diff --git a/src/com/photoalbum/model/UploadResult.java b/src/main/java/com/photoalbum/model/UploadResult.java
similarity index 100%
rename from src/com/photoalbum/model/UploadResult.java
rename to src/main/java/com/photoalbum/model/UploadResult.java
diff --git a/src/com/photoalbum/servlet/DetailServlet.java b/src/main/java/com/photoalbum/servlet/DetailServlet.java
similarity index 100%
rename from src/com/photoalbum/servlet/DetailServlet.java
rename to src/main/java/com/photoalbum/servlet/DetailServlet.java
diff --git a/src/com/photoalbum/servlet/DownloadServlet.java b/src/main/java/com/photoalbum/servlet/DownloadServlet.java
similarity index 100%
rename from src/com/photoalbum/servlet/DownloadServlet.java
rename to src/main/java/com/photoalbum/servlet/DownloadServlet.java
diff --git a/src/com/photoalbum/servlet/HomeServlet.java b/src/main/java/com/photoalbum/servlet/HomeServlet.java
similarity index 100%
rename from src/com/photoalbum/servlet/HomeServlet.java
rename to src/main/java/com/photoalbum/servlet/HomeServlet.java
diff --git a/src/com/photoalbum/servlet/UploadServlet.java b/src/main/java/com/photoalbum/servlet/UploadServlet.java
similarity index 100%
rename from src/com/photoalbum/servlet/UploadServlet.java
rename to src/main/java/com/photoalbum/servlet/UploadServlet.java
diff --git a/src/com/photoalbum/util/DatabaseConfig.java b/src/main/java/com/photoalbum/util/DatabaseConfig.java
similarity index 100%
rename from src/com/photoalbum/util/DatabaseConfig.java
rename to src/main/java/com/photoalbum/util/DatabaseConfig.java
diff --git a/resources/application.properties b/src/main/resources/application.properties
similarity index 100%
rename from resources/application.properties
rename to src/main/resources/application.properties
diff --git a/webapp/WEB-INF/jsp/detail.jsp b/src/main/webapp/WEB-INF/jsp/detail.jsp
similarity index 100%
rename from webapp/WEB-INF/jsp/detail.jsp
rename to src/main/webapp/WEB-INF/jsp/detail.jsp
diff --git a/webapp/WEB-INF/jsp/index.jsp b/src/main/webapp/WEB-INF/jsp/index.jsp
similarity index 100%
rename from webapp/WEB-INF/jsp/index.jsp
rename to src/main/webapp/WEB-INF/jsp/index.jsp
diff --git a/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
similarity index 100%
rename from webapp/WEB-INF/web.xml
rename to src/main/webapp/WEB-INF/web.xml
diff --git a/webapp/css/site.css b/src/main/webapp/css/site.css
similarity index 100%
rename from webapp/css/site.css
rename to src/main/webapp/css/site.css
diff --git a/webapp/index.html b/src/main/webapp/index.html
similarity index 100%
rename from webapp/index.html
rename to src/main/webapp/index.html
diff --git a/webapp/js/upload.js b/src/main/webapp/js/upload.js
similarity index 100%
rename from webapp/js/upload.js
rename to src/main/webapp/js/upload.js