Your trusted portal for purchasing tickets for events in Trentino!
The delivery text can be found here Text
The following text contains most of the commands and operations I've done to build this project.
Maven is a program that helps with configuring and managing projects. I downloaded the latest release from the official website and unpacked it.
Check that everything works
./apache-maven-3.9.6/bin/mvn -v
You can choose an archetype to get started, It's basically a template I choose maven-archetype-j2ee-simple as It's the closest to a servlet program.
Install the servlet by running:
mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-j2ee-simple -DarchetypeVersion=1.4
I inserted those settings:
Define value for property 'groupId': com.unitn.app
Define value for property 'artifactId': my-app
Define value for property 'version' 1.0-SNAPSHOT: : 1.0
Define value for property 'package' com.unitn.app: : 1.0
I deleted everything outside servlets/servlet
because it is just garbage
I changed the pom.xml file with the following:
<?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.unitn.app</groupId>
<artifactId>servlet</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<name>servlet</name>
</project>
You can build the project with this command:
./apache-maven-3.9.6/bin/mvn package
Each servlet must be congifured in web.xml
You can find packages here
<dependencies>
...
<dependency>
<groupId>com.stackoverflow...</groupId>
<artifactId>artifactId...</artifactId>
<version>1.0</version>
</dependency>
...
</dependencies>