Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #43 #44

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
.DS_Store
/target/
.settings/
.classpath
.project
137 changes: 6 additions & 131 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
<parent>
<groupId>org.opengis.cite</groupId>
<artifactId>ets-common</artifactId>
<version>9</version>
<version>14-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<groupId>org.opengis.cite</groupId>
<artifactId>ets-wps20</artifactId>
<version>1.1-SNAPSHOT</version>
<packaging>jar</packaging>
Expand Down Expand Up @@ -47,28 +46,21 @@
<properties>
<ets-code>wps20</ets-code>
<spec-version>2.0</spec-version>
<docker.teamengine.version>5.6.1</docker.teamengine.version>
</properties>

<dependencies>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>org.opengis.cite.teamengine</groupId>
<artifactId>teamengine-spi</artifactId>
<version>5.6.1</version>
</dependency>
<dependency>
<groupId>org.opengis.cite</groupId>
<artifactId>schema-utils</artifactId>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand All @@ -77,29 +69,14 @@
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.connectors</groupId>
<artifactId>jersey-apache-connector</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<docfilessubdirs>true</docfilessubdirs>
<show>package</show>
<links>
<link>http://testng.org/javadocs/</link>
</links>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
Expand All @@ -123,75 +100,20 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagNameFormat>@{project.version}</tagNameFormat>
<releaseProfiles>release</releaseProfiles>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
<executions>
<execution>
<id>site-package</id>
<phase>prepare-package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.7.1</version>
</dependency>
</dependencies>
<configuration>
<relativizeDecorationLinks>false</relativizeDecorationLinks>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-scm-publish-plugin</artifactId>
<version>1.1</version>
<configuration>
<scmBranch>gh-pages</scmBranch>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<!--<version>0.28.0</version>-->
<version>0.30.0</version>
<configuration>
<images>
<image>
<name>ogccite/${project.artifactId}</name>
<build>
<dockerFileDir>${project.basedir}/src/docker</dockerFileDir>
<tags>
<tag>${project.version}-teamengine-${docker.teamengine.version}</tag>
<tag>${project.version}-teamengine-${teamengine.version}</tag>
</tags>
<assembly>
<inline>
Expand Down Expand Up @@ -224,58 +146,11 @@
</images>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.opengis.cite.teamengine</groupId>
<artifactId>teamengine-web</artifactId>
<version>${docker.teamengine.version}</version>
<type>war</type>
</artifactItem>
<artifactItem>
<groupId>org.opengis.cite.teamengine</groupId>
<artifactId>teamengine-web</artifactId>
<version>${docker.teamengine.version}</version>
<classifier>common-libs</classifier>
<type>zip</type>
</artifactItem>
<artifactItem>
<groupId>org.opengis.cite.teamengine</groupId>
<artifactId>teamengine-console</artifactId>
<version>${docker.teamengine.version}</version>
<classifier>base</classifier>
<type>zip</type>
</artifactItem>
</artifactItems>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

<profiles>
<profile>
<id>integration-tests</id>
<build>
<plugins>
<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>
</profile>
<profile>
<id>docker</id>
<build>
Expand Down
3 changes: 0 additions & 3 deletions src/assembly/aio.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
<useProjectArtifact>true</useProjectArtifact>
<unpack>true</unpack>
<scope>runtime</scope>
<excludes>
<exclude>com.sun.jersey:jersey-server</exclude>
</excludes>
</dependencySet>
</dependencySets>
</assembly>
16 changes: 4 additions & 12 deletions src/assembly/deps.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,13 @@
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<includes>
<include>com.sun.jersey:jersey-client</include>
<include>org.opengis.cite:schema-utils</include>
</includes>
<outputDirectory>/</outputDirectory>
<unpack>false</unpack>
<scope>runtime</scope>
<useTransitiveDependencies>false</useTransitiveDependencies>
</dependencySet>
<dependencySet>
<excludes>
<exclude>org.opengis.cite.teamengine:teamengine-spi</exclude>
<exclude>com.sun.jersey:jersey-client</exclude>
<exclude>org.opengis.cite:schema-utils</exclude>
<exclude>*:jersey-client</exclude>
<exclude>*:jersey-server</exclude>
<exclude>*:jersey-common</exclude>
<exclude>jakarta.ws.rs:jakarta.ws.rs-api</exclude>
</excludes>
<outputDirectory>/</outputDirectory>
<unpack>false</unpack>
Expand Down
6 changes: 5 additions & 1 deletion src/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM tomcat:7.0-jre8
FROM tomcat:10.1-jre17

