bamaer commented on code in PR #9579: URL: https://github.com/apache/hop/pull/9579#discussion_r4619595091
########## assemblies/web-war/pom.xml: ########## @@ -0,0 +1,226 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one or more + ~ contributor license agreements. See the NOTICE file distributed with + ~ this work for additional information regarding copyright ownership. + ~ The ASF licenses this file to You 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. + --> +<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>org.apache.hop</groupId> + <artifactId>hop-assemblies</artifactId> + <version>2.21.0-SNAPSHOT</version> + </parent> + + <!-- + Hop Web for a plain servlet container (Tomcat 10.1 or later): + + hop-web-<version>.war the web app: the RAP front end from hop-assemblies-web + plus the client's lib/core in WEB-INF/lib, the start + scripts and config. Deploy it as webapps/ROOT.war. + hop-web-<version>-plugins.zip plugins/ and jdbc-drivers/, unzipped into CATALINA_BASE. + Hop Web finds them there when HOP_PLUGIN_BASE_FOLDERS and + HOP_SHARED_JDBC_FOLDERS are not set (HopWebDefaults). + + The same layout is left unpacked in target/webapp and target/tomcat, and the Docker + images are built from those folders. + --> + <artifactId>hop-web</artifactId> + <packaging>pom</packaging> + <name>Hop Web</name> + + <properties> + <hop-web.client.dir>${project.build.directory}/client</hop-web.client.dir> + <hop-web.tomcat.dir>${project.build.directory}/tomcat</hop-web.tomcat.dir> + <hop-web.webapp.dir>${project.build.directory}/webapp</hop-web.webapp.dir> + <!-- Published to Maven Central next to hop-client, with a flattened POM. --> + <maven.deploy.skip>false</maven.deploy.skip> + </properties> + + <!-- Build inputs only. Both are unpacked as they are, so none of their dependencies are + wanted. --> + <dependencies> + <dependency> + <groupId>org.apache.hop</groupId> + <artifactId>hop-assemblies-web</artifactId> + <version>${project.version}</version> + <type>war</type> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.hop</groupId> + <artifactId>hop-client</artifactId> + <version>${project.version}</version> + <type>zip</type> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>flatten-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>unpack-web-and-client</id> + <goals> + <goal>unpack</goal> + </goals> + <phase>prepare-package</phase> + <configuration> + <!-- Unpack every time, so the replacements below always start from + the original files, even without a clean. --> + <overWriteReleases>true</overWriteReleases> + <overWriteSnapshots>true</overWriteSnapshots> + <artifactItems> + <artifactItem> + <groupId>org.apache.hop</groupId> + <artifactId>hop-assemblies-web</artifactId> + <version>${project.version}</version> + <type>war</type> + <outputDirectory>${hop-web.webapp.dir}</outputDirectory> + </artifactItem> + <artifactItem> + <groupId>org.apache.hop</groupId> + <artifactId>hop-client</artifactId> + <version>${project.version}</version> + <type>zip</type> + <includes>hop/lib/core/**,hop/lib/jdbc/**,hop/plugins/**</includes> Review Comment: **Blocker.** The client unpack takes `lib/core`, `lib/jdbc` and `plugins`, but not `config`. Today the Dockerfiles copy the client's `config` over the thin war's. The thin war only has a reduced samples project. All the samples from the plugin assemblies (`transforms/`, `actions/`, `metadata-injection/`, `datasets/`, ...) only exist in the client's `config`. | | `webapps/ROOT/config` files | |---|---| | image built with today's recipe | 545 | | this PR (`target/webapp`, also the war) | 27 | So the `apache/hop-web` image and the new war ship without those samples. `HopWebRunTest` opens `samples/transforms/add-constants.hpl`, so the Selenium job would fail as well. Suggested fix (tried locally: 417 files, the client's set, `add-constants.hpl` is there, and `hop-config.json` still gets the `${HOP_CONFIG_FOLDER}` rewrite): ```xml <includes>hop/config/**,hop/lib/core/**,hop/lib/jdbc/**,hop/plugins/**</includes> ``` and in the antrun target, before the other copies: ```xml <copy todir="${hop-web.webapp.dir}/config" overwrite="true"> <fileset dir="${hop-web.client.dir}/hop/config"></fileset> </copy> ``` The remaining difference to 545 is the marketplace-optional samples (beam, neo4j, ...). Your `optional/config` step already adds those back in the image. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
