Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into skipInstallFeature
Browse files Browse the repository at this point in the history
  • Loading branch information
cherylking committed Aug 19, 2023
2 parents 4d9d196 + e1737c9 commit dbb4d33
Show file tree
Hide file tree
Showing 24 changed files with 716 additions and 441 deletions.
3 changes: 2 additions & 1 deletion docs/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Start a Liberty instance in dev mode. This goal also invokes the `create`, `inst

Starting in version 3.6.1, dev mode invokes the `generate-features` goal when the `generateFeatures` configuration parameter is set to `true`. **This goal modifies the source configuration directory of your application.** See [generate-features](generate-features.md) for details. The default value for the `generateFeatures` parameter is `false`. When auto-generation of features is turned on, dev mode has a runtime dependency on IBM WebSphere Application Server Migration Toolkit for Application Binaries, which is separately licensed under IBM License Agreement for Non-Warranted Programs. For more information, see the [license](https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/license/wamt).

Additionally, starting in 3.5.2-SNAPSHOT, [resource variable filtering](https://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html) and [WAR overlays](https://maven.apache.org/plugins/maven-war-plugin/overlays.html) are supported for loose WAR applications. This is done by automatically detecting appropriate Maven WAR plugin configuration and calling the WAR plugin's `exploded` goal and the Maven Resource plugin's `resource` goal when appropriate. Behavior for updating/deleting resources is delegated via the Maven WAR plugin configuration, including the `outdatedCheckPath` parameter enhanced in plugin version 3.3.2.
Additionally, starting in version 3.5.2, [resource variable filtering](https://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html) and [WAR overlays](https://maven.apache.org/plugins/maven-war-plugin/overlays.html) are supported for loose WAR applications. This is done by automatically detecting appropriate Maven WAR plugin configuration and calling the WAR plugin's [`exploded`](https://maven.apache.org/plugins/maven-war-plugin/exploded-mojo.html) goal and the Maven Resource plugin's [`resource`](https://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html) goal when appropriate. Behavior for updating/deleting resources can be configured via the [`outdatedCheckPath`](https://maven.apache.org/plugins/maven-war-plugin/exploded-mojo.html#outdatedCheckPath) parameter introduced and then enhanced in maven-war-plugin versions 3.3.1, 3.3.2.


To start the server in a container, see the [devc](#devc-container-mode) section below.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Created-By: 17.0.3 (IBM Corporation)

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
invoker.goals.1 = -Poverlay clean compile liberty:create liberty:install-feature liberty:deploy verify
invoker.goals.2 = -Pnon-exploded clean compile liberty:create liberty:install-feature liberty:deploy verify
invoker.goals.3 = -Pfiltered-web-resource clean compile liberty:create liberty:install-feature liberty:deploy verify
invoker.goals.4 = -Pfiltered-dd clean compile liberty:create liberty:install-feature liberty:deploy verify
275 changes: 149 additions & 126 deletions ...it/resources/exploded-war-project/pom.xml → ...t/deploy-loose-config-exploded-it/pom.xml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,72 +1,31 @@
<?xml version='1.0' encoding='utf-8'?>
<?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>

<groupId>dev-it-tests</groupId>
<artifactId>exploded-war-proj</artifactId>
<version>1.0-SNAPSHOT</version>
<parent>
<groupId>io.openliberty.tools.it</groupId>
<artifactId>tests</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

<artifactId>deploy-loose-config-exploded-it</artifactId>
<packaging>war</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<app.name>LibertyProject</app.name>
<!-- tag::ports[] -->
<testServerHttpPort>9080</testServerHttpPort>
<testServerHttpsPort>9443</testServerHttpsPort>
<!-- end::ports[] -->
<packaging.type>usr</packaging.type>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.openliberty.features</groupId>
<artifactId>features-bom</artifactId>
<version>RUNTIME_VERSION</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<!-- Open Liberty features -->
<dependency>
<groupId>io.openliberty.features</groupId>
<artifactId>jaxrs-2.1</artifactId>
<type>esa</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.openliberty.features</groupId>
<artifactId>jsonp-1.1</artifactId>
<type>esa</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.openliberty.features</groupId>
<artifactId>cdi-2.0</artifactId>
<type>esa</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.openliberty.features</groupId>
<artifactId>mpConfig-1.3</artifactId>
<type>esa</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.openliberty.features</groupId>
<artifactId>mpRestClient-1.2</artifactId>
<type>esa</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<!-- For tests -->
<dependency>
<groupId>junit</groupId>
Expand Down Expand Up @@ -131,87 +90,50 @@
<version>1.2.3</version>
<scope>runtime</scope>
</dependency>
<!-- ADDITIONAL_DEPENDENCIES -->

<!-- Overlay dependency
<dependency>
<groupId>com.example.projects</groupId>
<artifactId>documentedprojectdependency</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
<scope>runtime</scope>
</dependency>
-->

</dependencies>

<build>
<plugins>
<plugin>
<!-- Run in IT but with *Test.java -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</configuration>
</plugin>
<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>
<!-- Overlay configuration start
<overlays>
<overlay>
</overlay>
</overlays>
Overlay configuration end -->

<!-- Filtered directory start
<webResources>
<resource>
<directory>resource2</directory>
</resource>
</webResources>
Filtered directory end -->

<!-- Web resource -->
<webResources>
<resource>
<directory>${project.basedir}/src/main/resource1</directory>
<filtering>false</filtering>
</resource>
</webResources>
<filteringDeploymentDescriptors>false</filteringDeploymentDescriptors>
</configuration>
</plugin>
<!-- Plugin to run unit tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<phase>test</phase>
<id>default-test</id>
<configuration>
<excludes>
<exclude>**/it/**</exclude>
</excludes>
<reportsDirectory>${project.build.directory}/test-reports/unit</reportsDirectory>
</configuration>
</execution>
</executions>
</plugin>

<!-- Enable liberty-maven plugin -->
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>SUB_VERSION</version>
<version>@pom.version@</version>
<configuration>
<assemblyArtifact>
<groupId>io.openliberty</groupId>
<artifactId>openliberty-kernel</artifactId>
<version>RUNTIME_VERSION</version>
<type>zip</type>
</assemblyArtifact>
<packageName>${app.name}</packageName>
<include>${packaging.type}</include>
<bootstrapProperties>
<default.http.port>${testServerHttpPort}</default.http.port>
<default.https.port>${testServerHttpsPort}</default.https.port>
<com.ibm.ws.logging.message.format>json</com.ibm.ws.logging.message.format>
</bootstrapProperties>
<!-- ADDITIONAL_CONFIGURATION -->
<stripVersion>true</stripVersion>
</configuration>
</plugin>
<!-- Plugin to run functional tests -->

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
Expand All @@ -223,16 +145,6 @@
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<includes>
<include>**/it/**/*.java</include>
</includes>
<!-- tag::system-props[] -->
<systemPropertyVariables>
<liberty.test.port>${testServerHttpPort}</liberty.test.port>
</systemPropertyVariables>
<!-- end::system-props[] -->
</configuration>
</execution>
<execution>
<id>verify-results</id>
Expand All @@ -242,10 +154,121 @@
</execution>
</executions>
<configuration>
<summaryFile>${project.build.directory}/test-reports/it/failsafe-summary.xml</summaryFile>
<summaryFile>
${project.build.directory}/test-reports/it/failsafe-summary.xml</summaryFile>
<reportsDirectory>${project.build.directory}/test-reports/it</reportsDirectory>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>non-exploded</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<includes>
<include>**/NonExplodedTest.java</include>
</includes>
<excludes>
<exclude>**/ExplodedTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>overlay</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<overlays>
<overlay />
</overlays>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<includes>
<include>**/ExplodedTest.java</include>
</includes>
<excludes>
<exclude>**/ExplodedFilteredDDTest.java</exclude>
<exclude>**/NonExplodedTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>filtered-web-resource</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources combine.children="append">
<resource>
<directory>${project.basedir}/src/main/resource2</directory>
<filtering>true</filtering>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<includes>
<include>**/ExplodedTest.java</include>
</includes>
<excludes>
<exclude>**/ExplodedFilteredDDTest.java</exclude>
<exclude>**/NonExplodedTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>filtered-dd</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<includes>
<include>**/ExplodedFilteredDDTest.java</include>
</includes>
<excludes>
<exclude>**/ExplodedTest.java</exclude>
<exclude>**/NonExplodedTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Loading

0 comments on commit dbb4d33

Please sign in to comment.