Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
29 changes: 5 additions & 24 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
matrix:
# test against latest update of each major Java version, as well as specific updates of LTS versions:
RUNTIME: [ol, wlp]
RUNTIME_VERSION: [25.0.0.9,25.0.0.10]
RUNTIME_VERSION: [25.0.0.12]
java: [25, 21, 17, 11, 8]
exclude:
- java: 8
Expand All @@ -34,16 +34,6 @@ jobs:
RUNTIME: ol
- java: 21
RUNTIME: ol
- RUNTIME_VERSION: 25.0.0.9
java: 25
- RUNTIME_VERSION: 25.0.0.10
java: 21
- RUNTIME_VERSION: 25.0.0.10
java: 17
- RUNTIME_VERSION: 25.0.0.10
java: 11
- RUNTIME_VERSION: 25.0.0.10
java: 8
name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, Linux
steps:
# Checkout repos
Expand Down Expand Up @@ -113,8 +103,9 @@ jobs:
- name: Checkout ci.ant
uses: actions/checkout@v3
with:
repository: OpenLiberty/ci.ant
repository: venmanyarun/ci.ant
path: ci.ant
ref: package_archive_path_fix
- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
with:
Expand Down Expand Up @@ -144,7 +135,7 @@ jobs:
matrix:
# test against latest update of each major Java version, as well as specific updates of LTS versions:
RUNTIME: [ol, wlp]
RUNTIME_VERSION: [ 25.0.0.9,25.0.0.10 ]
RUNTIME_VERSION: [ 25.0.0.12 ]
java: [ 25, 21, 17, 11, 8 ]
exclude:
- java: 8
Expand All @@ -155,16 +146,6 @@ jobs:
RUNTIME: ol
- java: 21
RUNTIME: ol
- RUNTIME_VERSION: 25.0.0.9
java: 25
- RUNTIME_VERSION: 25.0.0.10
java: 21
- RUNTIME_VERSION: 25.0.0.10
java: 17
- RUNTIME_VERSION: 25.0.0.10
java: 11
- RUNTIME_VERSION: 25.0.0.10
java: 8
name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, Windows
steps:
# Checkout repos
Expand Down Expand Up @@ -227,7 +208,7 @@ jobs:
run: |
echo ${{github.workspace}}
git clone https://github.com/OpenLiberty/ci.common.git ${{github.workspace}}/ci.common
git clone https://github.com/OpenLiberty/ci.ant.git ${{github.workspace}}/ci.ant
git clone https://github.com/venmanyarun/ci.ant.git ${{github.workspace}}/ci.ant --branch package_archive_path_fix --single-branch
- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
invoker.goals.1 = clean verify -Ppackage-jar

invoker.goals.2 = clean verify -Ppackage-runnable-jar

invoker.goals.3 = clean verify -Ppackage-tar

invoker.goals.4 = clean verify -Ppackage-tar-gz

invoker.goals.5 = clean verify -Ppackage-zip
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
<?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>io.openliberty.tools.it</groupId>
<artifactId>tests</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

<artifactId>package-type-config-older-liberty-it</artifactId>
<packaging>war</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.openliberty.tools.it</groupId>
<artifactId>loose-config-fragment-it</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.4.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<packagingExcludes>pom.xml</packagingExcludes>
</configuration>
</plugin>
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<serverName>test</serverName>
<appsDirectory>apps</appsDirectory>
<stripVersion>true</stripVersion>
<packageName>${project.artifactId}</packageName>
<!--hard coding liberty version for testing package fix is working for older versions as well-->
<libertyRuntimeVersion>25.0.0.9</libertyRuntimeVersion>
</configuration>
<executions>
<execution>
<id>create-liberty-server</id>
<phase>package</phase>
<goals>
<goal>create</goal>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<forkMode>once</forkMode>
<forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
<argLine>-enableassertions</argLine>
<workingDirectory>${project.build.directory}</workingDirectory>
<includes>
<include>**/*Test.java</include>
</includes>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<phase>verify</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>package-jar</id>
<build>
<plugins>
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<packageDirectory>package-directory-with space</packageDirectory>
<packageType>jar</packageType>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<includes>
<include>**/PackageTypeJarTest.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>package-runnable-jar</id>
<build>
<plugins>
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<packageType>jar</packageType>
<include>runnable</include>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<includes>
<include>**/PackageTypeRunnableJarTest.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>package-zip</id>
<build>
<plugins>
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<serverRoot>myServerRoot</serverRoot>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<includes>
<include>**/PackageTypeZipTest.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>package-tar</id>
<build>
<plugins>
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<packageType>tar</packageType>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<includes>
<include>**/PackageTypeTarTest.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>package-tar-gz</id>
<build>
<plugins>
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<packageType>tar.gz</packageType>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<includes>
<include>**/PackageTypeTarGzTest.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*******************************************************************************
* (c) Copyright IBM Corporation 2019
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
package net.wasdev.wlp.test.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.wasdev.wlp.test.util.Welcome;

@WebServlet(urlPatterns="/servlet")
public class HelloServlet extends HttpServlet {
private static final long serialVersionUID = 1L;

/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String msg = Welcome.getMessage("greeting");
response.getWriter().append(msg);
}

/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request, response);
}
}
Loading
Loading