~ make mirror be built by maven

pull/1/head
Ivan Olexyn 5 years ago
parent 6a7f7770b8
commit b5e53f8bcd

@ -1,40 +0,0 @@
<?xml version="1.0" ?>
<project name="mirror" basedir="." default="war">
<!-- DEFINE SOME VARS -->
<property name="appname" value="mirror" />
<path id="compile.classpath">
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</path>
<!-- INIT -->
<target name="init">
<mkdir dir="build/classes"/>
</target>
<!-- COMPILE -->
<target name="compile" depends="init" >
<javac destdir="build/classes" debug="true" srcdir="src">
<classpath refid="compile.classpath"/>
</javac>
</target>
<!-- WAR -->
<target name="war" depends="compile">
<war destfile="${appname}A.war" webxml="web.xml">
<fileset dir="web"/>
<lib dir="lib"/>
<classes dir="build/classes"/>
</war>
</target>
<target name="clean">
<delete dir="build" />
</target>
</project>

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>Mirror</display-name>
<description>
This is a simple web application with a source code organization
based on the recommendations of the Application Developer's Guide.
</description>
<servlet>
<servlet-name>Mirror</servlet-name>
<servlet-class>com.olexyn.mirror.Mirror</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Mirror</servlet-name>
<url-pattern>/core</url-pattern>
</servlet-mapping>
</web-app>

@ -1,23 +0,0 @@
<html>
<head>
<title>Sample Application JSP Page</title>
</head>
<body bgcolor=white>
<table border="0">
<tr>
<td align=center>
<img src="images/tomcat.gif">
</td>
<td>
<h1>Sample Application JSP Page</h1>
This is the output of a JSP page that is part of the Hello, World
application.
</td>
</tr>
</table>
<%= new String("Hello!") %>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

@ -1,25 +0,0 @@
<html>
<head>
<title>Mirror</title>
</head>
<body bgcolor=white>
<table border="0">
<tr>
<td>
<img src="images/tomcat.gif">
</td>
<td>
<h1>Mirror</h1>
</td>
</tr>
</table>
<ul>
<p>This Servlet currently provides the following features:
<!--<li>To a <a href="hello.jsp">JSP page</a>.-->
<li><a href="core">Mirror</a> of all requests.
</ul>
</body>
</html>

@ -0,0 +1,10 @@
#!/bin/bash
version="0.1"
file="target/misp-mirror-${version}.war"
groupId="com.olexyn.misp.mirror"
artifactId="misp-mirror"
mvn package
mvn install:install-file -Dfile=${file} -DgroupId=${groupId} -DartifactId=${artifactId} -Dversion=${version} -Dpackaging=war -DgeneratePom=true

@ -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>com.olexyn.misp.mirror</groupId>
<artifactId>misp-mirror</artifactId>
<version>0.1</version>
<packaging>war</packaging>
<name>misp-mirror Maven Webapp</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.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.olexyn.misp.helper</groupId>
<artifactId>misp-helper</artifactId>
<version>0.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.orbit</groupId>
<artifactId>javax.servlet</artifactId>
<version>3.0.0.v201112011016</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20190722</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_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-war-plugin</artifactId>
<version>3.2.2</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>
</plugins>
</pluginManagement>
</build>
</project>

@ -1,4 +1,4 @@
package com.olexyn.mirror; package com.olexyn.misp.mirror;
import com.olexyn.misp.helper.Ride; import com.olexyn.misp.helper.Ride;
import com.olexyn.misp.helper.WebPrint; import com.olexyn.misp.helper.WebPrint;

@ -0,0 +1,23 @@
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>misp-mirror</display-name>
<servlet>
<servlet-name>misp-mirror</servlet-name>
<servlet-class>com.olexyn.misp.mirror.Mirror</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>misp-mirror</servlet-name>
<url-pattern>/core</url-pattern>
</servlet-mapping>
</web-app>

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

@ -0,0 +1,20 @@
<html>
<head>
<title>misp-mirror</title>
</head>
<body bgcolor=white>
<table border="0">
<tr>
<td align=center>
<img src="images/io42630.png">
</td>
</tr>
<tr>
<td>
<h1>misp-mirror</h1>
</td>
</tr>
</table>
</body>
</html>
Loading…
Cancel
Save