diff --git a/simpleexample2/client-server-testing/pom.xml b/simpleexample2/client-server-testing/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..0e0e73bbb71273505eb4c1bbbb977ce7eb4012ed --- /dev/null +++ b/simpleexample2/client-server-testing/pom.xml @@ -0,0 +1,106 @@ +<?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> + + <parent> + <groupId>it1901.simpleexample2</groupId> + <artifactId>parent</artifactId> + <version>0.0.1-SNAPSHOT</version> + </parent> + + <artifactId>client-server-testing</artifactId> + <packaging>jar</packaging> + + <properties> + <slf4jVersion>1.7.25</slf4jVersion> + <jerseyVersion>2.28</jerseyVersion> + </properties> + + <dependencies> + <dependency> + <groupId>it1901.simpleexample2</groupId> + <artifactId>fxui</artifactId> + <version>0.0.1-SNAPSHOT</version> + </dependency> + + <dependency> + <groupId>it1901.simpleexample2</groupId> + <artifactId>restserver</artifactId> + <version>0.0.1-SNAPSHOT</version> + </dependency> + </dependencies> + + <build> + <plugins> + <!-- + <plugin> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-maven-plugin</artifactId> + <version>9.4.31.v20200723</version> + <configuration> + <httpConnector> + <port>8999</port> + </httpConnector> + <stopKey>quit</stopKey> + <stopPort>9000</stopPort> + </configuration> + <executions> + <execution> + <id>start-jetty</id> + <phase>pre-integration-test</phase> + <goals> + <goal>start</goal> + </goals> + </execution> + <execution> + <id>stop-jetty</id> + <phase>post-integration-test</phase> + <goals> + <goal>stop</goal> + </goals> + </execution> + </executions> + </plugin> + --> + <plugin> + <groupId>org.codehaus.cargo</groupId> + <artifactId>cargo-maven2-plugin</artifactId> + <version>1.4.8</version> + <configuration> + <container> + <containerId>jetty9x</containerId> + <type>embedded</type> + </container> + <configuration> + <properties> + <cargo.servlet.port>8080</cargo.servlet.port> + </properties> + </configuration> + <deployables> + <deployable> + <groupId>it1901.simpleexample2</groupId> + <artifactId>restserver</artifactId> + <type>war</type> + <properties> + <context>/latlong-rest</context> + </properties> + </deployable> + </deployables> + </configuration> + </plugin> + <plugin> + <artifactId>maven-failsafe-plugin</artifactId> + <version>2.22.0</version> + <executions> + <execution> + <goals> + <goal>integration-test</goal> + <goal>verify</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> diff --git a/simpleexample2/restserver/pom.xml b/simpleexample2/restserver/pom.xml index 22135abdec7b871f9fd57f27d9aeb947b91e119b..248e9194223e308fd9367feb50c77701defc2b90 100644 --- a/simpleexample2/restserver/pom.xml +++ b/simpleexample2/restserver/pom.xml @@ -10,6 +10,7 @@ </parent> <artifactId>restserver</artifactId> + <packaging>war</packaging> <properties> <slf4jVersion>1.7.25</slf4jVersion> @@ -154,4 +155,4 @@ </plugin> </plugins> </build> -</project> \ No newline at end of file +</project> diff --git a/simpleexample2/restserver/src/main/webapp/WEB-INF/web.xml b/simpleexample2/restserver/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000000000000000000000000000000000..05dc43d2259bd8c33d42395c35c34ba8ff38cc61 --- /dev/null +++ b/simpleexample2/restserver/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,19 @@ +<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"> + <servlet> + <servlet-name>latlong-rest</servlet-name> + <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class> + <init-param> + <param-name>javax.ws.rs.Application</param-name> + <param-value>simpleex.restserver.LatLongConfig</param-value> + </init-param> + </servlet> + <servlet-mapping> + <servlet-name>latlong-rest</servlet-name> + <url-pattern>/*</url-pattern> + </servlet-mapping> +</web-app>