RUN apt update && apt install -y unzip

# add TEAM engine webapp
ADD maven/dependency/teamengine-web-*.war /root/
Expand All @@ -21,5 +23,7 @@ RUN cd /root/ && unzip -q ets-wps20-*-ctl.zip -d /root/te_base/scripts
ADD maven/ets-wps20-*-deps.zip /root/
RUN cd /root/ && unzip -q -o ets-wps20-*-deps.zip -d /usr/local/tomcat/webapps/teamengine/WEB-INF/lib

RUN rm -R /root/te_base/scripts/note

# run tomcat
CMD ["catalina.sh", "jpda", "run"]
96 changes: 61 additions & 35 deletions src/main/java/org/opengis/cite/wps20/CommandLineArguments.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package org.opengis.cite.wps20;

import com.beust.jcommander.Parameter;
import java.io.File;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;

import com.beust.jcommander.Parameter;

/**
* Declares supported command line arguments that are parsed using the
* JCommander library. All arguments are optional. The default values are as
* follows:
* Declares supported command line arguments that are parsed using the JCommander library.
* All arguments are optional. The default values are as follows:
* <ul>
* <li>XML properties file: ${user.home}/test-run-props.xml</li>
* <li>outputDir: ${user.home}</li>
Expand All @@ -26,35 +26,61 @@
*/
public class CommandLineArguments {

@Parameter(description = "Properties file")
private final List<String> xmlProps;

@Parameter(names = {"-o", "--outputDir"}, description = "Output directory")
private String outputDir;

@Parameter(names = {"-d", "--deleteSubjectOnFinish"}, description = "Delete file containing representation of test subject when finished")
private boolean deleteSubjectOnFinish = false;

public CommandLineArguments() {
this.xmlProps = new ArrayList<>();
}

public File getPropertiesFile() {
File fileRef;
if (xmlProps.isEmpty()) {
fileRef = new File(System.getProperty("user.home"), "test-run-props.xml");
} else {
String propsFile = xmlProps.get(0);
fileRef = (propsFile.startsWith("file:")) ? new File(URI.create(propsFile)) : new File(propsFile);
}
return fileRef;
}

public String getOutputDir() {
return (null != outputDir) ? outputDir : System.getProperty("user.home");
}

public boolean doDeleteSubjectOnFinish() {
return deleteSubjectOnFinish;
}
@Parameter(description = "Properties file")
private List<String> xmlProps;

@Parameter(names = { "-o", "--outputDir" }, description = "Output directory")
private String outputDir;

@Parameter(names = { "-d", "--deleteSubjectOnFinish" },
description = "Delete file containing representation of test subject when finished")
private boolean deleteSubjectOnFinish = false;

/**
* <p>
* Constructor for CommandLineArguments.
* </p>
*/
public CommandLineArguments() {
this.xmlProps = new ArrayList<>();
}

/**
* <p>
* getPropertiesFile.
* </p>
* @return a {@link java.io.File} object
*/
public File getPropertiesFile() {
File fileRef;
if (xmlProps.isEmpty()) {
fileRef = new File(System.getProperty("user.home"), "test-run-props.xml");
}
else {
String propsFile = xmlProps.get(0);
fileRef = (propsFile.startsWith("file:")) ? new File(URI.create(propsFile)) : new File(propsFile);
}
return fileRef;
}

/**
* <p>
* Getter for the field <code>outputDir</code>.
* </p>
* @return a {@link java.lang.String} object
*/
public String getOutputDir() {
return (null != outputDir) ? outputDir : System.getProperty("user.home");
}

/**
* <p>
* doDeleteSubjectOnFinish.
* </p>
* @return a boolean
*/
public boolean doDeleteSubjectOnFinish() {
return deleteSubjectOnFinish;
}

}
Loading