esoe 3 years ago
commit
bacf80e22e
  1. 4
      .vscode/settings.json
  2. 88
      pom.xml
  3. 20
      src/main/java/ru/egspt/MainServlet.java
  4. 11
      src/main/webapp/WEB-INF/web.xml
  5. BIN
      target/classes/ru/egspt/MainServlet.class
  6. 3
      target/maven-archiver/pom.properties
  7. 1
      target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  8. 1
      target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  9. BIN
      target/moodle-web-0.1.war
  10. BIN
      target/moodle-web-0.1/WEB-INF/classes/ru/egspt/MainServlet.class
  11. 11
      target/moodle-web-0.1/WEB-INF/web.xml

4
.vscode/settings.json vendored

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
{
"maven.view": "hierarchical",
"java.configuration.updateBuildConfiguration": "automatic"
}

88
pom.xml

@ -0,0 +1,88 @@ @@ -0,0 +1,88 @@
<?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>ru.egspt</groupId>
<artifactId>moodle-web</artifactId>
<version>0.1</version>
<packaging>war</packaging>
<name>demo</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.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
<scope>provided</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.1.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.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.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.7.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

20
src/main/java/ru/egspt/MainServlet.java

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
package ru.egspt;
import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
@WebServlet("/hello")
public class MainServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
resp.setContentType("text/html");
PrintWriter printWriter = resp.getWriter();
printWriter.write("it works!");
printWriter.close();
}
}

11
src/main/webapp/WEB-INF/web.xml

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" version="4.0">
<display-name>moodle-web-report</display-name>
<welcome-file-list>
<welcome-file>hello</welcome-file>
</welcome-file-list>
</web-app>

BIN
target/classes/ru/egspt/MainServlet.class

Binary file not shown.

3
target/maven-archiver/pom.properties

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
artifactId=moodle-web
groupId=ru.egspt
version=0.1

1
target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@ -0,0 +1 @@ @@ -0,0 +1 @@
ru/egspt/MainServlet.class

1
target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@ -0,0 +1 @@ @@ -0,0 +1 @@
/home/esoe/Documents/code/moodle-web/src/main/java/ru/egspt/MainServlet.java

BIN
target/moodle-web-0.1.war

Binary file not shown.

BIN
target/moodle-web-0.1/WEB-INF/classes/ru/egspt/MainServlet.class

Binary file not shown.

11
target/moodle-web-0.1/WEB-INF/web.xml

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" version="4.0">
<display-name>moodle-web-report</display-name>
<welcome-file-list>
<welcome-file>hello</welcome-file>
</welcome-file-list>
</web-app>
Loading…
Cancel
Save