Skip to content

Commit aea5fc3

Browse files
authored
Merge pull request #1951 from venmanyarun/package_archive_path_fix
changes to support archive option correction in POSIX shells
2 parents f1c7eab + 3899053 commit aea5fc3

File tree

12 files changed

+648
-14
lines changed

12 files changed

+648
-14
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
invoker.goals.1 = clean verify -Ppackage-jar
2+
3+
invoker.goals.2 = clean verify -Ppackage-runnable-jar
4+
5+
invoker.goals.3 = clean verify -Ppackage-tar
6+
7+
invoker.goals.4 = clean verify -Ppackage-tar-gz
8+
9+
invoker.goals.5 = clean verify -Ppackage-zip
Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,249 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<parent>
7+
<groupId>io.openliberty.tools.it</groupId>
8+
<artifactId>tests</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
</parent>
11+
12+
<artifactId>package-type-config-new-posix-it</artifactId>
13+
<packaging>war</packaging>
14+
15+
<properties>
16+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
18+
</properties>
19+
20+
<dependencies>
21+
<dependency>
22+
<groupId>javax.servlet</groupId>
23+
<artifactId>javax.servlet-api</artifactId>
24+
<version>3.1.0</version>
25+
<scope>provided</scope>
26+
</dependency>
27+
<dependency>
28+
<groupId>commons-httpclient</groupId>
29+
<artifactId>commons-httpclient</artifactId>
30+
<version>3.1</version>
31+
<scope>test</scope>
32+
</dependency>
33+
<dependency>
34+
<groupId>junit</groupId>
35+
<artifactId>junit</artifactId>
36+
<version>4.13.1</version>
37+
<scope>test</scope>
38+
</dependency>
39+
<dependency>
40+
<groupId>io.openliberty.tools.it</groupId>
41+
<artifactId>loose-config-fragment-it</artifactId>
42+
<version>1.0-SNAPSHOT</version>
43+
</dependency>
44+
</dependencies>
45+
46+
<build>
47+
<plugins>
48+
<plugin>
49+
<groupId>org.apache.maven.plugins</groupId>
50+
<artifactId>maven-war-plugin</artifactId>
51+
<version>3.4.0</version>
52+
<configuration>
53+
<failOnMissingWebXml>false</failOnMissingWebXml>
54+
<packagingExcludes>pom.xml</packagingExcludes>
55+
</configuration>
56+
</plugin>
57+
<plugin>
58+
<groupId>io.openliberty.tools</groupId>
59+
<artifactId>liberty-maven-plugin</artifactId>
60+
<version>@pom.version@</version>
61+
<configuration>
62+
<serverName>test</serverName>
63+
<appsDirectory>apps</appsDirectory>
64+
<stripVersion>true</stripVersion>
65+
<packageName>${project.artifactId}</packageName>
66+
<!--hard coding liberty version for testing package fix is working-->
67+
<libertyRuntimeVersion>25.0.0.12</libertyRuntimeVersion>
68+
</configuration>
69+
<executions>
70+
<execution>
71+
<id>create-liberty-server</id>
72+
<phase>package</phase>
73+
<goals>
74+
<goal>create</goal>
75+
<goal>package</goal>
76+
</goals>
77+
</execution>
78+
</executions>
79+
</plugin>
80+
<plugin>
81+
<groupId>org.apache.maven.plugins</groupId>
82+
<artifactId>maven-failsafe-plugin</artifactId>
83+
<version>3.1.2</version>
84+
<configuration>
85+
<redirectTestOutputToFile>true</redirectTestOutputToFile>
86+
<forkMode>once</forkMode>
87+
<forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
88+
<argLine>-enableassertions</argLine>
89+
<workingDirectory>${project.build.directory}</workingDirectory>
90+
<includes>
91+
<include>**/*Test.java</include>
92+
</includes>
93+
</configuration>
94+
<executions>
95+
<execution>
96+
<id>integration-test</id>
97+
<goals>
98+
<goal>integration-test</goal>
99+
</goals>
100+
</execution>
101+
<execution>
102+
<id>verify</id>
103+
<phase>verify</phase>
104+
<goals>
105+
<goal>verify</goal>
106+
</goals>
107+
</execution>
108+
</executions>
109+
</plugin>
110+
<plugin>
111+
<groupId>org.apache.maven.plugins</groupId>
112+
<artifactId>maven-surefire-plugin</artifactId>
113+
<version>3.1.2</version>
114+
<configuration>
115+
<skip>true</skip>
116+
</configuration>
117+
</plugin>
118+
</plugins>
119+
</build>
120+
<profiles>
121+
<profile>
122+
<id>package-jar</id>
123+
<build>
124+
<plugins>
125+
<plugin>
126+
<groupId>io.openliberty.tools</groupId>
127+
<artifactId>liberty-maven-plugin</artifactId>
128+
<version>@pom.version@</version>
129+
<configuration>
130+
<packageDirectory>package-directory-with space</packageDirectory>
131+
<packageType>jar</packageType>
132+
</configuration>
133+
</plugin>
134+
<plugin>
135+
<groupId>org.apache.maven.plugins</groupId>
136+
<artifactId>maven-failsafe-plugin</artifactId>
137+
<version>3.1.2</version>
138+
<configuration>
139+
<includes>
140+
<include>**/PackageTypeJarTest.java</include>
141+
</includes>
142+
</configuration>
143+
</plugin>
144+
</plugins>
145+
</build>
146+
</profile>
147+
<profile>
148+
<id>package-runnable-jar</id>
149+
<build>
150+
<plugins>
151+
<plugin>
152+
<groupId>io.openliberty.tools</groupId>
153+
<artifactId>liberty-maven-plugin</artifactId>
154+
<version>@pom.version@</version>
155+
<configuration>
156+
<packageType>jar</packageType>
157+
<include>runnable</include>
158+
</configuration>
159+
</plugin>
160+
<plugin>
161+
<groupId>org.apache.maven.plugins</groupId>
162+
<artifactId>maven-failsafe-plugin</artifactId>
163+
<version>3.1.2</version>
164+
<configuration>
165+
<includes>
166+
<include>**/PackageTypeRunnableJarTest.java</include>
167+
</includes>
168+
</configuration>
169+
</plugin>
170+
</plugins>
171+
</build>
172+
</profile>
173+
<profile>
174+
<id>package-zip</id>
175+
<build>
176+
<plugins>
177+
<plugin>
178+
<groupId>io.openliberty.tools</groupId>
179+
<artifactId>liberty-maven-plugin</artifactId>
180+
<version>@pom.version@</version>
181+
<configuration>
182+
<serverRoot>myServerRoot</serverRoot>
183+
</configuration>
184+
</plugin>
185+
<plugin>
186+
<groupId>org.apache.maven.plugins</groupId>
187+
<artifactId>maven-failsafe-plugin</artifactId>
188+
<version>3.1.2</version>
189+
<configuration>
190+
<includes>
191+
<include>**/PackageTypeZipTest.java</include>
192+
</includes>
193+
</configuration>
194+
</plugin>
195+
</plugins>
196+
</build>
197+
</profile>
198+
<profile>
199+
<id>package-tar</id>
200+
<build>
201+
<plugins>
202+
<plugin>
203+
<groupId>io.openliberty.tools</groupId>
204+
<artifactId>liberty-maven-plugin</artifactId>
205+
<version>@pom.version@</version>
206+
<configuration>
207+
<packageType>tar</packageType>
208+
</configuration>
209+
</plugin>
210+
<plugin>
211+
<groupId>org.apache.maven.plugins</groupId>
212+
<artifactId>maven-failsafe-plugin</artifactId>
213+
<version>3.1.2</version>
214+
<configuration>
215+
<includes>
216+
<include>**/PackageTypeTarTest.java</include>
217+
</includes>
218+
</configuration>
219+
</plugin>
220+
</plugins>
221+
</build>
222+
</profile>
223+
<profile>
224+
<id>package-tar-gz</id>
225+
<build>
226+
<plugins>
227+
<plugin>
228+
<groupId>io.openliberty.tools</groupId>
229+
<artifactId>liberty-maven-plugin</artifactId>
230+
<version>@pom.version@</version>
231+
<configuration>
232+
<packageType>tar.gz</packageType>
233+
</configuration>
234+
</plugin>
235+
<plugin>
236+
<groupId>org.apache.maven.plugins</groupId>
237+
<artifactId>maven-failsafe-plugin</artifactId>
238+
<version>3.1.2</version>
239+
<configuration>
240+
<includes>
241+
<include>**/PackageTypeTarGzTest.java</include>
242+
</includes>
243+
</configuration>
244+
</plugin>
245+
</plugins>
246+
</build>
247+
</profile>
248+
</profiles>
249+
</project>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*******************************************************************************
2+
* (c) Copyright IBM Corporation 2019
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*******************************************************************************/
16+
package net.wasdev.wlp.test.servlet;
17+
18+
import java.io.IOException;
19+
20+
import javax.servlet.ServletException;
21+
import javax.servlet.annotation.WebServlet;
22+
import javax.servlet.http.HttpServlet;
23+
import javax.servlet.http.HttpServletRequest;
24+
import javax.servlet.http.HttpServletResponse;
25+
import net.wasdev.wlp.test.util.Welcome;
26+
27+
@WebServlet(urlPatterns="/servlet")
28+
public class HelloServlet extends HttpServlet {
29+
private static final long serialVersionUID = 1L;
30+
31+
/**
32+
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
33+
*/
34+
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
35+
String msg = Welcome.getMessage("greeting");
36+
response.getWriter().append(msg);
37+
}
38+
39+
/**
40+
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
41+
*/
42+
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
43+
doGet(request, response);
44+
}
45+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!--
2+
(C) Copyright IBM Corporation 2019.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
<server description="Sample Servlet server">
17+
<featureManager>
18+
<feature>jsp-2.3</feature>
19+
</featureManager>
20+
21+
<httpEndpoint httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint" />
22+
</server>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
4+
version="3.1">
5+
<display-name>Hello Servlet</display-name>
6+
7+
<welcome-file-list>
8+
<welcome-file>index.html</welcome-file>
9+
</welcome-file-list>
10+
</web-app>
Binary file not shown.

0 commit comments

Comments
 (0)