Fix executable packaging
This commit is contained in:
@@ -48,6 +48,52 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-properties-file-exists</id>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<requireFilesExist>
|
||||
<message>Missing pairgoth.properties file</message>
|
||||
<files>
|
||||
<file>${project.parent.basedir}/pairgoth.properties</file>
|
||||
</files>
|
||||
</requireFilesExist>
|
||||
</rules>
|
||||
<fail>true</fail>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-resources</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${basedir}/..</directory>
|
||||
<include>pairgoth.properties</include>
|
||||
<!-- <filtering>true</filtering> -->
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
|
@@ -1,55 +0,0 @@
|
||||
<?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_3_1.xsd"
|
||||
version="3.1">
|
||||
<!-- Listeners -->
|
||||
<!-- we're not using @WebListener annotations so that our manager is initialized *after* the webapp logger -->
|
||||
<listener>
|
||||
<listener-class>com.republicate.slf4j.impl.ServletContextLoggerListener</listener-class>
|
||||
</listener>
|
||||
<listener>
|
||||
<listener-class>org.jeudego.pairgoth.web.WebappManager</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- filters -->
|
||||
<filter>
|
||||
<filter-name>webapp-slf4j-logger-ip-tag-filter</filter-name>
|
||||
<filter-class>com.republicate.slf4j.impl.IPTagFilter</filter-class>
|
||||
<async-supported>true</async-supported>
|
||||
</filter>
|
||||
|
||||
<!-- filters mapping -->
|
||||
<filter-mapping>
|
||||
<filter-name>webapp-slf4j-logger-ip-tag-filter</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
<dispatcher>REQUEST</dispatcher>
|
||||
<dispatcher>FORWARD</dispatcher>
|
||||
</filter-mapping>
|
||||
|
||||
<!-- servlets -->
|
||||
<servlet>
|
||||
<servlet-name>api</servlet-name>
|
||||
<servlet-class>org.jeudego.pairgoth.web.ApiServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<!-- servlet mappings -->
|
||||
<servlet-mapping>
|
||||
<servlet-name>api</servlet-name>
|
||||
<url-pattern>/api/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- context params -->
|
||||
<context-param>
|
||||
<param-name>webapp-slf4j-logger.format</param-name>
|
||||
<param-value>%logger [%level] [%ip] %message @%file:%line:%column</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>webapp-slf4j-logger.level</param-name>
|
||||
<param-value>${logger.level}</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>webapp-slf4j-logger.notification</param-name>
|
||||
<param-value>${logger.notification}</param-value>
|
||||
</context-param>
|
||||
|
||||
</web-app>
|
@@ -50,7 +50,6 @@ class WebappManager : ServletContextListener, ServletContextAttributeListener, H
|
||||
|
||||
/* ServletContextListener interface */
|
||||
override fun contextInitialized(sce: ServletContextEvent) {
|
||||
if (1==1) throw IllegalAccessError("sgdfgsdfg");
|
||||
context = sce.servletContext
|
||||
logger.info("---------- Starting Web Application ----------")
|
||||
context.setAttribute("manager", this)
|
||||
|
@@ -1 +0,0 @@
|
||||
../../../../target/pairgoth-1.0-SNAPSHOT/WEB-INF/web.xml
|
59
webapp/src/main/webapp/WEB-INF/web.xml
Normal file
59
webapp/src/main/webapp/WEB-INF/web.xml
Normal file
@@ -0,0 +1,59 @@
|
||||
<?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_3_1.xsd"
|
||||
version="3.1">
|
||||
<!-- Listeners -->
|
||||
<!-- we're not using @WebListener annotations so that our manager is initialized *after* the webapp logger -->
|
||||
<listener>
|
||||
<listener-class>com.republicate.slf4j.impl.ServletContextLoggerListener</listener-class>
|
||||
</listener>
|
||||
<listener>
|
||||
<listener-class>org.jeudego.pairgoth.web.WebappManager</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- filters -->
|
||||
<filter>
|
||||
<filter-name>webapp-slf4j-logger-ip-tag-filter</filter-name>
|
||||
<filter-class>com.republicate.slf4j.impl.IPTagFilter</filter-class>
|
||||
<async-supported>true</async-supported>
|
||||
</filter>
|
||||
|
||||
<!-- filters mapping -->
|
||||
<filter-mapping>
|
||||
<filter-name>webapp-slf4j-logger-ip-tag-filter</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
<dispatcher>REQUEST</dispatcher>
|
||||
<dispatcher>FORWARD</dispatcher>
|
||||
</filter-mapping>
|
||||
|
||||
<!-- servlets -->
|
||||
<servlet>
|
||||
<servlet-name>api</servlet-name>
|
||||
<servlet-class>org.jeudego.pairgoth.web.ApiServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<!-- servlet mappings -->
|
||||
<servlet-mapping>
|
||||
<servlet-name>api</servlet-name>
|
||||
<url-pattern>/api/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- context params -->
|
||||
<context-param>
|
||||
<param-name>webapp-slf4j-logger.format</param-name>
|
||||
<param-value>%logger [%level] [%ip] %message @%file:%line:%column</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>webapp-slf4j-logger.level</param-name>
|
||||
<param-value>trace</param-value>
|
||||
<!-- CB TODO parametrize from webapp properties file
|
||||
<param-value>${logger.level}</param-value>
|
||||
-->
|
||||
</context-param>
|
||||
<!--
|
||||
<context-param>
|
||||
<param-name>webapp-slf4j-logger.notification</param-name>
|
||||
<param-value>${logger.notification}</param-value>
|
||||
</context-param>
|
||||
-->
|
||||
</web-app>
|
@@ -1 +0,0 @@
|
||||
../../../../target/pairgoth-1.0-SNAPSHOT/WEB-INF/webapp.properties
|
Reference in New Issue
Block a user